Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5364

SDK • Sending bluetooth service changed and/or clearing iphone cache

$
0
0
Hello

I'm using the pico's BTstack SDK. I'm making changes to my C project's GATT database but these aren't being reflected on the client app, in this case running on an iPhone.

It turns out the iPhone, like other OS's, is caching the GATT services for each device. It should be updated each time the GATT database hash changes, which happens during CMake, but apparently it's not. One thing that apparently does cause iOS to refresh its cache is if the device sends a GATT_SERVICE_CHANGED, a characteristic in the GATT_SERVICE. I've got the following line on my .gatt file, under the GATT_SERVICE:

Code:

CHARACTERISTIC, GATT_SERVICE_CHANGED, READ | INDICATE, 00 00 FF FF
..but this doesn't seem to be causing the cache to be refreshed.

There doesn't seem to be a way to manually clear the bluetooth service cache on a non-paired/bonded BLE device on iOS.

If anyone knows how to either send a GATT_SERVICE_CHANGED correctly, or at least a way to manually clear the bluetooth cache on an iPhone, that'll be great. I assume I'm not the first person to make changes to their GATT file and need the client OS to update!

I couldn't find any relevant examples in the bluekitchen github or documentation.

Many thanks

Matt

Statistics: Posted by mattpi — Sun Aug 25, 2024 10:34 am — Replies 1 — Views 9



Viewing all articles
Browse latest Browse all 5364

Latest Images

Trending Articles



Latest Images