UP24 Hacking
Intro
Last month I received a Jawbone UP24 as a birthday gift, and after a couple of weeks of standard use I couldn’t resist digging into its technical side to discover how this device actually works.
As far as I could tell, the UP24 has a 3-axis accelerometer, 2 notification LEDs, a vibration motor and a Bluetooth LE interface to communicate with the companion smartphone app “UP” (available for Android and iOS). Technical readers can find further info and a complete teardown of the low-end version of UP24 (the older UP) here.
Part of the UP24’s strength is its great companion app, which lets users configure alarms and notifications in response to activities or events. Two great features are the smart alarm, which chooses the best time to wake you up in the morning, and idle notifications, which remind you to stretch your legs after sitting still for too long.
The UP24 is definitely meant to be an activity band, and I think this is the only reason why the folks at Jawbone decided (at the time of writing) not to provide some extra features I’d find useful, like notifications for emails, SMS, calls, etc.
Beginning
I wanted to use my UP24 as a notification device for messages from some of the contacts on my Android phone: something simple, like a vibrate on SMS.
So, as usual, the first question is:
“has someone already solved my problem?”
Googling around, I found something here and here. Perfect! Except there was no code available, and it was the wrong OS :)
However, thanks to these posts I knew it was possible to make my UP vibrate on command, through some custom Bluetooth LE command.
Learning
After learning the basics of Bluetooth LE (here’s one of the most interesting articles I found), I needed to find out how to use it on Android.
I found a great example and all the necessary documentation here, and after installing Android Studio I was ready to start!
Doing
Using the example from the Android SDK, I was able to list all the services of my UP24 in a matter of minutes. However, I still didn’t have a clue which services, attributes and values I had to use to make the UP24 vibrate.
Then I thought of debugging the process on my phone
to see what was happening behind the scenes while issuing a vibrate command. Note that there isn’t any vibrate command in the UP application, but I noticed that the band vibrates after a successful Bluetooth pairing, and that was exactly the reaction I wanted for my custom-notifications app.
After connecting my phone to the Android Studio debugger, I set a breakpoint in the UP process on the BluetoothGatt.writeCharacteristic method. This made everything a lot slower on both my old phone and my laptop but, in the end, after a successful pairing, I got what I wanted :)
-20 32 8 16 4 53 1 0 16 0 1 125.
And by the end of the day I was able to record the video at the top of this page.
Epilogue
I’m still writing my custom-notifications app, but I’m not releasing any of its source code because of possible legal issues. However, any mid-level programmer should be able to achieve the same results just by following the steps in this post.
Assignment
I also ran some experiments to reverse engineer a couple of the sniffed values. What happens if you change the previous value to “-20 32 8 16 4 53 1 0 3 0 1 125” ? :)