Skip to content

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 a team and donatieng 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

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