IUsing the Master Control Panel application on my Android device to connect to my nRF51822 module (acting as the GATT server), I have implemented the Device Manager (v10 SDK) onto my BLE module and am able to bond the phone and device. I then set notifications enabled onto my custom service through the phone, and start sending notifications from my module by pressing a key on my keyboard (UART communication). This works fine but once I disconnect with the phone and try to reconnect, it shows on the Master Control Panel that notifications are still enabled and that I don't have to write and set the CCCD value of the same characteristic value I was notifying before disconnection. However when I start sending notifications, it is displayed on my terminal that I am getting the NRF_ERROR_INVALID_STATE event. If the device manager is suppose to manage bonds, how come the CCCD value is set back to 0 on my module?
Update: The error is coming from sd_ble_gatts_hvx() in my function to send a notification. Can anyone explain why the device manager module isn't saving my service context? It says on the Master Control Panel that they are bonded, but the CCCD goes back to default during reconnection.