Thread 1.1.0: Problem in pinging

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Thread 1.1.0: Problem in pinging

1,984 次查看
saurabhbansal
Contributor II

Hello All,

I am using a node (based on KW41 with some sensors) and USB dongle (based on KW22 on my PC side) for communication based on Thread 1.1.0. I am trying to make connection as per below procedure:

- Flashed the node with Router Eligible End Device
- USB dongle was flashed with Host Controlled Device
- Connected the USB dongle with my PC via USB, so it creates a serial connection named /dev/ttyACM2
- I went to following path in source folder : thread-fw/MKW41Z_ConnSw_1.0.2/tools/wireless/host_sdk/hsdk/demo
- Here I ran the command : sudo ./make_tun.sh /dev/ttyACM2
- So a new interface created named 'fslthr0'
- Then I executed 'Thread_KW_Tun' binary in bin directory (also attached source) as below :
  sudo ./Thread_KW_Tun /dev/ttyACM0 fslthr0 0 25
- Then I started commissioning on Node by pressing button, and following logs were observed on its serial:

Commissioning successful

Attached to network with PAN ID: 0x4eb4
Requesting to become Active Router...
Success

Interface 0: 6LoWPAN
        Mesh local address (ML64): fd78:5dff:978f:df0d:a417:cc45:a8c7:4b45
        Mesh local address (ML16): fd78:5dff:978f:df0d::ff:fe00:400
        Unique local address: fd01::3ead:d9a6:a325:753c:f52b


- And running ifconfig on phyNode shell gives below info:
Interface 0: 6LoWPAN
        Link local address (LL64): fe80::817c:757f:303:8252
        Mesh local address (ML64): fd78:5dff:978f:df0d:a417:cc45:a8c7:4b45
        Mesh local address (ML16): fd78:5dff:978f:df0d::ff:fe00:400
        Unique local address: fd01::3ead:d9a6:a325:753c:f52b
        Link local all Thread Nodes(MCast):  ff32:40:fd78:5dff:978f:df0d::1
        Realm local all Thread Nodes(MCast): ff33:40:fd78:5dff:978f:df0d::1

- I can see periodic messages from Link local address IP (fe80::817c:757f:303:8252) in Freescale network analyzer.
- But when I tried to ping Unique local address and Link local address, its not pinging.

So can anybody help me to understand the significance of all these IP addresses and why it is not pinging.

Regards,

Saurabh

标签 (3)
标记 (3)
4 回复数

1,394 次查看
estephania_mart
NXP TechSupport
NXP TechSupport

Hello Saurabh,

Just to make sure…

Did you set the THR_SERIAL_TUN_ROUTER to 1 in the Host Controlled Device project?

#define THR_SERIAL_TUN_ROUTER 1

(middleware\wireless\nwk_ip_1.2.0\examples\host_controlled_device\config\config.h )  

 

It is not necessary to use the serial port when running the make_tun.sh batch file, did you modify it? Normally it would be

sudo ./make_tun.sh

After fslthr0 is created you will need to run the Thread_KW_Tun binary. This file will take 2 necessary arguments and two optionals.

1.- The serial port used for this script is the Host Controlled device (in your case /dev/ttyACM2).

2.- Virtual interface (fslthr0)

3.- Factory reset (1->yes / 0 ->no )

4.- Thread channel

sudo ./Thread_KW_Tun /dev/ttyACM0 fslthr0 0 25

If the network is already formed, you might not want to perform a factory reset, then after running the file you will get something like:

[THR] Set 802.15.4 channel          OK!

[THR] Create Network                ALREADY CONNECTED!

[MESHCOP] Start Commissioner        OK!

[MESHCOP] Add Expected Joiner       OK!

[MESHCOP] Sync Steering Data        OK!

 

In case you performed a factory reset, be sure to connect the Router Eligible End Device (REED) to the network.

After you have that, without closing that terminal it will be necessary to open two more. The first will be a serial terminal of the REED, you can use putty/teraterm/hyperteminal; with the shell ifconfig command you need to get the Unique Local Adress (ULA)The second is the one where you will ping the REED’s ULA. 

For further information check the chapter 6 of the Kinetis FSCI Host Application Programming Interface User’s Guide

Also, I see that you assign the IPv6 address to fslthr0 interface; usually that file is not modified so is there a specific purpose for doing that? 

Regards 

Estephania 

1,394 次查看
saurabhbansal
Contributor II

Hello Estephania, thanks a lot for giving this input. I checked my code and THR_SERIAL_TUN_ROUTER was not set to 1. I set this system constant to 1, and now I am able to ping to me REED device.

Thanks again for help,

Saurabh

1,394 次查看
jc_pacheco
NXP Employee
NXP Employee

Hello Saurabh, 

As a double check, did you assign a global IPv6 address to your fslthr0 interface and added the route to the Unique Local /64 Prefix via fslthr0? (Section 6.2 - Kinetis FSCI Host Application Programming Interface.pdf)

-JC

1,394 次查看
saurabhbansal
Contributor II

Hello Juan, thanks for the response. Yes I am assigning IPv6 address to fslthr0 interface.

I am using below commands in the file Thread_KW_Tun :

/* Add addresses from the same range on the embedded side*/
    rc += system("ip -6 addr add FE80:0000:0000:0000:0204:9FFF:FE00:FA42 dev fslthr0");
    rc += system("ip -6 addr add 2001:0000:0000:D0B9:0204:9FFF:FE00:FA42 dev fslthr0");
    /* AllJoyn: set random IPv4 address so that Tayga will see fslthr0 as an IPv4-ready interface. */
    rc += system("ip addr add 192.168.42.42 dev fslthr0");
    /* Flexible IP */
    rc += system("ip -6 route add 2003::/16 dev fslthr0");
    /* Thread */
    rc += system("ip -6 route add FD00::/16 dev fslthr0");
    rc += system("ip -6 route add 2001:DB8::/32 dev fslthr0");

    rc += system("ip link set fslthr0 up");
   

This is already available in Thread_KW_Tun.c file in thread-fw/MKW41Z_ConnSw_1.0.2/tools/wireless/host_sdk/hsdk/demo.

Please let me know if some other thing I need to do.

Regards,
Saurabh.

0 项奖励
回复