TI中文支持网
TI专业的中文技术问题搜集分享网站

Thread 入门实验

硬件:

2 x CC26X2R1 LaunchPad

www.ti.com/…/launchxl-cc26x2r1

1x CC2531 USB Evaluation Module Kit

软件:

抓包:TiWsPc Wireshark

如何抓包可以参考:e2echina.ti.com/…/150032

基于simplelink_cc26x2_sdk_2_10_00_44:cli_ftd 与 door_lock

具体过程:

1.CLI FTD设置Thread 网络:

1.	> channel 14
2.	Done
3.	> panid 0xface
4.	Done
5.	> ifconfig up
6.	Done
7.	> thread start
8.	Done
9.	> state
10.	detached
11.	> state
12.	leader
13.	>

2.启动Door Lock

3.设置Coap Servers

下面的过程如果设置了预编译ALLOW_PRECOMMISSIONED_NETWORK_JOIN就可以跳过了。

  1. Set up a LaunchPad as a CLI FTD device by following the READMEs files in the respective application folder.

  2. Load and run the DoorLock example on a second LaunchPad.

  3. The Door Lock will print out the device’s EUI64 and the application’s PSKd (pre-shared key device identifier) over the 

    pskd: DRRLCK1 EUI64: 0x00124b000f6e6113

  1. Start a commissioner on the CLI FTD by issuing the following command.commissioner start It will displayDone if it is successful in starting the network.

  2. Add DoorLock LaunchPad device as a joiner device by providing the EUI64 and pskd as credentials to the commissioner.commissioner joiner add 00124b000f6e6113 DRRLCK1 It will displayDone if it is successful in adding the joiner entry.

  3. Now on the Door Lock LaunchPad, pressBTN-2 to start the joining process. The display will showJoining Nwk ….

  4. Once the joining process has successfully completed, the LCD will displayJoined Nwk before switching to the door lock image. The green LED should turn on on the door lock LaunchPad once it has joined the network.

  5. Next we need to get the IPv6 address of the door lock LaunchPad. Use the commandping ff03::1 to send an ICMP echo request to the realm-local all nodes multicast address. All devices on Thread network will respond with an ICMP echo response. You will see in the terminal a response like the one below.

8 bytes from fd00:db7:0:0:0:ff:fe00:b401: icmp_seq=1 hlim=64 time=11ms

抓包分析:

 4.获取以及设置Door Lock

抓包观察GET以及POST:

综上演示完成,上述设备地址以 pskd: DRRLCK1 EUI64请以实际操作为准。此外通过抓包可以发现这个POLL的间隔很长 ,低功耗性能很好。

如果有问题欢迎指出。

Susan Yang:

谢谢分享!

gaoyang9992006:

谢谢分享。

赞(0)
未经允许不得转载:TI中文支持网 » Thread 入门实验
分享到: 更多 (0)