Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion features/FEATURE_BLE/ble/gap/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ struct advertising_type_t : SafeEnum<advertising_type_t, uint8_t> {
/**
* Device is connectable, scannable and doesn't expect connection from a
* specific peer.
* @note Cannot carry extended advertising payload, only legacy PDUs.
* Use CONNECTABLE_NON_SCANNABLE_UNDIRECTED for non-legacy payload.
*
* @see Vol 3, Part C, Section 9.3.4 and Vol 6, Part B, Section 2.3.1.1.
*/
Expand Down Expand Up @@ -183,13 +185,21 @@ struct advertising_type_t : SafeEnum<advertising_type_t, uint8_t> {
*/
CONNECTABLE_DIRECTED_LOW_DUTY = 0x04,

/**
* Device is connectable, but not scannable and doesn't expect connection from a specific peer.
* @note Only for use with extended advertising payload, will not allow legacy PDUs
* (use CONNECTABLE_UNDIRECTED for legacy PDU).
*/
CONNECTABLE_NON_SCANNABLE_UNDIRECTED = 0x05,

#if !defined(DOXYGEN_ONLY)
// used by the PAL; naming in line with the the spec.
ADV_IND = 0x00,
ADV_DIRECT_IND = 0x01,
ADV_SCAN_IND = 0x02,
ADV_NONCONN_IND = 0x03,
ADV_DIRECT_IND_LOW_DUTY_CYCLE = 0x04
ADV_DIRECT_IND_LOW_DUTY_CYCLE = 0x04,
ADV_NONSCAN_IND = 0x05
#endif
};

Expand Down
3 changes: 3 additions & 0 deletions features/FEATURE_BLE/ble/pal/GapTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.

break;
}
}

Expand Down