In Short: How to get status wether noticiations are enabled or not? Where is this stored?
Hello,
I would like my peripheral to start/stop a timer that does measurements and sends them via sd_ble_gatts_hvx(m_conn_handle,&hvx_params);
based on notificaions enabled and connection status.. in other words:
Start Timer when connected and notifications are enabled Stop Timer when disconnected. No matter if notifications are enabled.
But of course on reconnection the notifications are still enabled and therefore the timer shall be started again.
The missing part is to start the timer after connection_evt but only when notifications are enabled. How can I realize this?
Search gave me this thread, but it won't help in this case.
I found a ble_srv_is_notification_enabled
function inside ble_conn_params.c that looks promising. How can I use this in my main?
Of course I got it working using a workaround (set notf_enabled? flag based on write.data). But I'd prefer a straight forward solution