kasparsd / sensor-pilot

Progressive web app for connecting to Bluetooth Low Energy sensors via Web Bluetooth API
https://kasparsd.github.io/sensor-pilot/
52 stars 13 forks source link

DOMException: GATT operation not permitted. #28

Open ariccio opened 2 years ago

ariccio commented 2 years ago

So here's an interesting new problem. Right now in Chrome Canary, if I run the example and pair with my Aranet4, I get a DOMException: GATT operation not permitted. error. What makes it interesting, is that if I comment out the CO2 characteristic, f0cd3001-95da-4f4b-9ac8-aa55d312af0c, I have no such problem.

The way I understand Chrome, this means, that for some reason the Read bit for that characteristic isn't set?!?

https://chromium.googlesource.com/chromium/src/+/346fea951d1cec1bd49d4afca19ec9fc0a6b8124/device/bluetooth/bluetooth_remote_gatt_service_android.cc#68

https://chromium.googlesource.com/chromium/blink/+/refs/heads/main/Source/modules/bluetooth/BluetoothError.cpp#51

https://github.com/chromium/chromium/blob/master/third_party/blink/renderer/modules/bluetooth/bluetooth_error.cc#L169

What the heck?

ariccio commented 2 years ago

Has anybody had similar problems?

ariccio commented 2 years ago

Just checked, it's broken on OSX too. Hmm.

ariccio commented 2 years ago

I just discovered something interesting - the f0cd1503-95da-4f4b-9ac8-aa55d312af0c characteristic works fine! Maybe just change to that one.

Zheckiss commented 2 years ago

I just discovered something interesting - the f0cd1503-95da-4f4b-9ac8-aa55d312af0c characteristic works fine! Maybe just change to that one. Hello! Have you solved this issue? I have it with nrf52 DK, the same error.