From a96e729277d8455740023e031dfe62f79c86e104 Mon Sep 17 00:00:00 2001 From: gr3mlin Date: Wed, 9 Oct 2024 15:39:58 -0400 Subject: [PATCH 1/2] Update adafruit_rockblock.py Recommend using the CRISX AT command to pull ring alerts because it includes a timestamp field, which will be added to the returned tuple. The timestamp can be monitored to check for recent ring alerts. --- adafruit_rockblock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_rockblock.py b/adafruit_rockblock.py index c2ab5c9..e1c569a 100644 --- a/adafruit_rockblock.py +++ b/adafruit_rockblock.py @@ -295,7 +295,7 @@ def ring_indication(self) -> Tuple[Optional[str], ...]: Returns a tuple: (string, string) """ - resp = self._uart_xfer("+CRIS") + resp = self._uart_xfer("+CRISX") if resp[-1].strip().decode() == "OK": return tuple(resp[1].strip().decode().split(":")[1].split(",")) return (None,) * 2 From d2087614ceb62fd316807a94d2d7109b42b4adec Mon Sep 17 00:00:00 2001 From: foamyguy Date: Thu, 15 Jan 2026 09:04:26 -0600 Subject: [PATCH 2/2] add info to docs, merge main, return 3-tuple of None if no response. --- adafruit_rockblock.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/adafruit_rockblock.py b/adafruit_rockblock.py index b4a1ada..f3d43be 100644 --- a/adafruit_rockblock.py +++ b/adafruit_rockblock.py @@ -281,7 +281,7 @@ def ring_indication(self) -> tuple[Optional[str], ...]: The response contains separate indications for telephony and SBD ring indications. The response is in the form: - (,) + (,,) indicates the telephony ring indication status: 0 No telephony ring alert received. @@ -293,13 +293,18 @@ def ring_indication(self) -> tuple[Optional[str], ...]: 0 No SBD ring alert received. 1 SBD ring alert received. + 2-bit L-band Frame Number (i.e. Iridium System Time) of the most + recent SBD Ring Alert message received from the network, presented in hexadecimal + format (up to 8 characters). The value is invalid (or may refer to an earlier + Ring Alert) if =0. + Returns a tuple: - (string, string) + (string, string, string) """ resp = self._uart_xfer("+CRISX") if resp[-1].strip().decode() == "OK": return tuple(resp[1].strip().decode().split(":")[1].split(",")) - return (None,) * 2 + return (None,) * 3 @property def geolocation(