You are reading a single comment by @user128009 and its replies.
Click here to read the full conversation.
-
@fanoush: Interesting, could you post details on your OS/Bluetooth/Browser/Espruino combo? Definitely doesn't work for me (macOS 10.15/Chrome 90 + flag:#enable-web-bluetooth-new-permissions-backend/Puck.js v2.09)
//Press Connect Getting existing permitted Bluetooth devices... > Got 1 Bluetooth device. Watching advertisements from "Puck.js c699"... //Stuck here, but if you now press Request and don't select a device: Requesting any Bluetooth device... > Received advertisement from "Puck.js c699"... Connecting to GATT Server from "Puck.js c699"... > Bluetooth device "Puck.js c699 connected. //Abort Request Argh! NotFoundError: User cancelled the requestDevice() chooser.
It seems like for some reason your Espruino is still sending advertisement packets even after it is connected? Do you have any Bluetooth device scanning tool running in the background/in parallel?
Oh, it does for me. Clicked 'request device' selected Espruino device. Clicked 'connect to bluetooth devices' and it connected. Then I reloaded the page and clicked connect again and it remembered previous device and connected again.
EDIT: and btw about that security effort, here is issue https://github.com/WebBluetoothCG/web-bluetooth/issues/358 where they are pretty anal about showing the dialog with no way to circumvent/customize/prevent it but that is for first connection, here https://github.com/WebBluetoothCG/web-bluetooth/issues/164 it clearly says this should work