Experimenting with Bluetooth in JavaScript in web, hybrid and React Native apps
voorhoede.nl
voorhoede.nl
From arduinos to music key pads, IoT devices, pocket oscilloscopes, sensors, etc.
I assume like webBLE, that webUSB is Chrome only?
We tried a similar method of playing audio from the browser when its actually serial data. I think there are a few arduino platforms doing this now and it works on PCs and phones.
Yes, unfortunately it is Chrome only. The good news is that our device didnt really have to change at all to support Chrome. Most hardware devices' bootloaders support DFU (Device Firmware Update) so all we had to do was support DFU on our website.
Does the end-user know about this? Your comment doesn't make this clear to me.
Unless it's designed with safeguards in place from the start to protect against advertising/tracking abuses, I would rather this wasn't in my browser at all.
Last thing I want is for a random website to hijack my bluetooth speaker and start blaring out an advert at me.
I you know of any real (not theoretical) threads, let us know. Until then I (we) enjoy the convience of modern technology.
I'm sure a lot of people also don't realize that Google Chrome has had, for many years, an extension API for accessing USB devices. Has it been a problem? No.
This is just another communication protocol. It's reasonable for browsers to provide a strictly controlled environment to utilize it.
Google, Facebook, and many other technology companies, have conditioned users to click 'Yes' and 'Accept All' and 'Share' such that we can no longer use such prompts to block malicious actors from our computer systems.
I do not trust software engineers to make the correct choice between "ooh a cool feature" and the general well being and privacy of their users. There has been too much precedent and incentivization for the former, including massive profit and promotional tracks.
The beacon sends out a signal which is a the same as the connection advertising format, but with the CONNECTABLE bit turned off. This gives 20-30 bytes or so of data you can stuff out there along with the UUID.
The app typically listens for UUIDs of beacons it cares about, and when it sees it, collects the one-way device to app beacon data. Then does something with that -
It's just that the "something" is usually reporting to a website that the beacon has been seen. This is entirely how TILE find-it tags work.
So the threat model here is that if you can get someone to go to your website, you could potentially see what BLE beacons are near that device and report them.
I am not sure if SCANNING requires user consent - or just connection event does.
If every shady website has the ability to perform surveillance through personal devices, it will happen a lot. Because it happens a lot, people will get used to it. Once people are used to it, they will accept it. Once they accept it, it will be acceptable. Once it becomes acceptable, Apple and Google will do it. Once Apple and Google do it, it will be impossible for anyone to escape, short of becoming a digital hermit.
Amusingly, the commentor you're replying to also agrees (while disliking it) in another thread[0]:
> It's just too bad Apple has turned from an early adopter to a slow follower regarding Web API's
In the sense of maintaining my privacy (and security!), I'm personally glad. I'd rather fewer features today in exchange for fewer privacy (and security) breaches tomorrow. Not that Apple's software QA has been great these days anyway...
On the other hand it's also something that lowers the barrier-of-entry to BLE hacking to something that people like me can do.
[1] https://support.google.com/chrome/answer/6362090?co=GENIE.Pl...
Second, PWA / webBLE / physical web whatever does have protections in place. Iirc you must be explicitly paired using BTLE 4.2 encryption and the connection must be explicitly created by the user.
[1] https://gist.github.com/sbrichardson/6e8ad851311235eee5a63c7...
Is that one of those Chrome-only API's? If so, it's not really "web" at all.
It's kind of weird that we seem to be going down the path of Google/Chrome = Web. We already know how this story ends.
What about programming your remote from your desktop without having to install programs and drivers? And the producer not having to develop software for various operating systems? (Windows, macOS, Android, iOS, Linux...).
Think about timer switches. Setting up the timers with your phone is easier than on the switch itself. And it's probably cheaper to produce.
It's just too bad Apple has turned from an early adopter to a slow follower regarding Web API's which makes it harder for manufacturers to go the Web Bluetooth route.
Why not?
WebBLE supports GATT read and write. BLE does have an HID mode, but the primary way you are “supposed” to access BLE is via GATT transfers.
You could absolutely do a remote control right now. You would be at the mercy of packet interval timing (7.5ms-50ms depending on agreed interval) so gaming keyboard wouldn’t be great typical use could absolutely be done... but guess what, HID mode still has a minimum packet internval timing at 7.5ms. I’ve been using BLE for years but still haven’t found a great use for HID mode.
No, you can't. I actually tried doing just that. Try yourself and see how spectacular it fails. WebBle is just experimental as far as I'm concerned