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
Multiple periphals with RPA won't be able to be identified. #24
Comments
@qinwang717 , I believe it is because both the ESP32 devices use same(default) local IRK (Identity Resolving keys). Can you please try calling |
Hi @prasad-alatkar Thanks a lot! It seems to be the issue! I called ble_hs_pvcy_set_our_irk in sync_cb now two devices seems to get identified! However how the central is not resolving the new address - if I pair and bond one device, and when the device changes to a new address, I need to do the pairing and bonding again on the central. Seems like customised IRK is not fully working. |
This is the code snap:
loadCustomedIrk is called first thing in bleprph_on_sync. Any idea what am I missing? Thanks a lot! |
In case other people run into this problem. However, I do not see another solution. De problem qinwang717 is running into looks to be caused by the way I've patched this in IDF 4.1.1 with the patch file below (MIT license). This patch changes the default IRK constantthat is used by nimble to a method that you can implement in your own code.
|
Any update on this? |
Current IDF version have below functionality now:
So, latest codebase should address the issues. |
@rahult-github could you comment on which tags address the issue? if none, which branches? thanks |
Hi @greenaddress , The change is on nimble-1.5.0-idf .. so v5.2 and v5.1 only |
Hi, I have 2 esp32 devkits configured as ble peripherals running in parallel. And with the RPA feature enabled. I found ble central sometimes won't able to tell those 2 devices apart when the peripheral's address changes.
Two devices have advertising names as "nimble-bleprph-1" and "nimble-bleprph-2" separately. Both of the devkits are running the same code from idf v4.2 bleprph example, with RPA enabled. The patch I am using to enable RPA is attached.
[
NimBLE_RPA_Example_use_bleprph (1).txt
](url). This is from this issue: #8
I'm trying to connect to devices separately via a central - my mobile phone, using apps like nRF and other ble scanner apps. I noticed that two devices are not identified separately: sometimes in the scanning, they are shown as one device, with the name flickering between "nimble-bleprph-1" and "nimble-bleprph-2". Under this situation I can't really tell which device is this.
Even when the flickering doesn't appear, so when the devices are shown as two separate devices named nimble-bleprph-1 and nimble-bleprph-2, the connection will go across the devices sometimes, especially when the previously connected device has changed the address. E.g. I connect to nimble-bleprph-1, disconnect, then connect, somehow the connect request will goes to nimble-bleprph-2. So the central thinks that nimble-bleprph-2 is the new nimble-bleprph-1 after the address changed.
I attached a video to demonstrate this issue, in this video, on the left side of the screen is nimble-bleprph-1, and on the right is nimble-bleprph-2, you can see that in the video. I've been trying to interact with nimble-bleprph-1 on my phone, but around 1min9sec, the connection status in nimble-bleprph-2 is changed, seems like the central is requesting connect to nimble-bleprph-2 instead.
video here:
https://drive.google.com/file/d/1yh_ECcmfc-AiKl-GncQE6e2lOYd98dV8/view?usp=sharing
I have tried running 2 peripherals without the RPA patch, which seems working fine. They are always identified separately. Also I have tried other apps, so I don't think it's because of how nRF is handling it.
Anyone else has seen this issue? Is this because the RPA in the peripherals is not configured properly? Why is the central can't tell the devices apart? Is it something to do with how the IRK is resolved I guess? Thanks!
The text was updated successfully, but these errors were encountered: