openthread / ot-br-posix

OpenThread Border Router, a Thread border router for POSIX-based platforms.
https://openthread.io/
BSD 3-Clause "New" or "Revised" License
420 stars 235 forks source link

NCP state changes to "uninitialized" when running "sudo wpanctl status" command. #324

Closed tarunsmalviya closed 3 years ago

tarunsmalviya commented 5 years ago

I have been recently getting an error while executing sudo wpanctl get command. PFA for the error and as a result NCP gets reset.

Screenshot 2019-09-02 at 10 35 27 AM
gjc13 commented 5 years ago

Would you provide the wpantund version and log? It can be wpanctl querying some outdated fields.

tarunsmalviya commented 5 years ago

The wpantund version is wpantund 0.08.00d (/345bf7d; Jun 27 2019 17:02:59). PFA for system logs. syslog.txt

gjc13 commented 5 years ago

If you are using the J-Link embedded serial port on NRF52840, it can be msd causing trash on wire. Follow the guide here to disable it (search for msddisable): https://github.com/openthread/openthread/blob/master/src/posix/README.md

tarunsmalviya commented 5 years ago

@gjc13 Can you please explain what exactly MSD meaning?

LuDuda commented 5 years ago

@tarunsmalviya please take a look on this documentation.

tarunsmalviya commented 5 years ago

@gjc13 We are using NCP with raspberry pi 3. I didn't understand how it is linked with J-Link.

jwhui commented 5 years ago

@tarunsmalviya, were you able to resolve this issue?

tarunsmalviya commented 5 years ago

@jwhui No.

tarunsmalviya commented 5 years ago

This issue is happening again. NCP suddenly goes to uninitialised state in between normal functionality. PFA for reference. Screenshot 2019-11-18 at 4 20 31 PM

Screenshot 2019-11-18 at 4 22 02 PM
jwhui commented 5 years ago

@tarunsmalviya, what git commit are you using for the NCP firmware? Can you try with the latest master?

tarunsmalviya commented 4 years ago

@jwhui I am facing this issue again.


wpan0 => [
    "NCP:State" => "associated"
    "Daemon:Enabled" => true
    "NCP:Version" => "OPENTHREAD/20180926-00632-g2279ef61; NRF52840; May 23 2019 20:44:20"
    "Daemon:Version" => "0.08.00d (/87c90ee; Dec 11 2019 03:46:40)"
    "Config:NCP:DriverName" => "spinel"
    "NCP:HardwareAddress" => [F4CE3616BC6AF3E0]
    "NCP:Channel" => 25
    "Network:NodeType" => "router"
    "Network:Name" => "fbceca7b0fe995b3"
    "Network:XPANID" => 0xFBCECA7B0FE995B3
    "Network:PANID" => 0xFBCE
    "IPv6:LinkLocalAddress" => "fe80::3c22:2a04:cb44:d8e1"
    "IPv6:MeshLocalAddress" => "fdfb:ceca:7b0f:0:4ca0:31e0:b5e0:3a5d"
    "IPv6:MeshLocalPrefix" => "fdfb:ceca:7b0f::/64"
    "com.nestlabs.internal:Network:AllowingJoin" => false
]```

There are 23 FTD and 49 SED spread over 42000 sq. ft. area. 
tarunsmalviya commented 4 years ago

@jwhui Any update?

jwhui commented 4 years ago

@tarunsmalviya, can you provide more details about your setup? Including:

tarunsmalviya commented 4 years ago

@jwhui Sure. Kindly give me some time.

tarunsmalviya commented 4 years ago

@jwhui Following are the details:

1 2

syslog.gz

rcrouthamel commented 4 years ago

@tarunsmalviya , I too have seen the NCP uninitialized and uninitialized fault when using the nRF52840's native USB port and NCP firmware provided with Nordic SDK for Thread 3.x.x and 4.x.x. I have been able to reproduce the problem on Nordic EVKs PCA10056 and PCA10059, and Fanstel USB840F, used with RPi3B+ and RPi4 hardware running Raspian Stretch Lite and Buster. The problem coincides with syslog errors: "kernel … failed to set dts/rts"

I resolved the issue by reverting to the precompiled hex file https://openthread.io/platforms/co-processor/ot-ncp-ftd-g5d2e6cd0-nrf52840.tar.gz After running, wpanctl status reports this NCP:Version as OPENTHREAD/20180926-00531-g5d2e6cd0d; NRF52840; Apr 8 2019 12:14:58, which appears to be very close to the pre-release Thread Reference 2018-09-26.

The SDK 4.x.x. version of NCP/RCP does not show issues when connected via SPI (vs. USB). This combined with the dts/rts error messages suggests to me a problem with CDC-ACM.

jwhui commented 4 years ago

@LuDuda, can you provide thoughts on the above comment from @rcrouthamel ?

LuDuda commented 4 years ago

@rcrouthamel @tarunsmalviya can you provide me a step-by-step instruction on how to reproduce this problem on the PCA10056? Did you try to use Ubuntu as a host or only Raspberry Pi?

Not counting our internal tests, I also tried to stress communication on USB by calling wpanctl get in a loop constantly, while sending IP data to the NCP as soon as possible. I couldn't observe this problem yet.

Can you run wpantund with verbose logging enabled and observe what kind of errors it reports?

jwhui commented 3 years ago

Closing stale issue.