From 2f75d7788323490287977b96e1df4978b3f4dc0e Mon Sep 17 00:00:00 2001 From: Kenneth Knudsen Date: Tue, 30 Jan 2024 12:32:12 +0100 Subject: [PATCH] use retry send to initialize and check urc's --- ublox-short-range/src/client.rs | 6 +++--- ublox-short-range/src/wifi/sta.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ublox-short-range/src/client.rs b/ublox-short-range/src/client.rs index 9d75e80..0ee4157 100644 --- a/ublox-short-range/src/client.rs +++ b/ublox-short-range/src/client.rs @@ -275,7 +275,7 @@ where } // TODO: handle EDM settings quirk see EDM datasheet: 2.2.5.1 AT Request Serial settings - self.send_internal( + self.retry_send( &EdmAtCmdWrapper(SetRS232Settings { baud_rate: BaudRate::B115200, flow_control: FlowControl::On, @@ -284,7 +284,7 @@ where parity: Parity::None, change_after_confirm: ChangeAfterConfirm::ChangeAfterOK, }), - false, + 5, )?; if let Some(hostname) = self.config.hostname.clone() { @@ -343,7 +343,7 @@ where } pub fn firmware_version(&mut self) -> Result { - let response = self.send_internal(&EdmAtCmdWrapper(SoftwareVersion), false)?; + let response = self.send_internal(&EdmAtCmdWrapper(SoftwareVersion), true)?; Ok(response.version) } diff --git a/ublox-short-range/src/wifi/sta.rs b/ublox-short-range/src/wifi/sta.rs index b2fc866..243ecc8 100644 --- a/ublox-short-range/src/wifi/sta.rs +++ b/ublox-short-range/src/wifi/sta.rs @@ -207,7 +207,7 @@ where config_id: CONFIG_ID, action: WifiStationAction::Reset, }), - false, + true, )?; Ok(()) }