1

I'm trying to make Raspberry ibeacon and setup was completed. But I cannot see any beacon on iPhone 4S (iOS7.1). The app I'm using is Locate iBeacon (from Radius Networks) and I registered my UUID in the app for searching.

There are bunch of questions and answers in StackOverflow but those won't help me. Or I could not find things for my case, really sorry but please help me kindly. I tested Raspberry, Fedora with CSR and broadcom BT4.0 dongle. And tried remove or add paddings after power value at end of command. Also I tried sample UUIDs in the app for my command. But result were same.

root@raspberrypi:/home/pi# hciconfig
hci0:   Type: BR/EDR  Bus: USB
BD Address: 00:19:0E:14:BD:AD  ACL MTU: 1021:8  SCO MTU: 64:1
UP RUNNING 
RX bytes:85780 acl:42 sco:0 events:2848 errors:0
TX bytes:4651 acl:40 sco:0 commands:207 errors:0

root@raspberrypi:/home/pi# hciconfig hci0 leadv 3

root@raspberrypi:/home/pi# hciconfig hci0 noscan

root@raspberrypi:/home/pi# hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 E2 0A 39 F4 73 F5 4B C4 A1 2F 17 D1 AD 07 A9 61 00 00 00 00 C8 00 00 00 00 00 00 00 00 00 00 00 00 00

< HCI Command: ogf 0x08, ocf 0x0008, plen 44
  1E 02 01 1A 1A FF 4C 00 02 15 E2 0A 39 F4 73 F5 4B C4 A1 2F 
  17 D1 AD 07 A9 61 00 00 00 00 C8 00 00 00 00 00 00 00 00 00 
  00 00 00 00 
>HCI Event: 0x0e plen 4
  01 08 20 00

and I entered the UUID E20A39F4-73F5-4BC4-A12F-17D1AD07A961 in the app.

Someone have any advice?

FYI, l2ping to my iPhone is OK as below

root@raspberrypi:/home/pi# l2ping C8:33:4B:40:B6:5A
Ping: C8:33:4B:40:B6:5A from 00:19:0E:14:BD:AD (data size 44) ...
44 bytes from C8:33:4B:40:B6:5A id 0 time 723.65ms
44 bytes from C8:33:4B:40:B6:5A id 1 time 158.29ms
44 bytes from C8:33:4B:40:B6:5A id 2 time 185.56ms
44 bytes from C8:33:4B:40:B6:5A id 3 time 129.81ms

Thanks.

Gab
  • 5,604
  • 6
  • 36
  • 52
Logan Yoon
  • 25
  • 5

1 Answers1

3

EDIT: The solution ended up being simply rebooting the iPhone as discussed in the comments below.

Unfortunately, an iPhone with Locate for iBeacon (or similar iBeacon apps) is not a very good troubleshooting tool for testing whether your Raspberry Pi is transmitting. It will only give you a confirmation if absolutely everything is working perfectly with a full UUID match.

It sounds like you have done your homework on making sure the advertisement configuration is not malformed. The next possibility is that your Raspberry Pi is not transmitting advertisements at all.

You need to verify that your Raspberry Pi is actually transmitting any advertisements with your BLE dongle. Lots of things could make this fail including the BLE stick hardware, BlueZ configuration, etc. There are some Bluetooth LE scanning apps for iOS (none free, unfortunately) that might tell you if your unit is transmitting advertisements at all, but iOS does not let you see the raw bytes of the transmission so these apps can't tell you if the advertisement is malformed.

There are also apps that can do this for OSX, Android, and Linux. (Heck, if you have a second Raspberry Pi, you can just enter the command sudo hcitool lescan --duplicates to see all advertisements.)

Finally, one quick thing you can try to make sure your bluetooth stick isn't in a bad state is to issue the folowing before the other commands:

hciconfig hci0 reset

If you get totally stuck, Radius Networks can ship you a SD card with known working software for $20. Or a full assembly for $100. You can get a Bluetooth dongle that is known to work here.

Full disclosure: I am Chief Engineer at Radius Networks.

davidgyoung
  • 63,876
  • 14
  • 121
  • 204
  • David! Thanks for your advices. I had another set of linux box and run the scan using your script. It show exact UUID as below. It means the raspberry and BLE dongle seems to have no problem. – Logan Yoon Mar 28 '14 at 14:30
  • [root@localhost ~]# hcitool lescan --duplicates & [root@localhost ~]# ./ibeacon_scan Set scan parameters failed: Input/output error 00:19:0E:14:BD:AD (unknown) 00:19:0E:14:BD:AD (unknown) UUID: E20A39F4-73F5-4BC4-A12F-17D1AD07A961 MAJOR: 0 MINOR: 0 POWER: -56 00:19:0E:14:BD:AD (unknown) UUID: E20A39F4-73F5-4BC4-A12F-17D1AD07A961 MAJOR: 0 MINOR: 0 POWER: -56 00:19:0E:14:BD:AD (unknown) UUID: E20A39F4-73F5-4BC4-A12F-17D1AD07A961 MAJOR: 0 MINOR: 0 POWER: -56 00:19:0E:14:BD:AD (unknown) UUID: E20A39F4-73F5-4BC4-A12F-17D1AD07A961 MAJOR: 0 MINOR: 0 POWER: -56 00:19:0E:14:BD:AD (unknown) – Logan Yoon Mar 28 '14 at 14:35
  • So, My other question is whether the apple ibeacon API at iOS7.1 on iPhone 4S may work differently..? David, Did you or your team test iBeacon with your app(locate iBeacon) on iPhone 4S with iOS7.1? – Logan Yoon Mar 28 '14 at 14:49
  • Yes, I actually use an iPhone 4S with iOS7.1 as my primary testing device so I know a Raspberry Pi iBeacon transmitter works well with that configuration. Have you tried a different iBeacon source to see if your iPhone can pick it up? – davidgyoung Mar 28 '14 at 15:19
  • David, thanks. I already ordered estimote 2 weeks ago.. not yet arrived : ( If I fail with it and estimote app, My iPhone 4S would be malfunctioning.. – Logan Yoon Mar 28 '14 at 16:32
  • I know it sounds like a cop-out, but also try rebooting your iPhone. I have heard other folks report that this fixed a temporary inability to locate iBeacons. – davidgyoung Mar 28 '14 at 19:37
  • Wow. After reboot the iPhone, It works : ) I don't know why I could not think about rebooting my iPhone 4S. I happy I can forward to next actual development work. David thank you for your insight. – Logan Yoon Mar 29 '14 at 16:05
  • Sometimes it is the simple solutions. Glad you have it working! – davidgyoung Mar 29 '14 at 18:33
  • Having the same problem in locating iBeacon on iPhone 4S and every time it required to reboot the phone to detect iBeacon. :( – sibley Apr 02 '14 at 03:13
  • @sibley, does turning Bluetooth off and back on help, or do you need a full power cycle? – davidgyoung Apr 02 '14 at 11:46
  • @davidgyoung: no, turning bluetooth on and off doesn't help. Full power cycle < do you mean to hold power button and home button to perform a hard reset? Here's what I did after I saw this thread to reboot iPhone 4S: 1) Proper shutdown and turn on on 02 Apr, it works. I worried it will required me to reboot again the device thus I keep the bluetooth on until the next day but it can't detect iBeacon again. So, 2) Hard reset on my iPhone 4S. Today the same things happened. – sibley Apr 04 '14 at 03:06
  • Btw, there is no problem for this iPhone 4S to work as iBeacon Transmitter all these while >"< any ideas? – sibley Apr 04 '14 at 03:14
  • @sibley, it is probably worth making this a new question. This is getting kinda long. I do have other ideas. – davidgyoung Apr 04 '14 at 03:16
  • After quite a few hours of debugging, rebooting my iPhone worked for me too. Thanks for the advice! – mitchellallison Apr 17 '14 at 05:27