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

Parallel db dyscovering services for several connections?

Hi,

Can I try to discovery services for the next connections while it is performing for the other connection?

I use "ble db discover" manager. And I cant find this limitation in the SDK 10 documentation. However I get the "NRF_ERROR_BUSY" (exactly for sd_ble_gattc_primary_services_discover() ) when I try to discovery services for the next device while the previous discovering (for other device and connection handle!) was not completed.

Is it OK?

Best regards, Y0lo

Parents
  • Hi Petter. No, it's no so simple. NRF_ERROR_BUSY returns by sd_ble_gattc_primary_services_discover() inside on_srv_disc_completion(). Actually in my application i get this error from db_discovery_evt_handler() with event type == BLE_DB_DISCOVERY_ERROR and error code == NRF_ERROR_BUSY. Moreover I invoke ble_db_discovery_start() from DM_EVT_CONNECTION event a before a clean db_discovery structure by ( memset(&_p_peer->db_discovery, 0, sizeof(ble_db_discovery_t)) )

Reply
  • Hi Petter. No, it's no so simple. NRF_ERROR_BUSY returns by sd_ble_gattc_primary_services_discover() inside on_srv_disc_completion(). Actually in my application i get this error from db_discovery_evt_handler() with event type == BLE_DB_DISCOVERY_ERROR and error code == NRF_ERROR_BUSY. Moreover I invoke ble_db_discovery_start() from DM_EVT_CONNECTION event a before a clean db_discovery structure by ( memset(&_p_peer->db_discovery, 0, sizeof(ble_db_discovery_t)) )

Children
No Data
Related