2

I have used the raspberry pi to detect the ibeacons and gone through the tutorial provided by Radius Networks here. I made a small script that first turns on lescan and redirects output to /dev/null. Then it turns the hcidump on piping to the output to the script.

The output shown by the script is slow. While the advertisement packets are transmitted in magnitude of milliseconds, the result however on the terminal is slow. consequently, the command keeps on showing new output even if you turn off the transmitter. My understanding tells me that parsing takes its time, while the HCIDUMP data waits in the sed queue.

For proper action to trigger according to proximity, minimum parsing time is necessary so that all packets are parsed as they are received.

Have i missed something or parsing is faster if one uses the bluetooth development kit provided by Radius Networks? if so, what makes it faster?

Thanks,

Community
  • 1
  • 1

1 Answers1

3

You are correct, the output of the script does lag behind when detecting a large magnitude of iBeacon advertisements. The parsing script was written in bash for simplicity, and its speed suffers as a result -- piping to sed to store each identifier is slow and inefficient. The script was rewritten in Ruby for the Beacon Development Kit (now called the PiBeacon) and is much faster and more responsive. Ruby and other high-level level programming languages are more well suited for parsing and converting the raw iBeacon packet data. A disk image of the development kit with this new script is available to download here.

You can also try implementing another iBeacon Raspberry Pi scanning script, written in Python, that can be found here. I have yet to try this out myself, but it appears to be another good solution.

jjnebeker
  • 1,238
  • 1
  • 9
  • 12
  • Yes, I was thinking going Python. Following the pattern of inquiry-with-rssi.py format. From the understanding point of view, bash script is well done. Thank you for your help. – Asif Nadeem Jun 17 '14 at 11:18
  • Looks like the link to the Beacon Development Kit is 404-ing. After a bit of searching, this might no longer be available from Radius Networks. – Elliot Larson Dec 07 '15 at 22:44
  • @ElliotLarson you're correct the Beacon Development Kit is now sold as the [PiBeacon](http://store.radiusnetworks.com/collections/all/products/pibeacon). I'll update the link. – jjnebeker Dec 08 '15 at 15:45