79344297

Date: 2025-01-09 23:41:57
Score: 1
Natty:
Report link

Does your characteristic (defined on the ESP32) that you are trying to subscribe/notify to have the descriptor 0x2902 (CCC Descriptor) defined?

https://github.com/oesmith/gatt-xml/blob/master/org.bluetooth.descriptor.gatt.client_characteristic_configuration.xml

This is a requirement of the web-bluetooth implementation in Chrome per https://groups.google.com/a/chromium.org/g/web-bluetooth/c/TlHnA3hTksw

The other issue you could be running into is a problem with concurrency when writing to characteristics and introducing a delay could help. The comment from programmerRaj using an alert could be adding this delay, or the issue could also be due to interactivity.

I am also running into this problem (my BLE pererphial is defined/running in nodejs on a Raspberry pi 4), but for me, the characteristic does have the descriptor and I've already tried a delay. I'll try and come back and update this answer if I identify other scenarios that lead to this problem.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: agrath