我正在努力与树莓派 3 建立 BLE 连接。
当我进行 1:1 连接时,它工作正常。
root@raspberrypi:~# hciconfig hci0 leadv
root@raspberrypi_SLAVE:~# echo "connect B8:27:EB:5D:C6:1E 1" > /sys/kernel/debug/bluetooth/6lowpan_control
root@raspberrypi:~# hcitool con
Connections:
< LE B8:27:EB:5D:C6:1E handle 64 state 1 lm MASTER
root@raspberrypi:~# ping -6 -I bt0 2005::b827:ebff:fe5c:b7a0
PING 2005::b827:ebff:fe5c:b7a0(2005::b827:ebff:fe5c:b7a0) from 2005::1 bt0: 56 data bytes
64 bytes from 2005::b827:ebff:fe5c:b7a0: icmp_seq=1 ttl=64 time=164 ms
64 bytes from 2005::b827:ebff:fe5c:b7a0: icmp_seq=2 ttl=64 time=89.1 ms
64 bytes from 2005::b827:ebff:fe5c:b7a0: icmp_seq=3 ttl=64 time=62.9 ms
64 bytes from 2005::b827:ebff:fe5c:b7a0: icmp_seq=4 ttl=64 time=85.6 ms
64 bytes from 2005::b827:ebff:fe5c:b7a0: icmp_seq=5 ttl=64 time=58.9 ms
--- 2005::b827:ebff:fe5c:b7a0 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 58.958/92.193/164.287/37.976 ms
但是当我连接 2 个或更多设备时,它不起作用!
root@raspberrypi:~# hciconfig hci0 leadv
root@raspberrypi_SLAVE2:~# echo "connect B8:27:EB:5D:C6:1E 1" > /sys/kernel/debug/bluetooth/6lowpan_control
root@raspberrypi:~# hcitool con
Connections:
> LE B8:27:EB:C2:60:83 handle 65 state 1 lm SLAVE
> LE B8:27:EB:5C:B7:A0 handle 64 state 1 lm SLAVE
root@raspberrypi:~# ping -6 -I bt0 2005::b827:ebff:fe5c:b7a0
PING 2005::b827:ebff:fe5c:b7a0(2005::b827:ebff:fe5c:b7a0) from 2005::1 bt0: 56 data bytes
^C
--- 2005::b827:ebff:fe5c:b7a0 ping statistics ---
28 packets transmitted, 0 received, 100% packet loss, time 28097ms
谁能告诉我如何使用 BLE 6LoWPAN 边界路由器连接多个设备。