Question on esp_bt_gap_read_remote_name when doing multipe request in parallel?

jgries
Posts: 2
Joined: Sun Feb 23, 2020 3:24 pm

Question on esp_bt_gap_read_remote_name when doing multipe request in parallel?

Postby jgries » Wed Feb 26, 2020 11:49 am

Hi all,

I have a scenario where Bluetooth GAP discovery results in a bunch a devices, which do not provide their remote name on ESP_BT_GAP_DISC_RES_EVT event by default. In order to get missing remote names I think I need to ask each device explicitly using function esp_bt_gap_read_remote_name.

I would like to do it this this way:
1. Call esp_bt_gap_read_remote_name for each of the devices with device address as input parameter
2. Wait once some time T for all these devices having a change to send back response.
3. Complete my device list with given names.

Unfortunately event ESP_BT_GAP_READ_REMOTE_NAME_EVT provides as callback parameters just the remote name; device address is not included in current implementation. So my approach won't work, because I can't link device name to the address, when having multiple esp_bt_gap_read_remote_name calls pending :( .

I am wondering why struct read_rmt_name_param does not include a esp_bd_addr_t bda member as other callback parameter structs do. Is there any chance to get that changed in a future version?

Is there any other approach to get device name linked with device address?

daiku_north
Posts: 4
Joined: Thu Nov 18, 2021 8:32 pm

Re: Question on esp_bt_gap_read_remote_name when doing multipe request in parallel?

Postby daiku_north » Thu Dec 02, 2021 9:19 pm

I agree. Almost all of the other response structures sent to the callback (in the union `esp_bt_gap_cb_param_t`) include `esp_bd_addr_t bda` as their first member. Why not this one?

All I can think of is to send the first request, and kick off the second request after you get the first response, etc.

Who is online

Users browsing this forum: Google [Bot], vritzka and 120 guests