BLE, discovery all services

Hello. I try to create a remote control for GoPro using nrf52 ble.

Using sdk 17.1 examples I can connect to GoPro and try to get a list of UUIDs. But I only get one UUID (0x180f, battery).

In ble_evt_handler, on BLE_GAP_EVT_CONNECTED event I call "ble_db_discovery_start" function.

static void ble_evt_handler(ble_evt_t const * p_ble_evt, void * p_context)
{
    ret_code_t            err_code;
    ble_gap_evt_t const * p_gap_evt = &p_ble_evt->evt.gap_evt;

    pm_handler_secure_on_connection(p_ble_evt);

    switch (p_ble_evt->header.evt_id)
    {
        case BLE_GAP_EVT_CONNECTED:
        {
            NRF_LOG_DEBUG("GAP Connected, m_conn_handle = 0x%0X",m_conn_handle);
            m_conn_handle = p_gap_evt->conn_handle;

            //Discover peer's services.
            err_code = ble_db_discovery_start(&m_db_disc, p_ble_evt->evt.gap_evt.conn_handle);
            APP_ERROR_CHECK(err_code);

..... some other events ....
}

Database discovery events call callback "db_disc_handler"

static void db_disc_handler(ble_db_discovery_evt_t * p_evt)
{
    NRF_LOG_INFO("DC_DISC type: %d",p_evt->evt_type);
    if (p_evt->evt_type == BLE_DB_DISCOVERY_COMPLETE){
        NRF_LOG_INFO("DB_DISC uuid: 0x%04X type: 0x%0X",p_evt->params.discovered_db.srv_uuid.uuid,p_evt->params.discovered_db.srv_uuid.type);
    }
    
    //ble_bas_on_db_disc_evt(&m_bas_c, p_evt);
}

Connecting to camera I only get two call db_disc_handler:

<info> app: DC_DISC type: 0
<info> app: DB_DISC uuid: 0x180F type: 0x1
<info> app: DC_DISC type: 3

Using nRF Connect app, I can see a lot of UUIDS:

gopro uuid list

How to get list of all UUIDs in my code?

Parents Reply Children
No Data
Related