This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Thread 入门实验

Other Parts Discussed in Thread: CC2531, CC2531EMK

硬件:

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 display Done 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 display Done if it is successful in adding the joiner entry.

  3. Now on the Door Lock LaunchPad, press BTN-2 to start the joining process. The display will show Joining Nwk ....

  4. Once the joining process has successfully completed, the LCD will display Joined 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 command ping 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的间隔很长 ,低功耗性能很好。

如果有问题欢迎指出。