I'm writing a small BT app on a microcontroller (using aioble
on Micropython
), but my question is more general on the BT spec itself.
Since I'm still developing the device, I keep adding/changing services and characteristics all the time, and found out that Chrome seems to cache the old services and chars UUID it found from previous runs. I understand this is done for performance and resources reasons, but I'd like to invalidate this cache on every boot.
I found out about the Generic Attribute Service (0x1801) and the Service Changed Characteristic (0x2A05) which suppose to do exactly this. I couldn't find official specs in the official BT site (this link for example seems to be broken), but found some other resources that basically say that the server should send a notification with a value representing the range of handles that should be invalidated.
That sounds exactly like what I want, but nothing describes how do I represent a "handle range".. I basically want to erase all.
Any help? Also - do I write value to the char once at startup or I can send notification throughout the device's lifecycle?