Close

Use Web Bluetooth to Connect Your Pi

A project log for PiSugar Battery for Raspberry Pi zero

Portable Power Platform for Pi Zero

JdaieJdaie 08/18/2019 at 03:540 Comments

It was three days ago I found that bluetooth can be accessed by web content in Chrome! So I have written a webpage as new client for our previous bluetooth project.

First, install the server-side program on your pi, see how: https://github.com/PiSugar/sugar-wifi-conf 

Then you can connect your pi through BLE with your laptop or smartphone by opening this link in chrome app: https://www.pisugar.com/sugar-wifi-conf

Get real time information and config wifi setting by web bluetooth (Android and MacBook)

Since web bluetooth has not been widely supported yet, I have tested on several devices:

For other compatibility information please see here.

UPDATE

It's able to run on iOS now!

The iOS problem I mentioned above, it's because WebBLE browser only supports the early version of web-bluetooth api, which doesn't include "getCharacteristics" method. (Click here to see more detail) Therefore I had to use the old way to get characteristics when it runs on iOS.

Make sure you have install the latest version of sugar-wifi-conf on your pi. Download the WebBLE app and open this link: https://www.pisugar.com/sugar-wifi-conf

web bluetooth client runs on iOS
web bluetooth client runs on iOS, with WebBLE browser

Discussions