A.Huzaifa A.Huzaifa - 1 year ago 82
Android Question

Can't find mobile device when using Web Bluetooth API

I am learning Web Bluetooth API, using google dev console, i am unable to find my mobile device. Also tried Demos available on github


I am using chrome (dev),enabled webbluetooth flag chrome://flags, Ubuntu 16+, Android BLE 4.1 (Marshmallow)

filters: [{
services: ['battery_service']
}).then(device => {
console.log('Got device:', device.name);
console.log('id:', device.id);

Also tried after changing filter to
{name: 'Device Name'}
, still unable to find my mobile device. Any suggestions will be highly appreciated.

PS: Also tried BLE peripheral Simulator

Answer Source

Did you also give a try to https://googlechrome.github.io/samples/web-bluetooth/battery-level.html with the BLE peripheral Simulator? It should work on supported platforms. See https://github.com/WebBluetoothCG/web-bluetooth/blob/master/implementation-status.md#chrome

You mentioned Ubuntu 16+. As you can see in Linux requirements notes (https://github.com/WebBluetoothCG/web-bluetooth/blob/master/implementation-status.md#notes)

Linux: Requires Kernel 3.19+ and BlueZ 5.41+ installed. Read How to get Chrome Web Bluetooth working on Linux. Note that Bluetooth daemon needs to run with experimental interfaces: sudo /usr/sbin/bluetoothd -E

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download