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

When does db_discovery terminate?

I'm trying to develop a client-server app, based on studying some of the examples. The server part seems OK, I can read and write characteristics using the Nordic nRF Connect app on my phone.

For the client side, it starts, scans and detects the server (by name); it then connects, exchanges ATT MTU and updates connection intervals. Upon connection, the client calls nrf_ble_scan_stop() and launches db_discovery. Then things seem basically stuck, though I observe some LED activity (we put a simple led invert in the main idle loop). 

There are a couple of NRF_LOG_INFO statements in the initialization, between ble_db_discovery_init(db_disc_handler) and a couple of ble_db_discovery_evt_register() calls. Curiously the output from these log statements does not appear -- until I press reset on the board.

So far as I can tell, the db_disc_handler is not invoked (let alone with with  BLE_DB_DISCOVERY_COMPLETE) as I would expect.

What would be a way to debug the discovery process?

Related