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

NRF52 code stuck after disconnection

Hi,

We are using nrf52832 board with sdk14.0. We are facing two issues:

  1. Our use case is to send the data continuously when the notification is enable and stop sending the data either when notification char is disabled or disconnection occur. We are using custom characteristic for data transfer. But when we are disabling the notification char or disconnect the device from nrf App our code is stucking in loop. We are not getting disconnection event or write event after disconnection occur. I have checked the by applying breaking point on disconnection event in main.

  2. We are using two characteristics one for data transfer and one for receiving some data from app. In our code, when we are writing data on char any char we are going on BLE_GATTS_EVT_WRITE. My question is how we can differentiate from which characteristics we are getting data.

Please find my attached codemain.c

Related