This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

New FDS record on each connection

I checked the operation of the application "ble_app_hrs" and I see that the FDS makes a new record in flash memory with every new connection. What is the need and can it be prohibited?

Best regards,

Vladislav.

Parents Reply Children
  • I see. The ble_app_hrs_c implementation enables notifications on every connection even if it was enabled in a previous session. Also, the Server implementation does not actually check if the new configuration is different from the setting already stored in flash. In other words, calls to ble_hrs_c_hrm_notif_enable() /ble_bas_c_bl_notif_enable() will always trigger an FDS update on the server side. I agree that this is an unnecessary use of flash. 

  • May be before updating FDS it is necessary to check whether flags are changed or not?

    As a short-term solution, I can remove the call "update_pending_flags_check ()" in the file "gatt_cache_manager.c" on line 707 (SDK 15.3). I do not understand why flags of the client notifications need to be stored in flash memory.

  • The server is expected to remember the CCCD value across connections when bonded, so you will have to update the value in flash if the client changes the setting. It's really the client that should stop writing to the CCCD on every re-connect. But it would be good if the server had a check for whether the client is actually writing a new CCCD setting before deciding to update the information in NV memory.

    Vladislav Kolodiev said:
    I do not understand why flags of the client notifications need to be stored in flash memory.

    It's a specification requirement. A bonded client should not have to re-enable notifications/indications on every connection

Related