Skip to content

Commit e4e6c64

Browse files
authored
Merge pull request #11204 from paul-szczepanek-arm/non-scan
BLE: add nonscannable connectable type
2 parents ce74bb5 + 71f59ea commit e4e6c64

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

features/FEATURE_BLE/ble/gap/Types.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ struct advertising_type_t : SafeEnum<advertising_type_t, uint8_t> {
152152
/**
153153
* Device is connectable, scannable and doesn't expect connection from a
154154
* specific peer.
155+
* @note Cannot carry extended advertising payload, only legacy PDUs.
156+
* Use CONNECTABLE_NON_SCANNABLE_UNDIRECTED for non-legacy payload.
155157
*
156158
* @see Vol 3, Part C, Section 9.3.4 and Vol 6, Part B, Section 2.3.1.1.
157159
*/
@@ -183,13 +185,21 @@ struct advertising_type_t : SafeEnum<advertising_type_t, uint8_t> {
183185
*/
184186
CONNECTABLE_DIRECTED_LOW_DUTY = 0x04,
185187

188+
/**
189+
* Device is connectable, but not scannable and doesn't expect connection from a specific peer.
190+
* @note Only for use with extended advertising payload, will not allow legacy PDUs
191+
* (use CONNECTABLE_UNDIRECTED for legacy PDU).
192+
*/
193+
CONNECTABLE_NON_SCANNABLE_UNDIRECTED = 0x05,
194+
186195
#if !defined(DOXYGEN_ONLY)
187196
// used by the PAL; naming in line with the the spec.
188197
ADV_IND = 0x00,
189198
ADV_DIRECT_IND = 0x01,
190199
ADV_SCAN_IND = 0x02,
191200
ADV_NONCONN_IND = 0x03,
192-
ADV_DIRECT_IND_LOW_DUTY_CYCLE = 0x04
201+
ADV_DIRECT_IND_LOW_DUTY_CYCLE = 0x04,
202+
ADV_NONSCAN_IND = 0x05
193203
#endif
194204
};
195205

features/FEATURE_BLE/ble/pal/GapTypes.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,9 @@ struct advertising_event_properties_t {
446446
break;
447447
case advertising_type_t::ADV_NONCONN_IND:
448448
break;
449+
case advertising_type_t::ADV_NONSCAN_IND:
450+
connectable = true;
451+
break;
449452
}
450453
}
451454

0 commit comments

Comments
 (0)