iBeacons (Good and Bad) Review and BeaconAir

iBeacon
RasPiConnect BeaconAir Screen

iBeacons Review and BeaconAir

I just finished the development of a new SwitchDocLabs project, BeaconAir.  BeaconAir is a portable Pi device to determine ones position in the house by trilateralation from three iBeacons.  The RasPiConnect BeaconAir control panel is below:IMG_0641

 

The BeaconAir RasPiConnect control panel has a number of interactive buttons, slide controls and the animated position map.  I highly recommend the use of RasPiConnect to build control panels for your projects.  Here is a tutorial I wrote for RasPiConnect. The Map contains light bulbs for Hue based lights (controlled by BeaconAir), iBeacon locations (programmed into the house model) and the red pin indicating the current location of the portable Pi.

Raspberry Pi
Portable Raspberry Pi

 

iBeacons BeaconAir
BeaconAir Logo

BeaconAir is a portable Raspberry Pi based project that reads the “advertising” packets emitted by iBeacons, roughly calculates your position and then turns on lights that are close to you using the Philips Hue system.

Philips Hue
Philips Hue Can Bulb

The Pi then calculates the brightness based on just how close you are.   The idea is that you can walk around your house with your Pi and the lights will follow you.

Philips Hue Hub
Philips Hue Hub

In other words, I am using iBeacons to figure out where my portable Pi is physically located (in a pouch on my hip as I walk around the house) and then I control various devices with the Pi.

I used two types of iBeacons, Estimote and KS Technologies Particles. Both worked adequately with regards to receiving advertising packets.

The figure below shows the iBeacons near to my lab bench using the BTLExplorer App on my iPhone from KS Technologies.

iBeacons
Nearby iBeacons

Note that we are picking up on Estimote beacon and two Particle beacons. Interestingly enough, we are also picking up an Apple TV located about 40 feet away. I was not aware that the Apple TV was broadcasting an iBeacon packet, but on checking it is used for an undocumented way of setting up the Apple TV from your iPhone.   The numbers from the Apple TV don’t make a lot of sense in the iBeacon advertising packet, but that is a problem for another day.

 

Estimote iBeacons

Estimote beacons are pretty cool looking, but the Estimote beacons have a proprietary interface that makes it NOT Linux and Rasberry Pi friendly The Estimote only supports a propietary SDK on Android and iPhone.   Of course, you can always roll your own using a Raspberry Pi.

Particle iBeacons on the other hand, allow access and modification of many parameters.  Much nicer for makers.

iBeacon
Particle iBeacons
Estimote and Particle iBeacons
3 Estimote and 2 Particle iBeacons

 

 

The big issue with this project was to be able to reliably read iBeacon data from a Bluetooth Dongle (I’m using an IOGear Bluetooth 4.0 USB Micro Adapter – Model GBU521).   A number of the methods out there on the web were less than satisfactory (doing hcidump scans) and often ended up hanging the Bluetooth on the Pi, requiring a reboot. Once I went to using my software library, I have zero hangups and the software runs for days.

 

iBeacons use Bluetooth Low Energy (BLE) protocols to communicate, which is a relatively new type of Bluetooth and has spotty support. Finally I stumbled upon a program using blueZ (Linux Bluetooth Library) native calls, that with a lot of modifications, bug fixes and cutting of code I didn’t need, I had a iBeacon scanner that worked every time. I have posted my working version on the SwitchDoc Labs github (https://github.com/switchdoclabs/iBeacon-Scanner-) so you can download it and test your setup.

Conclusion

Based on the above, I recommend the Particle iBeacons because you can read and write to the devices from the Raspberry Pi.

However, any iBeacon signal reception will vary.  The signal strengths will vary a great deal even if you are just just sitting in one spot.  You can watch the little red pin bounce around on the RasPiConnect control panel.  A good deal could be done to smooth this out by doing a little signal processing at the cost of response time.  It certainly makes an interesting demo to show people.

2 Comments

  1. Thanks for the post John, Great work!

    I have been working on your iBeacon scanner code and made some change based on it.
    That was very helpful.

    You mentioned that with Pi you can actually not only scan and read information from iBeacon (in your case, Particle), how did you actually do that? I read through your ibeacon scanner python code and even the origial adamf’s ble scanner code which your work based on and didn’t see anything about write to the device.

    can you give me some suggestion?

    Thank you very much for your help in advance

    • Jason,

      I never implemented a write feature when I figured out the Estimote iBeacons were closed source. You can write to the Particle Beacons, but I have not done that.

      John

1 Trackback / Pingback

  1. BeaconAir - Reading IBeacons on your Raspberry Pi - SwitchDoc Labs

Comments are closed.