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

How to get Central name and unique UUID?

Hi all,

I use nRF52832 with the UART peripheral example.

I need to get the name and unique UUID of the Central I'm connecting to (after connection).

The Central can either be Android, iOS or nRF52832 with the Central code of the UART example.

I use SDK V15.0.0 and Softdevice V 6.0.0

How do I go about doing that?

I'm am new to BLE and my knowledge is limited, specific detailed answers will be greatly appreciated.

Thank you

  • Hi,

    NRF_ERROR_BUSY means that a client procedure is already in progress and you need to try again. You might need to call the function again to test if it’s ready. Adding a timer could be the solution.

    You need to add the BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP event in the ble_evt_handler.

  • Hi,

    I tried (in BLE_GAP_EVT_CONNECTED):

    do
    {
    err_code = sd_ble_gattc_char_value_by_uuid_read(m_conn_handle, p_uuid, p_handle_range);
    }
    while (NRF_ERROR_BUSY == err_code);

    and I never get out of the do-while loop....

  • I used a timer and it solved the problem. 

    100msec wasn't enough, had to set 200msec, I have no idea why the Central is busy for so long, as I do that right after the connection had established, nothing else is executed. 

1 2