ARMmbed / mbed-os-example-ble

BLE demos using mbed OS and mbed cli
Apache License 2.0
134 stars 117 forks source link

fix payload in advertising example #361

Closed paul-szczepanek-arm closed 3 years ago

paul-szczepanek-arm commented 3 years ago

The advertising example was sending the wrong payload because during battery level update the data builder being reused was the one used for scan response payload instead of the normal payload. This fixes it by reversing the order of setting the payloads. Added more comments to explain this.