Hello, whoever you are
Computers don’t have a great idea of what’s going on in the world. Sure, they know a ton of things – they can translate languages and operate complicated machinery – but knowing who is sitting in front of them? That one is a bit of a toughie, even for our smartest boxes.
So, how do we let our computers know whom they’re working with? Over the last few decades, whenever you’ve wanted to use a machine you will most likely have signed in to use it. Your username and password are the credentials that tell the computer who it’s dealing with, and allow it to adjust its operation to suit your personal needs. We have a problem with this way of working: you have to actively engage with the computer.
We in innovation like a little bit of magic in our day-to-day computing, so we’ve been looking into passive technologies, that is, devices that don’t require user intervention to act intelligently on that users’ behalf. For the past couple of weeks, we’ve been playing with some tiny little Bluetooth trackers that we managed to get our hands on. These little radios are the size of a two pence coin, have a reputed battery life of two years and can store and transmit little bits of data. Great! So we can transmit names!
Once set up, this tiny little radio can sit in your pocket and tell nearby devices who you are and roughly how far away you are. This means that with a handful of these beacons, any Bluetooth enabled device can passively track people around our offices and have devices react when they approach them. As a simple example of this, we’ve written a system that as each person approaches a machine, they are detected and greeted by name.
Bluetooth beacons
So why did we decide to go with Bluetooth as a means of tracking our users?
Well, it’s everywhere. Bluetooth is a supremely prevalent technology. Almost every modern device has some variation of Bluetooth operating within it; so, within reason, we can use any device to track any other willing device (ideally) without a great deal of fuss.
Bluetooth also has really low power requirements. Version 4 has been designed with low power in mind. In times gone by, whenever your smartphone had been drained of power a little too quickly, an errant Bluetooth process was the suspect cause – but now a coin battery can power a Bluetooth beacon for years! That longevity, ease of access and low cost of hardware made Bluetooth beacons the stand-out technology for our needs.
How it works
Traditionally, Bluetooth has been about pairing two or more devices together and exchanging information that has been requested. That connection, once made, remains open until either of the devices connected disconnects. This drains a fair amount of power from both devices, which isn’t great in our world of power-hungry devices.
The new Bluetooth spec works a little differently. Rather than having two devices that connect and pair with each other, you have two devices that fall into one of two categories: a central or a beacon. A beacon is a device which has data or services available for transmission, whereas a central is a device which requests and handles these services from the beacon. The devices connect, the requested data is transmitted, and then both devices close the connection and power down. With this architecture in mind, connections are shorter lived, much to the benefit of the on-board batteries.
Caveats
Reliably tracking radio beacons is a tricky business. Knowing something is nearby is pretty easy, but knowing in which direction is difficult without having other devices to help you figure out the beacon’s location. When tracking the distance of a beacon, we’re reading a value known as an R.S.S.I (Received Signal Strength Indicator). This value is the measurement of power in a received radio wave.
The problem with R.S.S.I is that it can vary greatly depending on a number of environmental conditions. Is there someone standing between you and the receiver? Are there many devices using a similar frequency nearby? Is it raining heavily? Is your battery running a little low? Each of these circumstances can affect the reading of the R.S.S.I, so you have to write software that can handle anomalous readings gracefully.
For all intents and purposes, the R.S.S.I is largely an arbitrary number. After some experimenting, we determined some values that were consistent with varying distances (near, leaving, far) and used them as a metric for interacting with our beacons, but due to the variable nature of the metric, this basically equated to educated guesswork.
Alternatives
We went with Bluetooth beacons but we did look at alternative technologies to achieve the same effect.
We could have used R.F.I.D tags. They generally have a greater reliability than Bluetooth, but hardly any non-specific device has the hardware necessary to read the data on the tags. The R.F.I.D tags work on a much shorter range – 1-3 feet as opposed to Bluetooth’s ~20 feet. So, great for short range, personal computing, but not for the more ambient, anticipatory experience we were looking to achieve.
Another approach we looked into was an app that would allow your smartphone to serve the same purpose as our Bluetooth beacons. Platform divides aside, we decided against this approach. Yes, there are more Bluetooth enabled smartphones than beacons, however, we felt downloading, installing and then setting up an app was one or two steps more than most people would be willing to go, especially when presented with the alternative option of picking up and carrying around a beacon in your pocket.
Also, people are quite particular when it comes to their device’s precious battery level. Although Bluetooth v4 has incredibly low power requirements, getting people to turn it on constantly has proved to be a challenge in itself.
Conclusion
So, what have we learned and where will this sort of thing go? Well, firstly, working with Bluetooth is hard – specifically, tracking things with Bluetooth is hard. When using Bluetooth in a more conventional manner, say, transferring a file from A to B, there’s little to go wrong; a dropped packet here and there can be compensated for. Compensating for environmental factors is a measure harder.
Another difficulty is finding compatible software libraries that we can use to write our software. Bluetooth LE is new and shiny but it stands on the shoulder of an old and extensive legacy. As such, most software drivers and libraries are designed for the older specifications and aren’t compatible with the new version. (We used a handy Node.js library called Noble to help our experiments.
As time goes on and more tools are created by smarter people than I, I’m sure it will be far easier to play with BLE than it is now. Where will this go? I’m not too sure. There are definitely benefits to having a computer know where you are. All of that Google Now locational magic is a great example of that, but will people start carrying around beacons? I don’t think they will. I don’t believe people want to add yet another gizmo to their ever-growing collection of the “Internet of Things”, and nor do I think that they’d be willing to spare some smartphone power for the same effect, but I could be wrong. 8 years ago you probably wouldn’t have bought a phone with a touch screen.