An accidental article talking about Bluetooth & the iWatch

Listening to the latest episode of the Accidental Tech Podcast today the topic of Apple's speculated "iWatch™" featured when talking about a recent Apple hire. One thing that was mentioned is that it is not clear how this would "work" with an iOS device stating that 'Bluetooth probably has something to do with it'. Bluetooth certainly has something to do with it and theres some interesting hints to go along with that.

Over the past 6 months I have been playing and experimenting with Apple's Core Bluetooth framework. It utilises the new Low Energy Bluetooth medium to be able to talk to external peripherals. This is already used in products by FitBit, Nike, BlueHR and many others which are primarily focussed around health & fitness monitoring.

However, Low Energy Bluetooth can do so much more than that and over the past couple of iOS releases has been hinting at the possibilities that Apple may be exploring in the future.

So here is what I have been thinking about over the past few months with all of the iWatch™ speculation. First, just an overview of what I'm talking about then into the finer details and hints over the past few years.

 

 

What is Low Energy Bluetooth capable of?

Here is Bluetooth's key features for its low energy technology:

  • Ultra-low peak, average and idle mode power consumption
  • Ability to run for years on standard, coin-cell batteries
  • Low cost
  • Multi-vendor interoperability
  • Enhanced range

Its a rather simple concept. Low Energy Bluetooth is designed to be basic in what it can deliver but in turn gain so much in energy efficiency. Primarily designed to send small, structured data and not stream large blobs.

As an example, a device as big as a 50¢ coin could be placed on a shelf and periodically advertise the current ambient room temperature for over a year, on one CR2032 battery. Requiring no "pairing", just scan for temperature sensors and the current temperature can be read automatically by another device.

With that said; it is capable of more than a couple of bytes of data. It is feasible and within its capability to transfer data that represents a contact card or a very small file - requiring some chunking to get it over in manageable pieces.

A lot of the technical detail has been glossed over but that hopefully should give a rough idea of how it is different to Classic Bluetooth and other technologies.

 

Hints over time

October 2011

The beginning of this story starts with the release of the iPhone 4S which shipped as the first mass-produced consumer Bluetooth Smart (4.0) device. At the time there was no Core Bluetooth framework. Moreover, this was not a hint as to Apple's ideas on making a wrist device however it did outline Apple's direction in adopting Bluetooth and its low energy capabilities.

Then in iOS 5 the Core Bluetooth API was revealed allowing developers access to talk to external peripherals in a simple and managed manner without worrying about energy consumption or getting MFi approval. However, the framework was quite basic, with no documentation and had its faults. It did not do much more than allow an application to talk to another device and didn't expose any system notifications.

April 2012

An interesting side story is that during Pebble's Kickstarter campaign there was no way that they could have gotten the notification information they needed for the watch with current API's. At that time they were looking like they would have to join the MFi programme which requires extra technology, Apple's blessing and get access to some very private APIs. Maybe they had inside info that what they needed, MAP support, was not far in the pipeline or just timed it perfectly.

September 2012

iOS 6 added much needed documentation and the MAP support that Pebble needed. This kick started the accessibility of Bluetooth on iOS and peripherals began to pop up. Early adopting fitness and health fanatics started exploring early peripherals focussed on tracking their fitness and sharing it with all of us on Twitter.

June 2013

We arrive at the recent release of the iOS 7 beta which more than ever cements Apple's choice for Bluetooth over technologies like NFC. But it revealed the much needed services for a wrist bound product:

  • Alert Notification Service
  • Apple Notification Service Centre
  • Current Time Service

These new services are available on all iOS 7 devices, with Bluetooth 4.0 (not the iPhone 4), by default and are managed by the OS.

 

 

The new iOS 7 services in detail

Going into individual detail about these services points out what each one achieves and how it can help build a wrist bound device.

Timekeeping

An absolutely obvious requirement for a wrist device is the Current Time Service which allows a "dumb" or Internet-challenged device the ability to sync their clocks with a connected service without themselves being directly connected to the Internet or timekeeping service. No need to manually set the time or even adjust it for DST changes or travel either, your primary timekeeping and connected device will do that for you.

Notifications

Apple chose to create their own notification service as they found the standardised Alert Notification Service lacking in capability and extensibility with iOS' wide spectrum of alert types and information. Although ANS has values "reserved for future use" it is too basic and generic to be able to handle Push Notifications for specific applications and display rich data.

If the idea of a wrist mounted device is to reduce the need to look at a larger format device in a pocket then having accommodating notifications with rich data displayed is key.

The Message Access Profile (MAP) available on Classic Bluetooth doesn't have the low energy benefits that are necessary for a device with limited volume for batteries.

 

 

What does it all mean? 

A smart wrist device needs a couple of things to live up to our basic expectations: timekeeping and notifications.

Both of these basic features are there in iOS 7 ready to be utilised. But its not just Apple that can use these services, any future wrist device made by any company can access these services. Not only is this a starting block for Apple but its a call to anyone that wants to make something to get started.

Even if we don't get the magical, revolutionary and stunning iWatch™ that has been speculated it won't be long before someone else makes it for us.

That's what I love about Low Energy Bluetooth, the GATT profile and its availability in iOS. It no longer requires the co-operation with Apple to be able to talk to third party peripherals and its all done with a technology that is open for any other device to use as well. 


Connect the world.  

Bluetooth love

Im sitting at my desk at work, half way through some feature to be deployed later in the day. I have an iPad and an iPhone on the desk with my Macbook Pro in a stand that I work on; Apple logos everywhere. With all these devices connected, syncing data, and monitoring my location; none of them know their context of where they are. They don't know the others are physically nearby. I'll get a mention on Twitter or a calendar event alert and 3 individual devices chime or grab my attention, all slightly staggered over a second.

Transient
 

Why?

It's not something I expect from these devices because it hasn't been offered before. If it "just worked" would I even notice it? Why don't these devices understand their proximity and context to their user, me? They could determine what device I am using and then only show notifications to that device. Cut down on the chimes and call to action from three devices to just one.

 

Understanding proximity

Right now; none of my devices understand that they are physically next to each other. They all have GPS and connected to the Internet so why not, with some iCloud magic, roughly understand that they are physically near each other. However, GPS is not well suited to work inside buildings. It's not capable of determining proximity with detail relative to me, within a few metres.

Once proximity is defined between the devices a "context" can then be established. This context is what device currently has my attention — what are my eyes looking at. Once defined, a decision to be made on how notifications are distributed and vocalised by a single device based on the context.

 

Attention to detail

Which device has my attention? That is the next problem to understand. It can be as simple as: which device did I last touch? But the last touched device may not always have my attention.

Here's an example; With my Macbook Pro on my desk along with my various mobile devices it's certain that I will be using the Macbook Pro and not a mobile device. Therefore the notifications should be sent to my Macbook Pro rather than a mobile device nearby.

The type of device needs to be considered when determining what device is more likely to have my attention when in use and in proximity to others. 

But there's a catch. With my day-to-day activities I often take a mobile device with me to a meeting or out to lunch. I haven't yet interacted with the device but its in my pocket and walking away from my desk. When a device leaves the proximity of others it should then reconsider which device now has the context. If I leave with just my iPhone then the context should switch to my iPhone. If I take a couple of mobile devices with me then the last one touched gets context.

"Touch" does not necessarily refer to physical touch. If a portable device has accelerometers or other physical sensors it can trigger a context reconsideration from significant activity. If I was to pick up my iPhone, triggering significant force on the accelerometer, it could then gain context without me even gesturing on the device itself.

 
Attention = Device type & Last Touch
 

How?

As a developer its hard not to just blurt out all the technicalities of how this will work, which is what previous revisions of this article degenerated into. I will try and stay as high level as I can and not go too deep. Its important to state that this is not theoretical; it can all be done and if no-one does it then I will.

Over a number of months I have been researching into how this could be possible. Initially I theorised basing the idea around GPS and then later WiFi with Bonjour but it just added complexity and didn't offer proper proximity down to human scale. It was a hack. But, after the iPhone 4S was released there was a new possibility which got me all excited.

Something that didn't go completely unnoticed at the iPhone 4S launch is that it had some updated connectivity. At the time it was pretty bleeding edge and today is still quite very new, a practice that Apple isn't afraid to perform. What I am talking about is Bluetooth 4 with Low Energy. To a select few, myself included, its something they can talk for hours about but to the rest it may seem like a pipe dream to match NFC or optical barcodes. Indeed it does have that same feel to it of "It's cool tech but why would normal people us it?" Moreover, why would my Mum use it?

Unlike NFC and optical barcodes, you don't actually have to use it to use it. You don't need to wave your phone at a tag or take a photo at a mosaic cubism portrait of black pixels. It doesn't require user action to operate and it doesn't degrade the experience of the device either. Two very good characteristics. But the iPhone 4S needed more than just the new chip to utilise the power of this new connectivity.

Something that has annoyed all iOS developers is that the Bluetooth stack on iOS has been private. You could only get access if you were certified with the "Made for iPod" programme which being apart of is a feat on its own. So along comes iOS 6 with a public API for interacting with the Bluetooth stack. But it wasn't what some were expecting.

 

Bluetooth on iOS 6, at last

Well mostly Bluetooth. As Apple always does, they put a lot of consideration and effort into their API's. No exception was yielded with this decision. Bluetooth 4 with Low Energy is what some would call a cut down version of the normal Bluetooth protocol. It only allows for very simple and non-streaming data to be transferred from one device to another.

Low Energy Bluetooth mostly takes the form of a simple broadcast/advertisement and listener service. The device advertises a service and its characteristics and other devices will listen to these advertisement broadcasts. All of this is short range and using as little power as possible on the host device.

One of the features that you can achieve with Low Energy Bluetooth is a proximity service. This has been shown in examples to act as simple locking mechanisms to more advanced awareness of other objects.

 

Putting it all together

If you've been following along you will notice that there is all the ingredients needed, from a technical point of view, to make this happen:

  • Short range proximity service: Bluetooth 4
  • Shared communication resource: iCloud
  • Sensors: Touch, Axis

The end result being that I can sit at my desk, working away, and I get iMessage, Calendar and email events all going to one device — the one I am using.

What a waste of fucking time and effort? Possibly, to some. It's not as essential or as obvious as, lets say, copy and paste functionality but if it was there I wouldn't expect anybody to point to it as a feature. At a deeper level I think you'll be aware of a calm and considered solution that therefore speaks about how you're going to use your device and not the terrible struggles that engineers faced in solving the problem.

 

Future of Bluetooth in iOS

I love how simple this new Bluetooth functionality is. Its a win for developers but more importantly its a win for users. No issues around battery consumption or device usability degradation in any way. These are the kinds of solutions that make it into iPhones and iOS. Its simple and it works.

This post was just one example of how the new Bluetooth functionality in iOS can be used. I am personally working on a few projects to leverage Bluetooth with Low Energy. I can't wait to show it off.

Some of the other cool ideas Bluetooth 4 can offer are things like:

  • Thermostats that announce the current temperature of the room, no pairing needed.
  • A whole range of healthcare devices from wireless heart and possibly ECG monitors, temperature sensors etc.
  • Home automation. Lights switch on when you enter the room by the presence of your iPhone/smartphone
  • Any sport sensor imaginable.

We are just beginning to see the start of the accessory revolution and Bluetooth 4 is going to give it one mighty boost. No doubt, most of the ventures into new accessories using Bluetooth 4 will start on Kickstarter.

If you're a developer and are mildly interested in using the Bluetooth API's then I recommend checking out the 2012 WWDC keynotes on the new Bluetooth API available to iOS developers in the ADC.

 

So after and thousand and three hundred words I think I have adequately expressed my love of Bluetooth 4 with Low Energy. It could all turn out to be yet another pipe dream like NFC and optical barcodes. I don't believe so, its got too much going for it.

"Watch" this space…

See what I did there…

I think its a missed opportunity that Apple did away with the watch form-factor of the iPod nano. It showed there was a market for smart watches and with the Pebbles success on Kickstarter it reveals theres a buck to be made too.

I get a weird feeling that this may have been intentional. Make the iPod nano back into an iPod and work on something specific and targeted.

But I cant leave it there; I have some thoughts:

Apple works on and releases their own smart watch. All of the usual Apple design DNA, thin and mesmerising. The connectivity will most likely use NFC…haha no… Bluetooth 4 with Low Energy. That allows for superior battery life and sufficient communication. Call and message notifications, a Mickey Mouse clock face and Nike+ integration. Basically a Pebble with multitouch and made by Apple. Put me down for 2, one for each wrist.

But, it could be one of those Apple things where they dont have passion to make something so they just dont make it. So who will step up to the challenge?