Merge pull request #11204 from paul-szczepanek-arm/non-scan

BLE: add nonscannable connectable type
pull/10750/head
Martin Kojtal 2019-08-20 13:58:32 +02:00 committed by GitHub
commit e4e6c645fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 1 deletions

View File

@ -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.
*/
@ -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
};

View File

@ -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;
break;
}
}