You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
I have searched the issue tracker for a similar issue and not found a similar issue.
General issue report
I'm using the Nimble stack and several functions in nimble_callback_on_sync but get an unexpected result for me.
I want to get the same Static Random Address once I've set it up, but after each restart it's updated to a different one. My code is something like this:
// on_syncintrc=ble_hs_id_copy_addr(BLE_ADDR_RANDOM, address, NULL);
if (rc) {
ESP_LOGI(TAG, "Random address is not set, rc: %d", rc); // rc == 21 (BLE_HS_ENOADDR)esp_ble_addr_taddr;
rc=esp_ble_hw_get_static_addr(&addr);
if (rc) {
ESP_LOGI(TAG, "Error in esp_ble_hw_get_static_addr, rc: %d", rc); // always -1
}
}
rc=ble_hs_util_ensure_addr(1);
What I expect is that on the first start there is no Static Random Address set. I call ble_hs_util_ensure_addr(1) which generates Static Random Address and set it via ble_hs_id_set_rnd (which sends an HCI command to the Controller (ble_hs_hci_cmd_tx(BLE_HCI_OP(BLE_HCI_OGF_LE, BLE_HCI_OCF_LE_SET_RAND_ADDR), &cmd, sizeof(cmd), NULL, 0)). From that point on I think that Controller should store the set address and give it back on the next restart, when ble_hs_util_ensure_addr loads it with ble_hs_util_load_rand_addr -> esp_ble_hw_get_static_addr. But it's not the case and a new address is generated each time.
Is it expected behavior? Why?
I want to a create random address (set it as Static Random Address) and use it as Identity Address for RPA. I believe this Static Random Address should be the same on each start for RPA to work (if I've bonded some devices).
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Nimble Static Random Address is not persisted after reboot
Nimble Static Random Address is not persisted after reboot (IDFGH-14516)
Jan 25, 2025
Answers checklist.
General issue report
I'm using the Nimble stack and several functions in
nimble_callback_on_sync
but get an unexpected result for me.I want to get the same Static Random Address once I've set it up, but after each restart it's updated to a different one. My code is something like this:
What I expect is that on the first start there is no Static Random Address set. I call
ble_hs_util_ensure_addr(1)
which generates Static Random Address and set it viable_hs_id_set_rnd
(which sends an HCI command to the Controller (ble_hs_hci_cmd_tx(BLE_HCI_OP(BLE_HCI_OGF_LE, BLE_HCI_OCF_LE_SET_RAND_ADDR), &cmd, sizeof(cmd), NULL, 0)
). From that point on I think that Controller should store the set address and give it back on the next restart, whenble_hs_util_ensure_addr
loads it withble_hs_util_load_rand_addr -> esp_ble_hw_get_static_addr
. But it's not the case and a new address is generated each time.Is it expected behavior? Why?
I want to a create random address (set it as Static Random Address) and use it as Identity Address for RPA. I believe this Static Random Address should be the same on each start for RPA to work (if I've bonded some devices).
The text was updated successfully, but these errors were encountered: