I've searched for enabling notification, but there are some points that I can't understand.
GATT characteristic attributes and characteristic cccd values are dedicated to GATT_S.
Q1. To Enable my GATT_S characteristic notification, which device is responsible for enabling this? (automatically)
-> does GATT_C have to enable it just after db_search assigns handle ?
(like Central device set's connection interval update duration just after establish connection with peripheral)
-> or GATT_S have to enable it just after GATT_C has connected?
Q2. If both can do, how can I accomplish it? (automatically)
-> if GATT_C is responsible for enabling notification, How can I enable notification?
(In this case, Just like MCP connects device and enable services
-> I really want to know how to accomplish this MCP's enable services
in my Firmware code. S130)
-> if GATT_S is responsible for enabling notification, How can I enable notification?
Q3. I've actually find for ble_app_hrs_rscs_relay nRF5_SDK_12.2.0\examples\ble_central_and_peripheral\experimental\ble_app_hrs_rscs_relay
cause this example automatically enable's peripheral notification and routes peripheral's data to it's connected Central.
But In this example, I really can't find any code that enables notification automatically.
I thought there might be any single code such as sd_ble_gatts_sys_attr_set()
or sd_ble_gatts_value_set()
but, there wern't such code that enable's notification.
how this example enable's notification and automatically routes?
(I'm using nrf51, nrf51-dk, s130, sdk12.2.0)
(ps. IS there any appropriate template or example for this notification enabling?)