Search code examples
bluetooth-lowenergyweb-bluetoothbluetooth-mesh

Can Web-bluetooth provision nodes in a BLE-mesh?


I have a web-app that needs to communicate with about 48 BLE devices in a BLE-mesh.

I found that Web-bluetooth can work with one bluetooth device, but could not find if there is a way to provision BLE-mesh and then send messages to nodes in the mesh with Web-bluetooth.

If it matters, I am putting it here for information, that the web-app is an Angular app written in Typescript. For Web-bluetooth, I am using this library https://github.com/manekinekko/angular-web-bluetooth.


Solution

  • I suspect that "Smart Mesh" technology is not the standard Bluetooth mesh from Bluetooth SIG (and it's 33,000 members), so watch out for that. I could be wrong but I don't see anything from that company in the qualified mesh products list: https://www.bluetooth.com/bluetooth-technology/topology-options/le-mesh/mesh-qualified/

    The place to look for answers to questions like this is in the mesh profile 1.0 specification:

    https://www.bluetooth.com/specifications/mesh-specifications/

    The mesh intro for developers is a shorter read for getting started: https://www.bluetooth.com/bluetooth-resources/?types=paper&categories=&tags=mesh&keyword=

    And for hands-on experience, there are a couple of "study guides" with coding projects, from the SIG:

    https://www.bluetooth.com/bluetooth-resources/?tags=mesh&keyword&types=study-guide

    In short though, provisioning can be performed over two "bearers" including GATT (known as PB-GATT). Since Web Bluetooth supports connection-oriented GATT, I believe you should be able to implement provisioning over GATT using Web Bluetooth. You will be unable to access the Device UUID in the ServiceData advertising packets from unprovisioned nodes, but it's likely this will not be an issue for you.... depends on detailed requirements, however.

    Hope this helps.

    Additional: To "send messages" you need to use a proxy node and the proxy protocol. This allows GATT to be used over a connection to send mesh messages into / back from your mesh network. There's a hands-on study guide which actually uses Web Bluetooth at bluetooth.com here: https://www.bluetooth.com/bluetooth-resources/?tags=mesh&keyword&types=study-guide

    Also... you can see me demonstrating Web Bluetooth controlling a small (64 nodes) Bluetooth mesh network here: https://youtu.be/1rxgY1EnmJw?t=1173