diff --git a/nrf-softdevice/src/ble/central.rs b/nrf-softdevice/src/ble/central.rs index 0f6f3276..7a829363 100644 --- a/nrf-softdevice/src/ble/central.rs +++ b/nrf-softdevice/src/ble/central.rs @@ -68,6 +68,18 @@ pub async fn connect(_sd: &Softdevice, config: &ConnectConfig<'_>) -> Result { + let phys = config.scan_config.phys; + if phys as u8 & PhySet::M2 as u8 != 0 { + let p_gap_phys = raw::ble_gap_phys_t { + tx_phys: phys as u8, + rx_phys: phys as u8, + }; + let ret = raw::sd_ble_gap_phy_update(conn_handle, &p_gap_phys); + if let Err(_err) = RawError::convert(ret) { + warn!("sd_ble_gap_phy_update err {:?}", _err); + } + } + #[cfg(any(feature = "s113", feature = "s132", feature = "s140"))] crate::ble::gap::do_data_length_update(conn_handle, ptr::null());