diff --git a/nimble/controller/src/ble_ll_scan.c b/nimble/controller/src/ble_ll_scan.c index d62620cd1..5f7fe5929 100644 --- a/nimble/controller/src/ble_ll_scan.c +++ b/nimble/controller/src/ble_ll_scan.c @@ -2691,14 +2691,16 @@ ble_ll_set_ext_scan_params(uint8_t *cmd) } #endif - /* For now we don't accept request for continuous scan if 2 PHYs are - * requested. + /* If host requests continuous scan for 2 PHYs, we double scan interval + * and split it for two equal scan windows between 2 PHYs */ - if ((cmd[2] == - (BLE_HCI_LE_PHY_1M_PREF_MASK | BLE_HCI_LE_PHY_CODED_PREF_MASK)) && + if ((coded->configured && uncoded->configured) && ((uncoded->scan_itvl == uncoded->scan_window) || (coded->scan_itvl == coded-> scan_window))) { - return BLE_ERR_INV_HCI_CMD_PARMS; + + uncoded->scan_itvl *= 2; + coded-> scan_itvl = uncoded->scan_itvl; + coded->scan_window = uncoded->scan_window; } memcpy(g_ble_ll_scan_params, new_params, sizeof(new_params));