Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web bluetooth can't subscribe/notify to characteristics #25

Open
agrath opened this issue Jan 12, 2025 · 0 comments
Open

Web bluetooth can't subscribe/notify to characteristics #25

agrath opened this issue Jan 12, 2025 · 0 comments

Comments

@agrath
Copy link

agrath commented Jan 12, 2025

Starting zwack to announce a RSC service, and connecting to the service and attempting to subscribe to the notify of the measurement charactersitic fails with a GATT unknown error in Chrome.

See: https://stackoverflow.com/questions/65290098/ble-browser-api-startnotifications-returns-gatt-error-not-supported/79344297#79344297 (with my answer)

image

Ultimately, the root cause is upstream in abandonware@bleno https://github.com/abandonware/bleno/blob/master/lib/hci-socket/gatt.js#L208 where the 2902 characteristic descriptor is added automatically if the characteristic is marked as notify.

I have created an issue there abandonware/bleno#51, and a PR abandonware/bleno#52

However, in Zwack, these descriptors are also declared manually on the service/characteristic, for example: https://github.com/paixaop/zwack/blob/master/lib/rsc/rsc-measurement-characteristic.js#L22
This results in a duplicate 2902 descriptor 'on the air' which causes Chrome to be unable to subscribe.

PR incoming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant