Raspberry Pi iBeacon connection timing out

倖福魔咒の 提交于 2019-11-28 20:53:33

Try setting the device to "advertise and not-connectable" (3 instead of 0) instead of "advertise and connectable"

sudo hciconfig $BLUETOOTH_DEVICE leadv 3

We suddenly had a beacon going down after a few seconds due to a laptop trying to connect. Setting the device to not-connectable solved the problem.

Looks like you have it solved but I'll go ahead and post for others that may have the same problem I did and find this thread.

Like Chris, I completed the steps from the tutorial with the exception of using bluez 5.11. After some experimentation I had to change the order of the steps in the "start" script. Not sure why but this seems to be the only order in which it will work correctly. Maybe I did something wrong?

#!/bin/sh
. ./ibeacon.conf
echo "Launching virtual iBeacon..."
sudo hciconfig $BLUETOOTH_DEVICE up
sudo hciconfig $BLUETOOTH_DEVICE noleadv
sudo hciconfig $BLUETOOTH_DEVICE leadv 0
sudo hcitool -i hci0 cmd 0x08 0x0008 1e 02 01 1a 1a ff 4c 00 02 15 $UUID $MAJOR $MINOR $POWER 00 00 00 00 00 00 00 00 00 00 00 00 00
echo "Complete"

Perhaps you can stop this from happening by making whatever device is attempting a connection stop doing so. This is not normal for iOS. Did you tell it to attempt a connection? Are you sure it is the iOS device doing this? Perhaps it is your computer?

Alternately, if you cannot get it working yourself, I can provide a free .iso file with the exact code we put on the units we sell preassembled. This could eliminate a build problem. Please send a note through our sales contact if you want to try this.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!