-
Notifications
You must be signed in to change notification settings - Fork 51
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
Allow host to resolve peer RPA without using local RPA. #7
Allow host to resolve peer RPA without using local RPA. #7
Conversation
It is possible that scheduler already fired and aux data is NULL so we should unref it only if scheduler item was removed. ble_ll_scan_aux_data_unref (aux_data=<optimized out>) at repos/apache-mynewt-nimble/nimble/controller/src/ble_ll_scan.c:1079 1079 BLE_LL_ASSERT(aux_data); (gdb) bt #0 ble_ll_scan_aux_data_unref (aux_data=<optimized out>) at repos/apache-mynewt-nimble/nimble/controller/src/ble_ll_scan.c:1079 espressif#1 0x0001f732 in ble_ll_scan_rx_pkt_in_on_aux (pdu_type=<optimized out>, om=0x2000d6f8 <os_msys_1_data>, hdr=0x2000d710 <os_msys_1_data+24>, addrd=addrd@entry=0x20004ecc <g_ble_ll_stack+404>) at repos/apache-mynewt-nimble/nimble/controller/src/ble_ll_scan.c:3156 espressif#2 0x0002010e in ble_ll_scan_rx_pkt_in (ptype=ptype@entry=7 '\a', om=om@entry=0x2000d6f8 <os_msys_1_data>, hdr=hdr@entry=0x2000d710 <os_msys_1_data+24>) at repos/apache-mynewt-nimble/nimble/controller/src/ble_ll_scan.c:3198 espressif#3 0x0001299e in ble_ll_rx_pkt_in () at repos/apache-mynewt-nimble/nimble/controller/src/ble_ll.c:837 espressif#4 0x000129de in ble_ll_event_rx_pkt (ev=<optimized out>) at repos/apache-mynewt-nimble/nimble/controller/src/ble_ll.c:1164 espressif#5 0x00012830 in ble_npl_event_run (ev=<optimized out>) at repos/apache-mynewt-nimble/porting/npl/mynewt/include/nimble/nimble_npl_os.h:116 espressif#6 ble_ll_task (arg=<optimized out>) at repos/apache-mynewt-nimble/nimble/controller/src/ble_ll.c:1214 espressif#7 0x00038e9c in nrf52_clock_hfxo_release () at repos/apache-mynewt-core/hw/mcu/nordic/nrf52xxx/include/mcu/cortex_m4.h:37 espressif#8 0x00000000 in ?? ()
Hi @h2zero , |
Hi @prasad-alatkar, thanks, I'll give it a try that way and get back to you. I should note that this patch still adds the peer to the resolving list, unless I missed something? |
@prasad-alatkar I have tested as you suggested with |
@h2zero Yes, just |
@prasad-alatkar If I understand you correctly, you want to avoid using cycles looking up peers in the resolve list etc if RPA is not enabled by the app, I agree. However I would, as a user, suggest that we should default to using the RPA; 2 parameter in your post as that seems to be the expected outcome from users and I believe is the default behavior of the bluedroid library (not sure?). If that is not desired then this function should be very well documented or there may be many issues posted with answers that look like: "Change line x to |
@prasad-alatkar I'm going to put some work into this over the weekend, hopefully the |
@h2zero sorry for not responding earlier, caught up with some work. Before working on |
@prasad-alatkar No worries 😃, seeing some good initial results already and identified a couple spots for further refinement. I'm enjoying the learning process, I didn't even know |
@prasad-alatkar Updated code and refined a bit, works well but I found a new bug that is related to but not created by this PR. I'll post an issue for it. |
a554101
to
b6fda46
Compare
@h2zero I have left a few comments. Apart from that looks good !! |
@prasad-alatkar, I see now what you're looking for, I'll go through it when I get a chance. |
b6fda46
to
42fef9c
Compare
@prasad-alatkar Sorry for the confusion, I guess I wasn't sure of your direction but I think I got it now😃. Updated with a commit to resolve #10 as requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. Have reviewed and approved. Thanks @h2zero!
Awesome, thanks! |
Thanks @prasad-alatkar, no problem, I'm just glad to see it got included 😄 |
… (backport v3.3) Change list: - Reduces the size of the compiled binary, PR: espressif/esp-nimble#6 - Null pointer check, PR: apache/mynewt-nimble#701 - Pairing procedure abort on unexpected req: apache/mynewt-nimble#710 - Fix conn flags after pairing: apache/mynewt-nimble#730 - Remove notification for update process timeout (Vol 6, Part B, section 5.2 ): apache/mynewt-nimble#782 - CCCD fix : apache/mynewt-nimble#790 and apache/mynewt-nimble#804 - Host based Privacy (RPA) fix: espressif/esp-nimble#7 Closes espressif/esp-nimble#10 Closes espressif/esp-idf#4413
… (backport v4.0) Change list: - Reduces the size of the compiled binary, PR: espressif/esp-nimble#6 - Null pointer check, PR: apache/mynewt-nimble#701 - Pairing procedure abort on unexpected req: apache/mynewt-nimble#710 - Fix conn flags after pairing: apache/mynewt-nimble#730 - Remove notification for update process timeout (Vol 6, Part B, section 5.2 ): apache/mynewt-nimble#782 - CCCD fix : apache/mynewt-nimble#790 and apache/mynewt-nimble#804 - Host based Privacy (RPA) fix: espressif/esp-nimble#7 Closes espressif/esp-nimble#10 Closes #4413
… (backport v4.1) Change list: - Reduces the size of the compiled binary, PR: espressif/esp-nimble#6 - Null pointer check, PR: apache/mynewt-nimble#701 - Pairing procedure abort on unexpected req: apache/mynewt-nimble#710 - Fix conn flags after pairing: apache/mynewt-nimble#730 - Remove notification for update process timeout (Vol 6, Part B, section 5.2 ): apache/mynewt-nimble#782 - CCCD fix : apache/mynewt-nimble#790 and apache/mynewt-nimble#804 - Host based Privacy (RPA) fix: espressif/esp-nimble#7 Closes espressif/esp-nimble#10 Closes #4413
This solves an issue of not being able to resolve a bonded peer's address without the host RPA being enabled. I.E when a phone bonds with a peripheral with a static address it will not resolve and correctly identify the phone peer as bonded upon reconnection. This PR solves that issue.
h2zero/NimBLE-Arduino#11