-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when restoring bonding #1052
Comments
The crash described at point 2 was caused by the Debug logs. Lowering the log level to Info fixed the bug. |
Another problem is that some phones are not able to detect the ESP32 with RPA resolution active, while advertising. The solution is to disable and then reenable the Bluetooth on the phone regularly. Any ideas on this regard? |
I have seen a similar issue. If the peer_dev_rec table is full, the ESP device can't resolve the remote device's random address into an identity address, which it needs to retrieve the keys for the bonded peer. This table in NVS does not get cleared by ble_store_clear. It is cleared by ble_rpa_peer_dev_rec_clear_all but this is a static function. |
Hi @flonas955, any luck with this? I think I'm facing the exact same issue. |
Hi, this seems to still be an issue. I can confirm this issue also occurs between an ESP32 and a MacBook Pro. I was also able to suppress the issue by eliminating logging that occurs in the callback function passed to |
Setup
Phone: iPhone Xs
iOS version: 14.1
Phone app: nRF Connect
Target: ESP32 (NINA-W106)
IDF: version 4.3
nimble-idf branch: latest nimble-1.3.0-idf branch
Description
I want to be able to bond with both Android and iPhone devices. As iPhones in particular have RPA addresses, I enabled privacy using guidelines from here.
Expected behavior
The stack should be able to resolve RPA addresses. After initially bonding the phone with the ESP32, no other pairing/bonding requests should be requested when reconnecting or during the active connection.
Problem Description
After initially bonding the iPhone with the target, the connection is stable and the bonding works. After reconnecting once or several times (the issue is not consistent), without clearing any bonding information, the board crashes and gets reset. In order to be able to reconnect again, the bonding information from the phone has to be deleted first.
Usually, after the crash, the phone manages to restore bonding, but sometimes it resets forever trying to connect. This behavior is only on the iPhone, my Android device, which uses a public address, does not trigger the crash.
I managed to reproduce the problem using the bleprph example. I have only added RPA address resolution to that example and increased the number of stored CCCD from 8 to 32. I have attached the project files:
bleprph.zip
Steps to reproduce
Logs
I noticed that
ble_hs_util_ensure_addr()
does not always succeed in ensuring a random (1) address and sets a public one instead.The crash description is shown below:
Occasionally, I don't get a crash, but I get this instead:
Please let me know if you need additional information.
The text was updated successfully, but these errors were encountered: