Google is committed to advancing racial equity for Black communities. See how.
本頁面由 Cloud Translation API 翻譯而成。
Switch to English

驗證端口

必須進行基本驗證,才能驗證OpenThread是否成功移植到新的硬件平台示例。

針對目標平台進行編譯

通過為目標平台編譯示例OpenThread應用程序來演示成功的構建。

./bootstrap
make -f examples/Makefile-efr32 COMMISSIONER=1 JOINER=1

與CLI交互

通過與CLI交互來演示成功的OpenThread執行和UART功能。

打開/dev/ttyACM0的終端(串行端口設置:115200 8-N-1)。鍵入help以獲取命令列表。

help
help
autostart
bufferinfo
...
version
whitelist

形成線程網絡

通過形成線程網絡並驗證節點已轉換為Leader狀態來演示成功的協議計時器。

dataset init new
Done
dataset
Active Timestamp: 1
Channel: 13
Channel Mask: 07fff800
Ext PAN ID: d63e8e3e495ebbc3
Mesh Local Prefix: fd3d:b50b:f96d:722d/64
Master Key: dfd34f0f05cad978ec4e32b0413038ff
Network Name: OpenThread-8f28
PAN ID: 0x8f28
PSKc: c23a76e98f1a6483639b1ac1271e2e27
Security Policy: 0, onrcb
Done
dataset commit active
Done
ifconfig up
Done
thread start
Done

等待幾秒鐘...

state
leader
Done

附加第二個節點

通過使用與第一個節點相同的線程主密鑰和PAN ID,將第二個節點連接到新形成的Thread網絡,演示成功的無線電通信:

dataset masterkey dfd34f0f05cad978ec4e32b0413038ff
Done
dataset panid 0x8f28
Done
dataset commit active
Done
routerselectionjitter 1
Done
ifconfig up
Done
thread start
Done

等待幾秒鐘...

state
router
Done

設備之間的Ping

通過發送/接收ICMPv6回顯請求/響應消息來演示成功的數據路徑通信。

列出Leader的所有IPv6地址:

ipaddr
fdde:ad00:beef:0:0:ff:fe00:fc00
fdde:ad00:beef:0:0:ff:fe00:800
fdde:ad00:beef:0:5b:3bcd:deff:7786
fe80:0:0:0:6447:6e10:cf7:ee29
Done

從路由器發送ICMPv6 ping到Leader的Mesh-Local EID IPv6地址:

ping fdde:ad00:beef:0:5b:3bcd:deff:7786
16 bytes from fdde:ad00:beef:0:5b:3bcd:deff:7786: icmp_seq=1 hlim=64 time=24ms

重置設備並驗證重新連接

通過重置設備並驗證其重新連接到同一網絡而無需用戶干預,從而演示非易失性功能。

啟動線程網絡:

dataset init new
Done
dataset
Active Timestamp: 1
Channel: 13
Channel Mask: 07fff800
Ext PAN ID: d63e8e3e495ebbc3
Mesh Local Prefix: fd3d:b50b:f96d:722d/64
Master Key: dfd34f0f05cad978ec4e32b0413038ff
Network Name: OpenThread-8f28
PAN ID: 0x8f28
PSKc: c23a76e98f1a6483639b1ac1271e2e27
Security Policy: 0, onrcb
Done
dataset commit active
Done
ifconfig up
Done
thread start
Done

等待幾秒鐘,並驗證活動數據集是否已存儲在非易失性存儲中:

dataset active
Active Timestamp: 1
Channel: 13
Channel Mask: 07fff800
Ext PAN ID: d63e8e3e495ebbc3
Mesh Local Prefix: fd3d:b50b:f96d:722d/64
Master Key: dfd34f0f05cad978ec4e32b0413038ff
Network Name: OpenThread-8f28
PAN ID: 0x8f28
PSKc: c23a76e98f1a6483639b1ac1271e2e27
Security Policy: 0, onrcb
Done

重置設備:

reset
ifconfig up
Done
thread start
Done

等待幾秒鐘,然後確認設備已成功重新連接到網絡:

panid
0x8f28
Done
state
router
Done

驗證隨機數生成

通過執行factoryreset命令並驗證新的隨機擴展地址來演示隨機數生成。

第0964章

等待幾秒鐘...

extaddr
9a8ed90715a5f7b6
Done