Web Bluetooth

At Powaband we’re building hardware and for that reason our applications need to interact with said hardware. As a web developer this is not a very common problem to solve. So it’s been interesting to work on it.

There is in fact a spec for bluetooth access in the browser, called web-bluetooth, but it’s still early days. Currently the API is only available in Chrome and only if you enable an experimental developer flag. Obviously not something we can make customers use. The api is however also available for Chrome apps as can be read in the documentation.

What can not be read in the documentation is that bluetooth low energy (BLE) is only available on Chromium. This took some testing to figure out, but it can also be found in the form of an issue (#449682) in the Chromium project.

I will keep my eye on this issue and can’t wait to see it be resolved.

Bluetooth in General

It’s been interesting to see how the bluetooth spec works. Simply put we have Device UUIDs, Service UUIDs and Characteristic UUIDs.

You want to connect to a device so you use the devices UUID.

But what can the device do? To answer that we have service UUIDs which are things like device information, battery status or heart rate for example.

But for any service there might be multiple important pieces of information to request. To get a specific piece of information we use Characteristic UUIDs. For device information it might be manufacturer, serial number, etc. for heart rate it could be beats per minute or location of the sensor.

Note: Chrome apps can be opened with links. This means that in the future we can have a sync button in our web app that will open our chrome app that has access to bluetooth. This would create a surprisingly compelling user experience.

Documentation: