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

multilink db discovery gives discovery response multiple times for 1st ble connection after reset.

hi,

i am doing a project where i have to discover custom services on connected ble nodes.

i am using nrf52832 as central device and thingy 52 as peripheral device i have used sdk 14.2.0 multilink central example and modified it to discover all custom services.

so far i am able to discover all custom services if value of "NRF_SDH_BLE_CENTRAL_LINK_COUNT" is 1.but when i changed it's value to more then 1(i have used 2,4,8) i am getting these massages of system fault on uart terminal

<error> app: Fatal error
<warning> app: System reset

when debug and put uart output on terminal  with original example i figured that on first connection after program starts service discovery response event is generated same number of times as NRF_SDH_BLE_CENTRAL_LINK_COUNT and that causes above error.

is there any way to stop  multiple discovery event for first connection after reset.

thanks

Parents Reply Children
  • hi hung bui,

    so i am getting error code 0x00000011 by calling api "sd_ble_gattc_read" to read full 128-bit base uuid.

    basically i am doing full db discovery by providing argument ble_uuid_t const *p_srvc_uuid = NULL in sd_ble_gattc_primary_services_discover API.

    but my question is that why i am getting number of  BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP event same as number of NRF_SDH_BLE_CENTRAL_LINK_COUNT.

    so in default ble_central_multilink example NRF_SDH_BLE_CENTRAL_LINK_COUNT is 8 so i am getting BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP event 8 times.

    but if BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP is 1 my program works fine.

     is there any way to reduce BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP to 1

    thanks

  • Error code 0x11 (17 decimal = NRF_ERROR_BUSY) with sd_ble_gattc_read() telling that there is other client process underway. 

    Note that for every central link you have, there will be a lbs client being created. Are you sure you are not calling ble_db_discovery_start() for all of the clients you have, regardless how many connection you actually have ? 

    Do you see the same error when you test with unmodified multilink central example ? 

     

  • hi,

    i have 8 connections,

    but i am sure i am only starting ble_db_discovery_start for connection handle 0 only.

    when i put a nrf log info in BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP and commented other process.

    i got this response on terminal

    info> app: Multilink example started.
    <info> app: Start scanning for device name Thingy.
    <info> app: Connection 0x0 established, starting DB discovery.
    <info> app: Start scanning for device name Thingy.
    <info> ble_db_disc: connection handle 0 service found 0x1800
    <info> ble_db_disc: connection handle 0 service found 0x1800
    <info> ble_db_disc: connection handle 0 service found 0x1800
    <info> ble_db_disc: connection handle 0 service found 0x1800
    <info> ble_db_disc: connection handle 0 service found 0x1800
    <info> ble_db_disc: connection handle 0 service found 0x1800
    <info> ble_db_disc: connection handle 0 service found 0x1800
    <info> ble_db_disc: connection handle 0 service found 0x1800

    when i connected 4 nodes following response i got

    <info> app: Connection 0x3 established, starting DB discovery.
    <info> app: Start scanning for device name Thingy.
    <info> ble_db_disc: connection handle 0 service found 0x1800
    <info> ble_db_disc: connection handle 1 service found 0x1800
    <info> ble_db_disc: connection handle 2 service found 0x1800
    <info> ble_db_disc: connection handle 3 service found 0x1800
    <info> ble_db_disc: connection handle 0 service found 0x1800
    <info> ble_db_disc: connection handle 0 service found 0x1800
    <info> ble_db_disc: connection handle 0 service found 0x1800
    <info> ble_db_disc: connection handle 0 service found 0x1800

    when i connected 8 nodes i got following response

    <info> app: Connection 0x7 established, starting DB discovery.
    <info> ble_db_disc: connection handle 0 service found 0x1800
    <info> ble_db_disc: connection handle 1 service found 0x1800
    <info> ble_db_disc: connection handle 2 service found 0x1800
    <info> ble_db_disc: connection handle 3 service found 0x1800
    <info> ble_db_disc: connection handle 4 service found 0x1800
    <info> ble_db_disc: connection handle 5 service found 0x1800
    <info> ble_db_disc: connection handle 6 service found 0x1800
    <info> ble_db_disc: connection handle 7 service found 0x1800

    please tell me what is happening here. either way i am getting 8 times response

    is this problem with softdevice or my code.?

  • Please answer my question, do you see the same problem when testing with the stock example ? 

  • yes,

    in stock example i am getting 8 times response 

Related