diff --git a/ublox-cellular/Cargo.toml b/ublox-cellular/Cargo.toml index 26704ae..f41cf06 100644 --- a/ublox-cellular/Cargo.toml +++ b/ublox-cellular/Cargo.toml @@ -16,7 +16,11 @@ doctest = false [dependencies] # atat = { version = "0.18", features = ["derive", "bytes"] } -atat = { git = "https://github.com/BlackbirdHQ/atat", rev = "c5caaf7", features = ["derive", "defmt", "bytes"] } +atat = { git = "https://github.com/BlackbirdHQ/atat", rev = "c5caaf7", features = [ + "derive", + "defmt", + "bytes", +] } embedded-hal = "=1.0.0-rc.1" embedded-nal = "0.6" hash32 = "^0.2.1" @@ -41,7 +45,12 @@ default = ["socket-udp", "socket-tcp"] async = ["atat/async"] # Use `defmt-impl to enable defmt based logging -defmt-impl = ["defmt", "ublox-sockets/defmt", "atat/defmt", "heapless/defmt-impl"] +defmt-impl = [ + "defmt", + "ublox-sockets/defmt", + "atat/defmt", + "heapless/defmt-impl", +] # Use `log-impl` to enable log based logging log-impl = ["log", "ublox-sockets/log", "atat/log"] diff --git a/ublox-cellular/src/client.rs b/ublox-cellular/src/client.rs index b5c4e44..c1c6509 100644 --- a/ublox-cellular/src/client.rs +++ b/ublox-cellular/src/client.rs @@ -26,8 +26,9 @@ use crate::{ SetGpioConfiguration, }, network_service::{ - responses::OperatorSelection, types::OperatorSelectionMode, GetOperatorSelection, - SetOperatorSelection, + responses::{OperatorSelection, SignalQuality}, + types::OperatorSelectionMode, + GetOperatorSelection, GetSignalQuality, SetOperatorSelection, }, psn::{types::PSEventReportingMode, SetPacketSwitchedEventReporting}, }, @@ -160,6 +161,9 @@ where self.sockets.take() } + pub fn signal_strength(&mut self) -> Result { + self.send_at(&GetSignalQuality) + } /// Run modem state machine /// /// Turns on modem if needed and processes URCs.