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

ble_app_uart_c central sometimes not discovering service from peripheral

Hello, I configured nrf52832 as central. I am using ble_app_uart_c example to set the IC as central. And esp32 module is my peripheral. I am able to establish connection and achieved bidirectional communication.

But Sometimes, my central is not discovering the service. BLE_GAP_EVT_CONNECTED event is being invoked and central is connecting to peripheral device, but after that db_disc_handler() is not being called for service discovery.

What might be the reason? Please help me in this regard.

Thank you.

Parents
  • Get a BLE sniffer trace and analyze what low-level (G)ATT commands db_discovery module uses. It might be either bug in it or you supply wrong parameters somewhere or there is good service discovery just your app somehow misses the event from bd_discovery module. Btw. workaround is simply: don't use that module but write your service discovery sequence. This is especially recommended if you do something super simple like looking for single custom service UUID (and some further characteristics under it).

Reply
  • Get a BLE sniffer trace and analyze what low-level (G)ATT commands db_discovery module uses. It might be either bug in it or you supply wrong parameters somewhere or there is good service discovery just your app somehow misses the event from bd_discovery module. Btw. workaround is simply: don't use that module but write your service discovery sequence. This is especially recommended if you do something super simple like looking for single custom service UUID (and some further characteristics under it).

Children
No Data
Related