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

nRF Connect can not read Characteristics after connect

Hello,

we have made our fist device with a custom Service with 5 characteristics. And now we have a strange problem which I was not able to debug to find a solution.

We start Advertising on Tag and this will then be reognized on the NRF Connect PC Application. 

NRF Connect will connect to the Tag and the program has checked our Service. We then click on the Service to read out the Service and the Characteristics.

Normally I see then the 5 Characteristics and I have also seen the correct data read from Device.

On the Device which is connected I see then also the Debug Informations for the events e.g. BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST ...

But in some cases the nRF Connect is not able to read out the Service and Characteristics if I click on the Service within nRF Connect. Then the read animation on the Pc Program will turn and turn but the Service and characteristics will not be read.

On the Device I can see the dbug informations for the connection but I will not get events like BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST. And I can also not see that the data was read.

We have the same problem also if we use not nRF Connect but a different Bluethooth central to connect. Also there we are somethimes not able to read the service and characteristics. There we have then the information that we was able to read out the characteristics from the Service (so we see our 5 characteristics) but then we are still not able to read out the data.

We are then still connected. So we can disconnect and will then see these events on the Tag. On the next adv we can again connect but also there we then the same problem again.

We have that problmes on different on our Devices but it is very often but anyway randomly!

We use SDK nRF5SDK160098a08e2

regards

markus

  • Hi Markus, 

    It would be very strange if the softdevice doesn't send the event to the application. But there is a chance that the application didn't poll the event from the softdevice. It's trigger by an interrupt (SD_EVT_IRQ) and the application has to call sd_ble_evt_get() to get the event. It is usually handled by the nrf_sdh module. But if you have something that run in interrupt context (APP HIGH for example) that takes a long time it may block the nrf_sdh module from polling the softdevice event. 

    It's quite strange that only on some devices you have the problem, I assume that they have the same firmware ? I don't see a reason why connecting on the slow advertising would cause this problem.

    If you try to turn off any feature that is performed in a interrupt context (including BLE events) and can take a long processing time (or deadlock) until the problem disappear, we may be able to pin out what cause the problem. 

  • Hello Hung Bui,

    we only use one gpio interrupt and the app_timers. And when the problem occure we have disabled this interrupt. So at the moment I don't know what I should disable.

  • Could you reproduce the issue on a nRF52 DK? If you can, please provide a minimized firmware that we can test and debug here.  

Related