Skip to content

Workarounds for GAP advertising issues on Cordio #10772

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

Merged
merged 2 commits into from
Jun 9, 2019

Conversation

LDong-Arm
Copy link
Contributor

@LDong-Arm LDong-Arm commented Jun 6, 2019

Description

Due to possible issues in Cordio link layer, GAP payload is not advertised if it is set before adverting parameters is. This impacts both new and legacy APIs.

Workarounds:
API v1: Force setAdvertisingData during startAdvertising, to ensure data gets advertised.
API v2: Delay setExtendedAdvertisingParameters to the first use of API v2. Previously this was done during GenericGap initialisation and always failed because the stack was not ready.

This PR depends on #10709 since nRF52/nRF52840 on Cordio stack is needed in order to reproduce the issue (and test this PR).

(Thanks to @pan- for help with debugging and proposed workarounds.)

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@pan- @paul-szczepanek-arm

LDong-Arm added 2 commits June 6, 2019 10:49
Previously, extended advertising parameters failed to be set
during BLE initialisation when the stack was not ready.

To work around this, we delay it to the first use of
useVersionTwoAPI.
Due to some issue in Cordio link layer, advertising data does not
take effect unless we set it (or set it again) after advertising
parameters are set.
@40Grit
Copy link

40Grit commented Jun 6, 2019

@AGlass0fMilk

@ciarmcom ciarmcom requested review from pan-, paul-szczepanek-arm and a team June 6, 2019 11:00
@ciarmcom
Copy link
Member

ciarmcom commented Jun 6, 2019

@LDong-Arm, thank you for your changes.
@pan- @paul-szczepanek-arm @ARMmbed/mbed-os-pan @ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 7, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jun 7, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@0xc0170 0xc0170 merged commit 42dbcbd into ARMmbed:master Jun 9, 2019
@LDong-Arm LDong-Arm deleted the GenericGap_advParams branch June 18, 2019 10:29
LDong-Arm added a commit to LDong-Arm/mbed-os that referenced this pull request Mar 31, 2020
This is based on (and supercedes) PR ARMmbed#10772.

As the switches between old and new APIs do not exist anymore,
we create a function for legacy advertising set creation.
LDong-Arm added a commit to LDong-Arm/mbed-os that referenced this pull request Apr 3, 2020
This is based on (and supercedes) PR ARMmbed#10772.

As the switches between old and new APIs do not exist anymore,
we create a function for legacy advertising set creation.
LDong-Arm added a commit to LDong-Arm/mbed-os that referenced this pull request Apr 6, 2020
This is based on (and supercedes) PR ARMmbed#10772.

As the switches between old and new APIs do not exist anymore,
we create a function for legacy advertising set creation.
LDong-Arm added a commit to LDong-Arm/mbed-os that referenced this pull request Apr 17, 2020
This is based on (and supercedes) PR ARMmbed#10772.

As the switches between old and new APIs do not exist anymore,
we create a function for legacy advertising set creation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants