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

How to enable notification on the peripheral side?

Hi , I am using nRF51822 as a ble_peripheral to send the sensor data to the phone. I already add a characteristic with the property of notify , and it could work when using MCP to test. But now I want to send the data autonomously without the enabled notification from phone. I find a function called 'sd_ble_gatts_value_set' to enable the cccd value but it do not work as I expect. I researched some questions about cccd , as said it could be retained by both sides when bounding. I am not exactly aware of what that means.So I wonder if I could enable notification on the peripheral side without enabling from phone and how to do this? Thanks. Forget to mention that I got the err_code of NRF_ERROR_FORBIDDEN when calling the function of 'sd_ble_gatts_value_set' to set the cccd value with cccd handle.

Related