Scanned RPA device showing address type being BLE_ADDR_TYPE_RANDOM
Posted: Sun Oct 14, 2018 9:15 pm
Hi,
I'm working on pairing a EPS32 with another BLE chip (from TI). After bound and reconnecting, I'm making the other BLE chip advertising using directed adv and RPA. But I'm facing two issues:
1. The scan result in ESP32 shows the address type is BLE_ADDR_TYPE_RANDOM, while it should be BLE_ADDR_TYPE_RPA_PUBLIC. It seems to be a but in ESP32, because I tried doing the same thing using two TI BLE chips, and it's working as expected: the central TI chip can see adv from the other TI chip, while address type being RPA.
case ESP_GAP_BLE_SCAN_RESULT_EVT: {
esp_ble_gap_cb_param_t *scan_result = (esp_ble_gap_cb_param_t *)param;
switch (scan_result->scan_rst.search_evt) {
case ESP_GAP_SEARCH_INQ_RES_EVT:
scan_result->scan_rst.ble_addr_type is BLE_ADDR_TYPE_RANDOM
scan_result->scan_rst.ble_evt_type is ESP_BLE_EVT_CONN_DIR_ADV
2. If I do esp_ble_gap_config_local_privacy(true), ESP32 uses random address to scan. I want the other chip to do directed adv when reconnecting. How do I make directed adv targeting a random address since it changes? I know it doesn't change all the time, but if the BLE chip runs out of power for several days and ESP32 reboots, how will directed adv work?
So I'm doing esp_ble_gap_config_local_privacy(false) but I'm not sure if it's the right thing to do.
thanks
Malcolm
I'm working on pairing a EPS32 with another BLE chip (from TI). After bound and reconnecting, I'm making the other BLE chip advertising using directed adv and RPA. But I'm facing two issues:
1. The scan result in ESP32 shows the address type is BLE_ADDR_TYPE_RANDOM, while it should be BLE_ADDR_TYPE_RPA_PUBLIC. It seems to be a but in ESP32, because I tried doing the same thing using two TI BLE chips, and it's working as expected: the central TI chip can see adv from the other TI chip, while address type being RPA.
case ESP_GAP_BLE_SCAN_RESULT_EVT: {
esp_ble_gap_cb_param_t *scan_result = (esp_ble_gap_cb_param_t *)param;
switch (scan_result->scan_rst.search_evt) {
case ESP_GAP_SEARCH_INQ_RES_EVT:
scan_result->scan_rst.ble_addr_type is BLE_ADDR_TYPE_RANDOM
scan_result->scan_rst.ble_evt_type is ESP_BLE_EVT_CONN_DIR_ADV
2. If I do esp_ble_gap_config_local_privacy(true), ESP32 uses random address to scan. I want the other chip to do directed adv when reconnecting. How do I make directed adv targeting a random address since it changes? I know it doesn't change all the time, but if the BLE chip runs out of power for several days and ESP32 reboots, how will directed adv work?
So I'm doing esp_ble_gap_config_local_privacy(false) but I'm not sure if it's the right thing to do.
thanks
Malcolm