You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/12/07 23:24:20 UTC
[GitHub] [mynewt-nimble] andrewleech commented on pull request #1113: host/ble_att_svr: Reset handles index on attributes reset.
andrewleech commented on pull request #1113:
URL: https://github.com/apache/mynewt-nimble/pull/1113#issuecomment-988336163
As some background to this change, we're using nimble as the primary BLE stack in micropython.
During the initial startup of the stack we register the standard gap/gatt services: https://github.com/micropython/micropython/blob/851ecb2da178fff0b60aefdb5af502f28787a7ec/extmod/nimble/modbluetooth_nimble.c#L653
The micropython end user application would later typically define all the desired services/characteristics which is managed dynamically by resetting the registration and building up the required structs to be registered: https://github.com/micropython/micropython/blob/851ecb2da178fff0b60aefdb5af502f28787a7ec/extmod/nimble/modbluetooth_nimble.c#L907
This has been working very well, however we recently discoevered that the handles would continue incrementing over each registration reset, causing difficulties with any paired devices which have cached services/characteristics.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org