Skip to content

BLE: add nonscannable connectable type #11204

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
Aug 20, 2019

Conversation

paul-szczepanek-arm
Copy link
Member

Description

GAP was missing an advertising type that would allow to attach an extended advertising payload (non-legacy PDU) and also be connectable. This adds this type. This is caused by the limitation where extended pdu cannot be added to advertising that is both scannable and connectable.

Pull request type

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

Reviewers

@donatieng

Release Notes

Adds new type, existing functionality unchanged.

@ciarmcom ciarmcom requested review from donatieng and a team August 12, 2019 17:00
@ciarmcom
Copy link
Member

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

Copy link
Contributor

@donatieng donatieng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks @paul-szczepanek-arm

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 19, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Aug 19, 2019

Test run: SUCCESS

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

@@ -446,6 +446,9 @@ struct advertising_event_properties_t {
break;
case advertising_type_t::ADV_NONCONN_IND:
break;
case advertising_type_t::ADV_NONSCAN_IND:
connectable = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use_legacy_pdu should be set too false.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed it was, seeing as only a few lines above there's a:

 use_legacy_pdu = true;

but apparently the default is already true

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the default constructor does set it to false and either way it's irrelevant since the type shouldn't set it as it's set by an explicit passed in parameter.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    pal::advertising_event_properties_t event_properties(params.getType());
    event_properties.use_legacy_pdu = params.getUseLegacyPDU();

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed this and the changes required to make this neat are outside of scope for this PR and functionally the code is correct.

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.

6 participants