With the introduction of iBeacons a new level of spacial awareness comes to iOS. It’s a meaningful extension to CoreLocation’s underlying technologies like GPS and Wifi Triangulation. iBeacons provide centimeter grade accuracy and even extend location services to indoors.
This however comes with one caveat. Unlike the existing location services you need to build upon your own infrastructure of iBeacons. As long as no objects and furniture come with emitters built-in you can do this by using dedicated iBeacons. Fortunately iBeacons are based on a simple open standard allowing them to be low energy and relatively inexpensive. This is possible because an iBeacon does not receive or compute any data. It solely broadcasts its identity. Over and over. All processing is done on the side of an app set up to recognize specific iBeacons.
Besides its identity the only variable data you can get from an iBeacon is its measured signal strength. iOS turns this into a surprisingly accurate estimate of proximity in meters. Expect about 0.1 m or less in terms of precision.
But no magic involved. Walls will of course damp the signals and distort the estimated proximity significantly. But at times this can also come handy, allowing for easier separation of ranged iBeacons by room, especially as there’s no sense of direction tied to the signal.
If Bluetooth is enabled, iOS constantly monitors all possible iBeacon signals around. About once every second you get updated scanning results. They are filtered by the iBeacons’ primary identifier, the UUID . UUIDs look like this: 187FA1EC-2B52-4E33-9478-A97BDB29E1E6.
Ideally all your iBeacons have the same UUID. It is possible to have your app listen to multiple UUIDs but the amount is limited and you also might save a tiny bit of battery life reducing the list of monitored UUIDs.
As the UUID is most likely shared between all your iBeacons, you need additional identifiers to differentiate individual ones: The numerical Major ID and Minor ID are here to help. A meaningful system would be e.g. to use a Major ID for each room/location and a Minor ID for the specific placement spot of your iBeacon. This is also what Apple recommends.
However also keep in mind that there are totally different use cases where the beacon is attached to a moving object like a train, a bike or a bagpack. So it’s really up to you to come up with a 3 tier identification system that fits your need best. Granted of course the iBeacons you use let you do these choices – and they really should.
101% secure …
First signs of a controversial discussion around this level of control and potential security issues by imitating existing iBeacons IDs turned up recenly on Estimote’s SDK Github page.
You should definitely be aware of the fact that every iBeacon can be cloned by simply knowing it’s UUID. Major and Minor ID can then be tracked down. Therefore you should rather see iBeacons as simple location based app triggers than as potential integral part of some super secure personal identification setup. Tell them, we warned you.
And here comes the fun part. Your app can tell iOS to wake up in the background on entering or exiting the range of an iBeacon or when the lock screen is shown. The app then will be granted a tiny bit of background processing you can use e.g. for logging or throwing a local notification, providing an iBeacon-aware path back into your app.
While this might sound quite limiting it actually is a nice compromise between making iOS and the user aware of a potential action but without getting overly invasive.
Alright. So we now know something about the nature of iBeacons as well as available options to get them running. High time to think of some good use cases and start creating!
Welcome to our new ‘area of intense interest’. iBeacons. Introduced with iOS 7, this Bluetooth based standard enables a new level of location and micro-location awareness for apps. Currently we do some early experimentation to get a grip of what can be done and getting a feeling for its limitations.
Although iBeacon as a standard is pretty young, it’s easy to get started. You might be surprised how many devices you already own that can easily be turned into iBeacon emitters.
This is of special interest for those of us who like starting to build apps and those who test an iBeacon enabled app that some nice people ¹ built for them.
Mac OS X
The option to turn your Mac into a iBeacon isn’t a system setting just yet. Count the days … . In the meanwhile Matthew Robinson wrote a simple Beacon Emitter app. You can set all relevant beacon attributes, like UUID, major and minor ID to broadcast. You might not want to have this running all day but it’s great for testing. Read about the Emitter and its code on his blog. Thanks Matthew!
→ Requirements: Source code, Xcode to build the app.
iPad, iPhone or iPod touch iOS
Beacon Emitter is a simple iBeacon emitter app for iOS. It’s based on Apples iBeacon example project “Air Locate” from this year’s WWDC. It’s a great starting point for creating your own iBeacon enabled app. In order to work the Beacon Emitter app needs to be active and in the foreground.
→ Requirements: Source Code on Github, Xcode to build the app, a device running iOS7.
Raspberry Pi + Bluetooth USB Dongle Linux
If you are still looking for a reason to get a Raspberry Pi, this might be a good one. It’s probably the most inexpensive – yet time consuming – way to get an always-on beacon running.
The Pi is a fun tiny machine. However there are some flaws to be aware of. The OS (Raspbian) runs from an SD Card, which implies a quite limited life-time. When you unplug the Pi a few times without shutting it down from the command line first, file system corruption is very likely. In that case your Raspberry Pi won’t boot anymore. You need to reformat and start over.
Power. First we were excited seeing the Pi powered by the minimalism of a USB jack only. What’s the point of those bulky external power bricks, anyhow. Well, no so fast, please. It turns out that the power from USB just isn’t stable enough for solid constant use. If you connect any additional USB dongles like Bluetooth, you will run into power fluctuation causing instabilities or random crashes. We ended up using an externally powered USB hub for those peripheral devices making it much less compact as we had wished for, but much more stable in the end.
And … as with all Linux hardware you’ll have this fun and nerve wracking buying experience of finding compatible hardware based on chipsets, rumors spread in forums and wiki pages. Be ready to dive in. This one worked for us: Plugable USB-BT4LE
→ Requirements: Raspberry Pi (A or B Model), Bluetooth USB Dongle, Script
While you could consider the other options as too hacky for constant use, the Estimote isn’t in that same category. It’s a fully integrated and dedicated beacon. It’s a well designed product with a clear focus and finally, low energy consumption. The level of integration comes with some compromises regarding the control you have over its inner workings. In contrast to the other options you cannot set the UUIDs manually. That’s a limitation as Apple’s recommendation is in deed to use one UUID for all devices of one use case. Also the Estimote doesn’t come with an official way to replace its battery.
If the battery is running out of power, it will let you know. You don’t have to change it, because in two years sensors will be more advanced and you can get a new version. If you want you can always open it. – Estimote, FAQ
Fair enough. But from a sustainability point of view this feels a bit disheartening. That being said Estimotes might still be the best stand alone beacons you can currently get. It’s a very smart move from Estimote to make their beacon small yet very appealing and recognizable. It’s an inspiring little thing. Kudos.
In addition to the beacons there is also a Virtual Beacon App that shows potential beacon use cases plus functions as emitter, monitoring and setup tool for Estimote beacons.
→ Requirements: Estimote Dev Kit, Estimote Virtual Beacon App
Mac iOS Device Raspberry Pi Estimote ———— ———— ———– ———– Battery Run Time Hours Hours Minutes Months Custom UUID Yes Yes Yes No Price min. 629€ min. 240€ min. 50€ 134€ (3 beacons)
While there’s no shortage of options for testing, having a beacon for constant usage is a whole different story. We are still evaluating all available beacon options. If you have experiences with other alternatives, please let us know.
¹ *wink* ;)
This goes out to all developers and designers dealing with … screens!
For pure relexation we just built a little online generator for creating rulers to measure distances in pixels on your screen. No software required. Just download a ruler template generated for the dpi you enter, print the PDF and start to measure margins, paddings and CGRects on your iPhone, Macbook, or any other screens.
→ Go to our Pixel Ruler Generator page and give it a try
Context At moment we are working hard on an a major update of Pinning and another super secret project. To stay fresh and keep our minds from running into the infamous reality distortion field we created a new Labs page that will feature tools and scripts we built as side projects worth sharing. This Pixel Ruler Generator is the first one.
Have fun measuring.