Running NCP on NORDIC nrf52840 unable to ping.

454 views
Skip to first unread message

mad...@pathpartnertech.com

unread,
Mar 23, 2017, 11:57:53 AM3/23/17
to openthread-users, Jonathan Hui
Hi

     I started working with NORDIC platform.
     
     I am running the NCP on Board 1 and connected to my Ubuntu on serial port 1, using Wpantund i'm Configuring the NCP.
     In the second Board i am running CLI application connected to serial port 2.

     Now i formed a thread network making the CLI as leader and joined NCP as end device to the same network.

Now , from the Linux terminal i tried ping6 with IPV6 address of NCP , it is able to ping and successful.
But when i ping6 to the any Cli node IP addresses , it is not successful.

What could be the reason ?

When i experimented the same with Posix ( open thread simulator tutorial ), it is successful in both cases, pinging.

These are the commands i used to Run the NCP and CLI on NORDIC Platforms.

$ cd <openthread-master>
$ ./bootstrap
$ make -f examples/Makefile-nrf52840


To flash   
$ nrfjprog -f nrf52 --chiperase --program output/nrf52840/bin/arm-none-eabi-ot-cli-ftd.hex
$ nrfjprog -f nrf52 -r

Initializing NCP ,Opening wpantund .
$ sudo /usr/local/sbin/wpantund -o NCPSocketNme /dev/ttyACM1 -o WPANInterfaceName wpan1



similarly i flashed the CLI application and using a serial application (putty) i'm configuring CLI.

So what could be the reason that i'm unable to ping with cli node from Linux terminal.


Thanks and Regards
R Madhu.






	
	
	
	
	
	
	
	




Yakun Xu

unread,
Mar 23, 2017, 9:42:47 PM3/23/17
to openthread-users, jon...@nestlabs.com
Hi,

I guess you missed configuring the default gateway. Try this in wpanctl
wpanctl> config-gateway ff11:22::
and then find the address with prefix ff11:22:: of the cli node and ping6 this new address.

mad...@pathpartnertech.com

unread,
Mar 25, 2017, 2:46:47 AM3/25/17
to openthread-users, jon...@nestlabs.com
Thanks Yakun,

                    I tried the same way that you suggested. I added 2001:dead:beef:cafe::  as default gateway using config-gateway -d option.
I found ipv6 addresses on CLI with prefix "2001:dead:beef:cafe".
But still unable to ping6 with the address available on the CLI node from LINUX terminal.

I am guessing ,do i need to change the configuration of Wpantund to resolve this ? Any idea ,what to change?

Thanks and Regards.
R Madhu.

Martin Turon

unread,
Mar 25, 2017, 1:11:37 PM3/25/17
to mad...@pathpartnertech.com, openthread-users, Jonathan Hui
Hi Madhu,

On the NCP end device, you may need to add a static route telling the Linux kernel to use the Thread interface for the entire prefix, not just the NCP's address on that prefix:

route -A inet6 add ::/0 wpan0

You can obviously make this more granular and only setup the specific prefixes you care about.

Martin

_____________________________
Martin Turon  |  Nest Labs


This message contains confidential information and is intended only for the individual(s) named. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this mail and attached file/s is strictly prohibited. Please notify the sender immediately and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-users+unsubscribe@googlegroups.com.
To post to this group, send email to openthread-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/47a9de4c-eda2-4c17-b286-1cf58858b873%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Jonathan Hui

unread,
Mar 25, 2017, 1:23:11 PM3/25/17
to mtu...@nestlabs.com, mad...@pathpartnertech.com, openthread-users
No, setting up static routes is not needed. The simulator tutorial does not require or mention it.

Madhu - can you provide more detail on the steps you are performing in this test?

--
Jonathan Hui

To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To post to this group, send email to openthre...@googlegroups.com.

mad...@pathpartnertech.com

unread,
Mar 27, 2017, 1:41:06 AM3/27/17
to openthread-users, mtu...@nestlabs.com, mad...@pathpartnertech.com
HI 
i tried adding prefixes , using


route -A inet6 add ::/0 wpan0
still it is not working in my case.

These are the steps i followed in the test.

To build:

$ cd <openthread-master>
$ ./bootstrap
$ make -f examples/Makefile-nrf52840


To flash
$ cd output/nrf52840/bin

$ arm-none-eabi-objcopy -O ihex arm-none-eabi-ot-cli-ftd arm-none-eabi-ot-cli-ftd.hex
$ arm-none-eabi-objcopy -O ihex arm-none-eabi-ot-ncp-ftd arm-none-eabi-ot-ncp-ftd.hex

on board 1
cli

$ nrfjprog -f nrf52 --chiperase --program output/nrf52840/bin/arm-none-eabi-ot-cli-ftd.hex $ nrfjprog -f nrf52 -r

on board 2 ncp

$ nrfjprog -f nrf52 --chiperase --program output/nrf52840/bin/arm-none-eabi-ot-ncp-ftd.hex
$ nrfjprog -f nrf52 -r



Through serial console i configured cli Node,
>panid 0x1234
>ifconfig up
>thread state
>state
leader.


Initializing NCP ,Opening wpantund
.
$ sudo /usr/local/sbin/wpantund -o NCPSocketNme /dev/ttyACM0 -o WPANInterfaceName wpan0

In another terminal opening wpanctl

$ sudo wpanctl -I wpan0
wpanctl:wpan0>status
wpan0 => [
"NCP:State" => "offline".
.
.
wpanctl:wpan0> scan
| Joinable | NetworkName | PAN ID | Ch | XPanID | HWAddr | RSSI
---+----------+--------------------+--------+----+------------------+------------------+------
1 | NO | "OpenThread" | 0x1234 | 11 | DEAD00BEEF00CAFE | 264E90B129D304AE | -44
wpanctl:wpan0> join 1
Joining "OpenThread" DEAD00BEEF00CAFE as node type "end-device"
Successfully Joined!
wpanctl:wpan0>status
wpan0 => [
"NCP:State" => "associated"
"Daemon:Enabled" => true
"NCP:Version" => "OPENTHREAD/0.01.00; NRF52840; Mar 27 2017 10:06:23"
"Daemon:Version" => "0.07.00 (/f911961-dirty; Mar 3 2017 15:15:18)"
"Config:NCP:DriverName" => "spinel"
"NCP:HardwareAddress" => [B8DD443A6E973DEB]
"NCP:Channel" => 11
"Network:NodeType" => "end-device"
"Network:Name" => "OpenThread"
"Network:XPANID" => 0xDEAD00BEEF00CAFE
"Network:PANID" => 0x1234
"IPv6:LinkLocalAddress" => "fe80::f4df:5d2c:c9e1:b755"
"IPv6:MeshLocalAddress" => "fdde:ad00:beef:0:9a01:a0d9:9da2:553b"
"IPv6:MeshLocalPrefix" => "fdde:ad00:beef::/64"
"com.nestlabs.internal:Network:AllowingJoin" => false
]

from Linux terminal pinging to above ipv6 address is successfull

$ping6 fdde:ad00:beef:0:9a01:a0d9:9da2:553b -c 2
PING fdde:ad00:beef:0:9a01:a0d9:9da2:553b(fdde:ad00:beef:0:9a01:a0d9:9da2:553b) 56 data bytes
64 bytes from fdde:ad00:beef:0:9a01:a0d9:9da2:553b: icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from fdde:ad00:beef:0:9a01:a0d9:9da2:553b: icmp_seq=2 ttl=64 time=0.048 ms

--- fdde:ad00:beef:0:9a01:a0d9:9da2:553b ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.017/0.032/0.048/0.016 ms


on cli
>ipaddr
fdde:ad00:beef:0:0:ff:fe00:fc00
fdde:ad00:beef:0:0:ff:fe00:400
fdde:ad00:beef:0:c4fe:4e74:4d8a:5c4d
fe80:0:0:0:244e:90b1:29d3:4ae

from linux terminal pinging to any of the above address is not working.
$ping6 fdde:ad00:beef:0:c4fe:4e74:4d8a:5c4d -c 2

PING fdde:ad00:beef:0:c4fe:4e74:4d8a:5c4d(fdde:ad00:beef:0:c4fe:4e74:4d8a:5c4d) 56 data bytes

--- fdde:ad00:beef:0:c4fe:4e74:4d8a:5c4d ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1007ms

--------
so then i also tried configuring gateway.
wpanctl:wpan0> config-gateway -d 2001:dead:beef:cafe::
Using prefix "2001:dead:beef:cafe::"
Gateway configured.

On cli , using ipaddr i can see a new ipv6 address with prefix "2001:dead:beef:cafe", and pinging to this address is also failed.

When i am simulating with posix examples i successfully pinged in both cases.

Can you figure out the problem ? Do i need to do changes in the configuration file of Wpantud.conf.?

Thanks and Regards,
R Madhu

Yuwen Lan

unread,
Mar 27, 2017, 2:15:36 AM3/27/17
to mad...@pathpartnertech.com, openthread-users, Martin Turon
Madhu,

Please use "wpanctl:wpan0> join 1 -T 2" or  "wpanctl:wpan0> join 1 -T router" and make sure the border router joins the network as node type "router".

By doing so, you should be able to ping "2001:dead:beef:cafe::" based addresses. Also, pinging mesh-local addresses beyond of border router itself should expect failing.

Thanks,
Yuwen

To unsubscribe from this group and stop receiving emails from it, send an email to openthread-users+unsubscribe@googlegroups.com.
To post to this group, send email to openthread-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/c972639d-2015-4f44-b4e5-a0a70198a346%40googlegroups.com.

mad...@pathpartnertech.com

unread,
Mar 27, 2017, 1:13:07 PM3/27/17
to openthread-users, mad...@pathpartnertech.com, mtu...@nestlabs.com, Jonathan Hui
HI yuwenian,

Thanks .

               I tried the same , Making NCP node to join as Router, But still the same issue.

mad...@pathpartnertech.com

unread,
Mar 27, 2017, 1:15:13 PM3/27/17
to openthread-users, jon...@nestlabs.com
HI yuwenian,

Thanks .

               I tried the same , Making NCP node to join as Router, But still the same issue.
        Is the way that i'm configuring the Wpantund is correct ?

Thanks Regards
R Madhu

Yuwen Lan

unread,
Mar 28, 2017, 2:01:27 AM3/28/17
to mad...@pathpartnertech.com, openthread-users, Jonathan Hui
Hi Madhu,

If possible, can you save your above operations and outputs as log files and post here? I didn't see obvious issues in your configurations.

Yuwen

This message contains confidential information and is intended only for the individual(s) named. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this mail and attached file/s is strictly prohibited. Please notify the sender immediately and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.

--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-users+unsubscribe@googlegroups.com.
To post to this group, send email to openthread-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/e5b9ea0a-d7f2-43aa-85e9-26e6a3a2e74d%40googlegroups.com.

mad...@pathpartnertech.com

unread,
Mar 29, 2017, 1:09:27 PM3/29/17
to openthread-users, mad...@pathpartnertech.com, jon...@nestlabs.com
Hi
  
   I just now upgraded Wpatund(0.08.0) and cloned latest OT from git.
   Following the same procedure mentioned in
   https://github.com/openthread/wpantund/blob/master/INSTALL.md#wpantund-installation-guide
   and
   https://github.com/openthread/openthread/tree/master/examples/platforms/nrf52840
  
   Now i am even not able to ping with the NCP node from Linux terminal.

 when i check the status of wpan on my PC
 $ ifconfig 
 wpan0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
               UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1280  Metric:1
               RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:500
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


what may be the problem?
how to work out with new version of Wpantund?


Thanks and Regards
R Madhu.


To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To post to this group, send email to openthre...@googlegroups.com.

Mike Morschbert

unread,
Mar 30, 2017, 1:06:50 PM3/30/17
to openthread-users, mad...@pathpartnertech.com, jon...@nestlabs.com
Just updated my wpantund to the newest rev and it also mentiond 0.08. But no ping was possible for me as well... so I checked out a two week old commit and everything works again...

Krzysztof Loska

unread,
Mar 31, 2017, 3:46:40 AM3/31/17
to openthread-users, mad...@pathpartnertech.com, jon...@nestlabs.com
I think it was reported as an issue here: https://github.com/openthread/openthread/issues/1536 and fixed by this pull request: https://github.com/openthread/wpantund/pull/149 So please try again the newest version.

Best regards,
Krzysztof Loska

mad...@pathpartnertech.com

unread,
Mar 31, 2017, 7:01:12 AM3/31/17
to openthread-users, mad...@pathpartnertech.com, jon...@nestlabs.com
HI Krzysztof

                    Yes it is addressed with respect to the open thread simulator(posix).

      I tried with the latest version just now, with Nordic Boards, Sorry,  still i'm facing the same issue . Not able to communicate between the CLI-NCP nodes and also Pinging with the CLI node from the LINUX terminal.

Thanks & Regards
R Madhu.

mad...@pathpartnertech.com

unread,
Apr 1, 2017, 12:26:52 AM4/1/17
to openthread-users, mad...@pathpartnertech.com, jon...@nestlabs.com
Hi ,
    The above issues are solved , by testing with Latest commits.
    I cross checked with my another PC, its working fine with it.

Thanks all for your inputs.

Regards
R Madhu
Reply all
Reply to author
Forward
0 new messages