Web Bluetooth

Chrome 53 has an Origin Trial for Bluetooth, which means that websites can opt-in to use this feature and automatically enable Web Bluetooth for all their visitors. It is the first time such technology enabling IoT directly from the web is deployed in the wild. post

post

BLE has two roles: Central and Peripheral. The Central scans for Peripherals and can be connected to several Peripherals at once, depending on the hardware. Peripherals are passive — which means they can’t initiate the connection, and they can usually only be connected with one peer (i.e., one Central).

Most hardware supports both roles — that is, both Central and Peripheral — but not always. For example, my Nexus 5 phone can only be a Central, but not a peripheral. With the newer Nexus 5X, both modes are supported. But it’s important to note that there are no Central-to-Central or Peripheral-to-Peripheral connections; it is always Central-to-Peripheral.

Web Bluetooth only supports the Central role, which means you can only connect with Peripherals. This means you can’t establish a direct BLE connection between two web pages on different devices using Web Bluetooth. You could, however, make a connection between Web Bluetooth (as a Central) and a native app implementing a Peripheral service.

Finally, in Web Bluetooth’s current state, you can’t scan for all devices around you — for good privacy reasons — and you can’t just connect to any device any time. So certain use cases, such polling a device periodically in the background, controlling a device through push notification received via Web Push API, or putting on a show for your website visitors by making their smart lights at home go all crazy, aren’t really possible just yet.

it it seems like a spec is being drafted to add scanning capabilities to Web Bluetooth, so we’ll just have to wait and see what the future holds!