Skip to content

Commit e1d1753

Browse files
authored
Merge pull request #14111 from paul-szczepanek-arm/ble-fix-ext
BLE: fix scanning/advertising when extended features are available but disabled on host
2 parents 9c0cfa9 + 6746573 commit e1d1753

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

connectivity/FEATURE_BLE/source/cordio/source/PalGapImpl.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,11 @@ ble_error_t PalGap::periodic_advertising_enable(
12091209

12101210
uint16_t PalGap::get_maximum_advertising_data_length()
12111211
{
1212+
#if BLE_FEATURE_EXTENDED_ADVERTISING
12121213
return HciGetMaxAdvDataLen();
1214+
#else
1215+
return HCI_ADV_DATA_LEN;
1216+
#endif // BLE_FEATURE_EXTENDED_ADVERTISING
12131217
}
12141218

12151219

connectivity/drivers/ble/FEATURE_BLE/TARGET_NORDIC/TARGET_NORDIC_CORDIO/TARGET_NRF5x/NRFCordioHCIDriver.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,10 @@ void NRFCordioHCIDriver::do_terminate()
326326

327327
void NRFCordioHCIDriver::start_reset_sequence()
328328
{
329+
#if BLE_FEATURE_EXTENDED_ADVERTISING
329330
// Make sure extended adv is init
330331
DmExtAdvInit();
332+
#endif // BLE_FEATURE_EXTENDED_ADVERTISING
331333

332334
CordioHCIDriver::start_reset_sequence();
333335
}

0 commit comments

Comments
 (0)