Web Bluetooth with Password

478 views Asked by At

Is it possible to connect to a bluetooth device that supports Bluetooth 4.0 LE but has a password.

I can connect to the device from an iphone and print (which only supports BTLE) but when I try and connect from chrome (OSX) / web-bluetooth it does not prompt me for a password. I can return a device using:

navigator.bluetooth.requestDevice({name: 'PRINTER'})

but when I try to connect using

device.gatt.connect()

the promise never resolves.

2

There are 2 answers

0
Tony J Watson On BEST ANSWER

Web-Bluetooth does not support Bluetooth 4.0's Secure Simple Pairing (SSP) / Pin-Codes.

I resolved the issue by disabling the pin-code and posting a request for SSP in the bluetooth CG.

1
François Beaufort On

Can you get device.gatt.connect() to resolve on Android?

Your best bet to solve your issue would be to file a Chromium bug by following instructions at https://www.chromium.org/developers/how-tos/file-web-bluetooth-bugs