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

Disable local_db_update_in_evt (p_ble_evt-evt.gatts_evt.conn_handle);

1. I don't want to call the fds function when enabling or disabling cccd: pdb_write_buf_store, so I did the following:

2. I am in nRF5_SDK_12.3.0_d7731ad in the sdk
Routine D:Project?nRF5_SDK_12.3.0_d7731ad?examples?ble_peripheral?ble_app_hts?pca10028?s130?arm5_no_packs
File gatt_cache_manager.c
Local_db_update_in_evt of the function gcm_ble_evt_handler to comment off the function (p_ble_evt-evt.gatts_evt.conn_handle);

3. After I disable the function mentioned above, enable or disable CCCD without exception, I disable the local_db_update_in_evt (p_ble_evt-evt.gatts_evt.conn_handle);

4. Why write FDS when enabling CCCD, what information is written, according to my understanding, should not write FDS here?

5. The following figure is the location of the function that modified the commented out

Parents
  • Take a look at this ticket, and some of the replies given by Vidar:

    "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."

    "You could add some logic in gatt_cache_manager.c to determine if a configuration needs to be updated in flash or if it already matches the previous configuration.

    However, I think the real problem is that the client configures the CCCDs on every re-connect. Bonded devices are expected to remember CCCD settings across connections. Are you able to change this behavior on the GATT client side?"

    If the above replies didn't answer your question, please ask and I will try to clear up any confusion.

    Best regards,

    Simon

Reply
  • Take a look at this ticket, and some of the replies given by Vidar:

    "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."

    "You could add some logic in gatt_cache_manager.c to determine if a configuration needs to be updated in flash or if it already matches the previous configuration.

    However, I think the real problem is that the client configures the CCCDs on every re-connect. Bonded devices are expected to remember CCCD settings across connections. Are you able to change this behavior on the GATT client side?"

    If the above replies didn't answer your question, please ask and I will try to clear up any confusion.

    Best regards,

    Simon

Children
No Data
Related