-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Gap::addDeviceToPeriodicAdvertiserList always return BLE_ERROR_INVALID_PARAM #11574
Comments
cc @ARMmbed/mbed-os-pan |
Thank you for raising this detailed GitHub issue. I am now notifying our internal issue triagers. |
Parameter check fixed in #13822 but further issues remain with creating syncs based on the list. This is tracked internally and will be addressed asap. |
Turned out to be quite hard to track down, PR is up: |
This is now fixed on master. |
Description
Trying to sync to several peers who use periodic advertising. Sync to single peer works.
Then I try to use Gap::addDeviceToPeriodicAdvertiserList and Gap::createSync to the list.
But Gap::addDeviceToPeriodicAdvertiserList always return BLE_ERROR_INVALID_PARAM after checking peerAddressType even if I provide proper peer address type.
I took a look in the code and found this:
if (peerAddressType != PeerAddressType_t::PUBLIC || peerAddressType != PeerAddressType_t::RANDOM ) { return BLE_ERROR_INVALID_PARAM; }
at /features/FEATURE_BLE/source/generic/GenericGap.tpp
This will always return BLE_ERROR_INVALID_PARAM even if you provide proper PUBLIC or RANDOM peer address type.
After fixing this if statement, sync to the list does not work, after createSync called there are no events at all, no timeouts, nothing.
Target is NRF52840 custom board. Mbed 5.13.
Issue request type
The text was updated successfully, but these errors were encountered: