-
Notifications
You must be signed in to change notification settings - Fork 52
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
iOS and Android bonding issues #33
Comments
I have created a new post with new observations here apache#1052 |
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'm not sure to your exact setup on how your handling your side. But I have been dealing with iOS bonding issues for awhile and can relate. So in general as a PSA because I see a lot of issues here relating to bonding/rpa and it took me awhile to get it going, I'll go over the jist of whats needed. If you take a look at the bleprph example, that uses a store template to save the irk/ltk/csrk of the connection and has the ESP in an NRPA configuration if random is set, for the ESP in RPA mode the "ble_hs_pvcy.h" details the steps for handling RPA on the ESP side. Using both the store template and the "ble_hs_pvcy.h" steps this will handle RPA-RPA connections well. So I would check that you're setting the store template as described in the bleprph example as well as following the steps in the ble_hs_pvcy if you are setting your own device to RPA. In general for RPA-RPA I would setup your sync as follows:
*Side note I've seen reference here that _infer_auto is unnecesary but this works for me so idk. Configure your ble_hs_config ensuring it has the store and key dists if you're in RPA mode on ESP
And define and call your template as described in the example
I hope this helps in anyway, just for reference this also worked for me on release/v5.0 of esp-idf Side note for anyone interested in setting/configuring their own IRK/LTK/CSRK's and not using the standard default credit here This ports cleanly into esp-nimble, though it does require overriding the bt component which may not be desired Best Regards, |
Hello @flonas955 @SlightlyStoopid I am using ESP-IDF 5.1.1 and nimble. I have enabled host based privacy for Random address. Despite following all the steps mentioned in the thread. I'm still facing the same issue. I have configured nimble for below settings as follows - Maximum number of concurrent connects = 1 `/* Initialize the NimBLE host configuration. */
`void ble_app_on_sync(void)
}` Please help me out. |
Hi @veneno-529 , can you please share the chip being used AND please help share debug enabled logs . Also if remote is nrf, then you can share the verbose log of nrf also. |
Hi @rahult-github the chip I'm using is ESP32-WROOM-32E. The below files attached contains logs when iphone 13 was connected for the first time to the system. The below files contains logs when android 14 device was connected for the first time to the system. The below file contains logs when Iphone13 was again connected to the system but throwed the error of peer device removed info. Let me know if you any more details. |
Hi @rahult-github any update regarding the issue? |
Hello,
I am currently developing an app for ESP32 using NimBLE, that will pair and bond with an Android and iOS application. I am using "just works" pairing method.
I have some problems with bonding, especially on iOS, where I receive the Error: Peer removed pairing information message. It will only pair again if I forget the device from the Bluetooth settings. I know that iOS uses RPA addresses and I have configured the board to resolve RPA addresses as detailed here, but it does not seem to work. Every time the iPhone changes its address, the bonding is no longer detected and the error appears.
With random addresses disabled on ESP32, there are problems with bonding persistence on Android also, but it appears only occasionally on Android devices. With random addresses enabled, the connection will no longer work on this OS.
I have already posted related questions on the ESP-IDF forum, but I had no aswers (here and here)
The current nimble-idf branch is nimble-1.3.0-idf and the latest commit hash is 5bb7b40. I can provide any extra information you might need.
Any suggestion would be very helpful.
Thank you,
Florin
The text was updated successfully, but these errors were encountered: