HACKER Q&A
📣 onepaulmbw

Building Bluetooth web applications for health monitors


Tl;dr - I'm looking to build a simple app that reads from a blood pressure monitor, and displays the value. I'm a software engineer by trade (React + NodeJS), and so my inclination is to build an app using React Native and figure out how to connect it to my blood pressure monitor.

However, I'm thinking about if this can be done over the web with a simple html file and the Google Bluetooth API. My question is, what are people's experiences with building bluetooth-enabled apps on the web? Did you have any security concerns if any? Did you build a web app and decided it was too much effort, and default to building a native/cross-platform app?


  👤 sqrtc Accepted Answer ✓
I think if you’re planning on using this for personal use, and willing to accept the (slight) inconveniences associated with it, then this is likely very possible. Note that you’ll likely only be allowed to use the Bluetooth API in secure context, so HTTPS rather than file://[0]. I point this out as you’ve said a simple HTML page.

I recently built an application involving BLE (although not in a browser), and was quite surprised by how straightforward it can be. I’d recommend O’Riley’s Getting Started with Bluetooth Low Energy[1] as a quick skim to understand the core BLE concepts.

If you’re unsure how your device’s services and characteristics are set up, then using a decent inspector app is good if you’re trying to reverse engineer the values, I recommend BT Inspector[2] but unfortunately it’s iOS/MacOS only.

[0] https://developer.chrome.com/articles/bluetooth/#https-only

[1] https://www.oreilly.com/library/view/getting-started-with/97...

[2] https://apps.apple.com/gb/app/bluetooth-inspector/id15090850...