embassy-rs / nrf-softdevice

Apache License 2.0
264 stars 79 forks source link

examples: Align services in scan data with provided services #215

Closed chrysn closed 9 months ago

chrysn commented 9 months ago

The scan data of the example previously indicated being a thermometer (which the nRF chip clearly is, not even a bad one), but which does not match the services that it offers on GATT.

This change enables using the device with the WebBluetooth example at https://googlechrome.github.io/samples/web-bluetooth/battery-level-async-await.html (on Android and Linux), which previously only worked on Linux when pairing to the device manually through blueman (which caused more data from the device available to the host).

[edit: Another good example is https://googlechrome.github.io/samples/web-bluetooth/device-information-characteristics-async-await.html, which also works now]

[edit 2: insta-forcepushed another change after I noticed that the thermometer was still around in the adv_data; now adv_data announces one service and scan_data all.]

chrysn commented 9 months ago

I've just found that there are more thermometers around; if you prefer PRs to do all the work, hang on a few minutes and I'll update more examples.