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