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?
Question on esp_bt_gap_read_remote_name when doing multipe request in parallel?
-
- 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?
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.
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