Raspberry pi3上的MQTT-SN,比BLE高6个小时

时间:2016-10-18 12:12:38

标签: bluetooth-lowenergy ipv6 mqtt

我正在尝试设置MQTT-SN代理(rsmb),并使用多个pi3作为客户端。

首先,我将建立一个6lowpan over ble连接。

设置pi3(RASPBIAN JESSIE内核v4.4)

sudo su
hciconfig hci0 reset
modprobe bluetooth_6lowpan
echo 1 > /sys/kernel/debug/bluetooth/6lowpan_enable
hciconfig hci0 leadv

BLE网关(Ubuntu 14.04)

sudo su
hciconfig hci0 reset
modprobe bluetooth_6lowpan
echo 35 > /sys/kernel/debug/bluetooth/6lowpan_psm
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
echo "connect *my_pi3_bluetooth_address* 1" > /sys/kernel/debug/bluetooth/6lowpan_control
ifconfig bt0 add 2001:xxxx:xxxx:xxxx::/64
service radvd restart

我的6lowpan over ble连接工作正常。

现在我想在此连接中使用MQTT-SN协议。

如果我只使用本地连接,那很好。

但如果我使用6lowpan而不是BLE连接,我认为有些数据包会丢失。

ERROR Keep alive error: timed out while waiting for a PUBLISH gateway

详细信息在此网址中。 Detail

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

我发现我需要拔掉网络电缆,一切都很好。