mirror of https://github.com/ARMmbed/mbed-os.git
reject conenct request if exteneded not enabled but required
parent
b8db58fe57
commit
b59b29ba9f
|
@ -622,6 +622,13 @@ ble_error_t GenericGap::connect(
|
|||
return BLE_ERROR_INVALID_PARAM;
|
||||
}
|
||||
|
||||
if (!is_extended_advertising_available()) {
|
||||
ble::phy_set_t set(connectionParams.getPhySet());
|
||||
if (set.count() != 1 || set.get_1m() == false) {
|
||||
return BLE_ERROR_INVALID_PARAM;
|
||||
}
|
||||
}
|
||||
|
||||
return _pal_gap.extended_create_connection(
|
||||
(ble::pal::initiator_policy_t::type)connectionParams.getFilterPolicy(),
|
||||
(ble::pal::own_address_type_t::type)connectionParams.getOwnAddressType().value(),
|
||||
|
|
Loading…
Reference in New Issue