From 1cfb25eab9d0a4a4798d82386ac108a56a378a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Pol=C3=A1=C4=8Dek?= Date: Thu, 14 Nov 2024 20:14:10 +0100 Subject: [PATCH] Test out parsing cellid --- nrf52840/src/bg77.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nrf52840/src/bg77.rs b/nrf52840/src/bg77.rs index 706de7f..410310b 100644 --- a/nrf52840/src/bg77.rs +++ b/nrf52840/src/bg77.rs @@ -126,9 +126,12 @@ impl BG77 { self.uart1 .call("AT+QCSQ", MINIMUM_TIMEOUT, &[1, 2, 3]) .await?; - self.uart1 + let (_, status, cellid) = self + .uart1 .call("AT+CEREG?", MINIMUM_TIMEOUT, &[0, 1, 3]) - .await?; + .await? + .parse3::>()?; + info!("Registration info: {} {}", status, cellid.as_str()); self.uart1 .call("AT+QMTCONN?", MINIMUM_TIMEOUT, &[0, 1]) .await?;