GATT DB in some cases not updated after programming the chip

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

For a project we use the CABLE-222005-00 on a custom designed board. On some boards after changing the GATT DB in PSoC Creator by adding Services or Characteristics I can't see these changes in the CySmart App after flashing the module. Flashing another board with the same FW, I am able to see these changes. This already occurred on 2 boards.

   

I already tried erasing all the flash via PSoC Programmer and afterwards flashing it with the FW. Same results here.

   

Hope you understand my problem and are able to help me.

0 Likes
1 Solution
Anonymous
Not applicable

iOS caches the GATT structure of a device after connecting to it the first time in order to avoid repeated (and usually wasted) time and power re-discovering after every connection. Devices are identified inside iOS according to their connection (MAC) address or bond entry, which is why flashing the new project on a fresh (previously unused) module works in your case.

   

The simplest way to fix this during the development phase is to power-cycle the Bluetooth subsystem on the iOS device from the Settings app. If you have bonded with the device, you can simply forget it and then reconnect. There are other programmatic solutions if your device will actually be changing the GATT structure dynamically in production (see the "Service Changed" service and characteristic definitions from the Bluetooth SIG), but normally this is not needed.

   

You can also use the CySmart dongle (CY5671 or CY5677) and the CySmart Windows application to perform basic GATT discovery and testing from Windows. The dongle and this app do not perform any caching, and you should be able to easily verify that your changes have taken effect.

View solution in original post

0 Likes
3 Replies
Anonymous
Not applicable

iOS caches the GATT structure of a device after connecting to it the first time in order to avoid repeated (and usually wasted) time and power re-discovering after every connection. Devices are identified inside iOS according to their connection (MAC) address or bond entry, which is why flashing the new project on a fresh (previously unused) module works in your case.

   

The simplest way to fix this during the development phase is to power-cycle the Bluetooth subsystem on the iOS device from the Settings app. If you have bonded with the device, you can simply forget it and then reconnect. There are other programmatic solutions if your device will actually be changing the GATT structure dynamically in production (see the "Service Changed" service and characteristic definitions from the Bluetooth SIG), but normally this is not needed.

   

You can also use the CySmart dongle (CY5671 or CY5677) and the CySmart Windows application to perform basic GATT discovery and testing from Windows. The dongle and this app do not perform any caching, and you should be able to easily verify that your changes have taken effect.

0 Likes
Anonymous
Not applicable

Wow, I did not know that. Thanks a lot.

Anonymous
Not applicable

I added the Service Changed characteristic ot the Generic Attribute service, but the changes in the GATT DB aren't reflected in iOS. Did I forget something?

0 Likes