-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
peer_addr = null when doing directed advertising #501
Comments
the line with null: NimBLE-Arduino/src/NimBLEAdvertising.cpp Line 627 in 0d9f039
the line with null check:
|
Thanks for bringing this up, a new parameter should be added to advertising start in this case that takes the address. |
Is it possible to do directed advertise to a list and not a single peer_addr? |
Only a single address can be directly advertised to. |
It would also be nice if all errors did not use rc code 3 |
@h2zero will you write here when the bug is fixed? |
@ViktorRindom please check #507 and let me know if this works for you. |
@h2zero Im using Platformio how do I use the pull request version of the library? |
You can just use the branch name: |
When I do "BLE_GAP_CONN_MODE_UND" everything works but when I change to "BLE_GAP_CONN_MODE_DIR" I always get the error "Unable to advertise - Duration too long". I have found out that this is a result of the rc value of 3 (BLE_HS_EINVAL). This error code is used in a lot of places and I started replacing the values with my own unique error codes and found out that my error was peer_addr being null in the file ble_gap.c in the function ble_gap_adv_validate. But i cant fix this since the file NimBLEAdvertising.cpp puts null in the call ble_gap_adv_start.
TLDR: NimBLEAdvertising.cpp sets peer_addr to null and ble_gap.c returns an error if peer_addr is null
The text was updated successfully, but these errors were encountered: