Bluetooth is a really fascinating technology. It’s quite fliexible; you can use it to make phone calls, listen to music, connect a game controller, and just about a million other things.
Or at least you could if it worked reliably.
Unfortunately, as with any other wireless technology, flexibility correlates positively with complexity, and inversely with ease of use. I own dozens of gadgets that use bluetooth and sometimes it can be tricky to make them work together. My car for instance, has something like a 50% success rate for connecting to my phone on any given day, and even when it does connect, sometimes it doesn’t seem to properly detect which profiles my phone supports (so I’ll be driving along, listening to Pandora, and a phone call comes in, and I have to pick up the handset to answer like it’s the stone age.)
I can’t help but feel part of this is because bluetooth is ironically such a black box – we know these things are supposed to work together, but for the most part as consumers we don’t really know how or why, or more importantly, why they don’t work together. So I came up with a little prototype Android app I call BlueLogger:
It consists of a couple of BroadcastReceivers that listen for bluetooth events from the OS and keeps a log of them. It’s crude and far from feature-complete, but it’s already served as a handy tool in understanding a little bit more about the inner workings of the Android bluetooth stack. For example, did you know that if you leave the bluetooth menu, Android will stop an ongoing scan operation?
BlueLogger is available in the play store: https://play.google.com/store/apps/details?id=net.sigmabeta.bluelogger
And you can find the source code on github: https://github.com/sigmabeta/bluelogger