4 ms·
I've used the Web Bluetooth API for three projects so far: 1) A friend had developed a custom LED-lighting device and written an iOS app to control it (to chan
by follower 10y ago
I've used the Web Bluetooth API for three projects so far:
1) A friend had developed a custom LED-lighting device and written an iOS app to control it (to change colour, brightness etc) but I had an Android device. I wrote a single file "app" to control it from my Android device--much quicker than using Android Studio or even React Native (which I tried for a later project). At a minimum a great way to prototype interfaces for new devices.
2) A colleague and I implemented an alternative single file web app for controlling a Bluetooth LE adult toy device when we discovered the original mobile app for the device was sending real-time usage data to the manufacturer without notifying users. We presented on this work at DEF CON this year. Links to the presentation video and source here: http://www.privateplayaccord.com/ http://www.privateplayaccord.com/
3) Based on the previous work, I wrote a hacky demo combining A-Frame VR and Web Bluetooth to create a Google Cardboard experience that involves following a robot around a scene and receiving..."positive feedback" when you catch it: https://github.com/privateplayaccord/robot-joy-factory-vr https://github.com/privateplayaccord/robot-joy-factory-vr
The last project I think is the best example of why Web Bluetooth is an intriguing development--it makes adding interactions with external hardware much more accessible to developers and provides the potential for a much smoother on-boarding process with new hardware.
There are clearly security implications with exposing this functionality and the standard does provide feature restrictions (e.g. web pages must be local or HTTPS; block lists for certain device types/characteristics) in consideration of this. Will all implementations be foolproof? Probably not.
Some notes from my Web Bluetooth development experiences if you want more detail: http://www.labradoc.com/i/follower/p/notes-web-bluetooth http://www.labradoc.com/i/follower/p/notes-web-bluetooth
I found this a super nice tool for getting started as it handles a lot of boilerplate: https://beaufortfrancois.github.io/sandbox/web-bluetooth/generator/ https://beaufortfrancois.github.io/sandbox/web-bluetooth/gen...
- stephenr 10y agoThe first two are essentially use-cases for one of the existing Cordova/PhoneGap Bluetooth modules.