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

Primary Services Discovery Fails After 8 Connects

Hey All,

I'm using the nrf52840 for gathering device information from Bluetooth devices having an nrf52 chip on board. The application runs through connect/disconnect routines, on a unique server every time, and I'm using the sd_ble_gattc_primary_services_discover to get characteristics and descriptors from the same server service UUID. After exactly 8 connects, my application fails in the same location. For clarity, I'm not doing anything differently between connection routines. From really rudimentary debugging by placing NRF_LOG_WARNING prints all over the app (I don't have a uart for the dongle and don't connect to J-Link), I'm seeing that the sd_ble_gattc_primary_services_discover from ble_gatt.c starts successfully each time. For the first 7 connects, I receive a BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP back. For the 8th, I don't and the application fatally errors.

I'm thinking that there may be a memory space I'm pushing up against that's causing the error. Is there an erase or stop routine that releases data from the primary services discover that I'm missing here?

Thanks in advance

Parents Reply
  • Hey Kenneth,

    Sorry for not replying earlier. The basis of this app is the example experimental\ble_app_interactive on the SDK mentioned previously. The issue was with a seg fault in primary_services_discovery_rsp handler. If you want to look into it for fixing the example you can, but my issue is resolved now.

    Thanks for pushing me to get the J-link debugger up and working, it helped.

Children
No Data
Related