labapart / gattlib

Library to access GATT information from BLE (Bluetooth Low Energy) devices
http://labapart.com/
436 stars 157 forks source link

Fixed missing characteristic detection when discovering services. #204

Closed kdewald closed 3 years ago

kdewald commented 3 years ago

The function gattlib_discover_primary makes the assumption that all characteristics appear after the service when traversing the entire object list. This is not always the case, which will result in attribute handle values for services be missing.

On that same note, attr_handle_start now stores the service handle and attr_handle_end the highest handle of all characteristics that belong to this service.

oliviermartin commented 3 years ago

Thanks a lot @kdewald for your contribution and your fix :-)