在Windows的WSL USB Manager中查看多出来的两个USB设备,右键点击,先bind,再Attach:
在WSL中检查:
$ lsusb Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 1915:0000 Nordic Semiconductor ASA Thread Co-Processor Bus 001 Device 003: ID 2fe3:000b NordicSemiconductor USB-DEV Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
检查Thread串口tty是否出现:
$ ls /dev/ttyACM* /dev/ttyACM0
然后检查蓝牙,你可以在bluetoothctl交互式命令中使用power on, list, scan on等进行测试,用exit退出:
sudo ip -6 route add fd11:22::/64 dev otbr0 via fd11:db8:1::2
这是一次性添加,每次重启WSL后要重新执行
检查路由表是否成功添加:
$ ip -6 route fd11:22::/64 via fd11:db8:1::2 dev otbr0 metric 1024 pref medium fd11:db8:1::/64 dev otbr0 proto kernel metric 256 pref medium fe80::/64 dev eth0 proto kernel metric 256 pref medium fe80::/64 dev veth2f60c62 proto kernel metric 256 pref medium fe80::/64 dev otbr0 proto kernel metric 256 pref medium
...... [1758729999.505] [6784:6786] [CTL] Successfully finished commissioning step 'SendComplete' [1758729999.505] [6784:6786] [CTL] Commissioning stage next step: 'SendComplete' -> 'Cleanup' [1758729999.505] [6784:6786] [CTL] Performing next commissioning step 'Cleanup' [1758729999.505] [6784:6786] [CTL] Successfully finished commissioning step 'Cleanup' [1758729999.505] [6784:6786] [DIS] Closing all BLE connections [1758729999.505] [6784:6786] [IN] Clearing BLE pending packets. [1758729999.505] [6784:6786] [BLE] Auto-closing end point's BLE connection. [1758729999.505] [6784:6786] [DL] Closing BLE GATT connection (con 0x74aa1c024530) [1758729999.505] [6784:6785] [DL] Close BLE connection: peer=DE:4A:50:3D:16:29 [1758729999.661] [6784:6786] [IN] SecureSession[0x74aa140054c0]: MarkForEviction Type:1 LSID:14320 [1758729999.661] [6784:6786] [SC] SecureSession[0x74aa140054c0, LSID:14320]: State change 'kActive' --> 'kPendingEviction' [1758729999.661] [6784:6786] [IN] SecureSession[0x74aa140054c0]: Released - Type:1 LSID:14320 [1758729999.661] [6784:6786] [CTL] Commissioning complete for node ID 0x0000000000000101: success [1758729999.662] [6784:6786] [TOO] Device commissioning completed with success [1758729999.662] [6784:6785] [DL] BLE connection closed: conn=0x74aa1c024530 [1758729999.662] [6784:6786] [DMG] ICR moving to [AwaitingDe] [1758729999.662] [6784:6786] [EM] <<< [E:35636i S:14321 M:191290806 (Ack:148794768)] (S) Msg TX from 000000000001B669 to 1:0000000000000101 [5CA5] [UDP:[fd11:22::ae46:4779:ebf3:9b3b]:5540] --- Type 0000:10 (SecureChannel:StandaloneAck) (B:34) [1758729999.662] [6784:6786] [EM] Flushed pending ack for MessageCounter:148794768 on exchange 35636i [1758729999.662] [6784:6786] [DL] HandlePlatformSpecificBLEEvent 16390 [1758729999.662] [6784:6786] [BLE] No endpoint for unsubscribe complete [1758729999.662] [6784:6786] [BLE] No endpoint for connection error [1758729999.662] [6784:6784] [CTL] Shutting down the commissioner [1758729999.662] [6784:6784] [PAF] WiFiPAF: Closing all WiFiPAF sessions to shutdown [1758729999.662] [6784:6784] [CTL] Shutting down the controller [1758729999.662] [6784:6784] [IN] Expiring all sessions for fabric 0x1!! [1758729999.662] [6784:6784] [IN] SecureSession[0x74aa1400e6f0]: MarkForEviction Type:2 LSID:14321 [1758729999.662] [6784:6784] [SC] SecureSession[0x74aa1400e6f0, LSID:14321]: State change 'kActive' --> 'kPendingEviction' [1758729999.662] [6784:6784] [IN] SecureSession[0x74aa1400e6f0]: Released - Type:2 LSID:14321 [1758729999.662] [6784:6784] [FP] Forgetting fabric 0x1 [1758729999.662] [6784:6784] [TS] Pending Last Known Good Time: 2023-10-14T01:16:48 [1758729999.662] [6784:6784] [TS] Previous Last Known Good Time: 2023-10-14T01:16:48 [1758729999.662] [6784:6784] [TS] Reverted Last Known Good Time to previous value [1758729999.662] [6784:6784] [CTL] Shutting down the commissioner [1758729999.662] [6784:6784] [PAF] WiFiPAF: Closing all WiFiPAF sessions to shutdown [1758729999.662] [6784:6784] [CTL] Shutting down the controller [1758729999.662] [6784:6784] [CTL] Shutting down the System State, this will teardown the CHIP Stack [1758729999.662] [6784:6784] [DMG] All ReadHandler-s are clean, clear GlobalDirtySet [1758729999.662] [6784:6784] [FP] Shutting down FabricTable [1758729999.662] [6784:6784] [TS] Pending Last Known Good Time: 2023-10-14T01:16:48 [1758729999.662] [6784:6784] [TS] Previous Last Known Good Time: 2023-10-14T01:16:48 [1758729999.662] [6784:6784] [TS] Reverted Last Known Good Time to previous value [1758729999.666] [6784:6784] [DL] Wrote settings to /tmp/chip_counters.ini [1758729999.666] [6784:6784] [DL] NVS set: chip-counters/total-operational-hours = 0 (0x0) [1758729999.666] [6784:6784] [DL] Inet Layer shutdown [1758729999.666] [6784:6784] [DL] BLE Layer shutdown [1758729999.666] [6784:6784] [DL] WiFi-PAF Layer shutdown [1758729999.666] [6784:6784] [PAF] WiFiPAF: Closing all WiFiPAF sessions to shutdown [1758729999.666] [6784:6784] [DL] System Layer shutdown