An experiment with the Web Bluetooth API.
I bought a Bluetooth-enabled BBQ thermometer on a daily-deal site a while back as a dumb impulse purchase.
To use it on a phone, you're supposed to download an app, but eff that noise.
I decided to see if I could get something working using the Web Bluetooth API. It's a little hacky, but it works! Tested on Chrome for Android, and OS X.
A few notes:
- Web Bluetooth API's not on by default, so I enabled it in
- Hope y'all like deducing values with no documentation, and that you learned about little-endian notation
- To actually get data from this thermometer you have to do a weird dance where you call
.startNotifications()in a particular order
- As mentioned there was no documentation, so this app to play with raw Bluetooth data was really helpful in figuring out what the hell was going on
- The BBQ thermometer didn't use a well-known GATT service, so I had to find the raw BT Service UUIDs, and hardcode them in the code
- Thermometer has two interesting characteristics (i.e. sensors), but don't try to connect to them at the same time; Chrome will yell at you, so you should do them in series. Chromium bug filed here.