starryalley / CSC_BLE_Bridge

Android app that bridges ANT+ Cycling Speed/Cadence/HR sensors as Bluetooth LE sensors
MIT License
65 stars 17 forks source link

Support for long bluetooth device names #14

Closed leaskovski closed 3 years ago

leaskovski commented 3 years ago

Off the back of #11, it was suggested to change how the advertising is done....

Switched out the device name to be only included when responding to a scan request. This saves on advertising space as we are limited to 31 octets, so now only the profiles (and powerlevel) are included in the single advertising data, which then triggers a response data when another device queries it. This resolves long Bluetooth devices names as this would otherwise trigger a ADVERTISE_FAILED_DATA_TOO_LARGE error code

leaskovski commented 3 years ago

Opps, I see that my other change has decided to piggy back onto the PR... doh! should have done them in a branch!!! This also includes a couple of changes with regards to how the services runs so that when you stop the bridge, the service actually stops.

starryalley commented 3 years ago

Awesome fix both for the device name and the stop bridging function! Works perfectly. I've manually merged your commits into master after re-formatting your commit messages. Thanks!