CCCD change not written to flash after BLE Write (Server)

Hello,

I am currently developing a firmware where I am acting as a server with nRF52840.

The protocol of my use case is:

  1. Client is connecting to my device (server with bonding)
  2. Client sets notification enabled (is written to flash by the server as PM_EVT_PEER_DATA_UPDATE_SUCCEEDED event indicates)
  3. Client is writing to a custom characteristic
  4. Client wants to set notification disabled (I receive the event that it is written to CCCD but I don't get the PM_EVT_PEER_DATA_UPDATE_SUCCEEDED event and nothing is written to the flash, since I want to store the information for reconnecting with the bonded device)

Do I have to handle the write to the CCCD on my own or could there be a problem with writing to my characteristic?

Note: When no write is executed, just notification enabling and disabling, everything works fine and is stored to flash.

best regards 

Related