I have created a simple BLE advertiser using Python's dbus Library (Bluez 5.48). This sample application adds one service, and and this service has 2 characteristics. On starting advertiser, all services and Characterictic UUID will be assigned a 16 bit long ATT Handle so that Client can directly read or write on those UUIDs using HANDLEs.
Advertiser works perfectly fine, and Client can subscribe to UUIDs. However Client expects a fixed ATT Handle for both UUIDs. But Advertiser swaps the ATT Handles when reconnected.
So is there any way by which I can either 1- Keep my ATT Handles static. 2- Or Advertiser should know ATT handles assigned to UUIDs.
I have spent good amount of time in finding this out, but got no success so far.
Using this code to create advertiser. https://github.com/ukBaz/python-bluezero/blob/master/bluezero/peripheral.py