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

  • Updated: Actually I'm able to reproduce this issue even with two standard services.

  • What SDK and SoftDevice version are you using? What examples?

  • Chip:nRF51822; SDK: 10.0.0_dc26b5e; SoftDevice s120(2.1.0); My application is based on: multilink central example + additional battery and device information services. If I have free time maybe I will test it on "clean" example from SDK .

  • I will try to reproduce. Is NRF_ERROR_BUSY returned from inside ble_db_discovery_start():

    if (p_db_discovery->discovery_in_progress)
    {
        return NRF_ERROR_BUSY;
    }
    

    or sd_ble_gattc_primary_services_discover()?

  • 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)) )

1 2