From 9574eee0e3df2094de408be7c968cc648af8b1a1 Mon Sep 17 00:00:00 2001 From: Andi Radulescu Date: Tue, 12 May 2026 19:42:22 +0300 Subject: [PATCH] modem.py: normalize padded ICCIDs (#38021) modem: normalize padded ICCIDs --- system/hardware/tici/modem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/hardware/tici/modem.py b/system/hardware/tici/modem.py index ebefd90c01..cb25d501d1 100755 --- a/system/hardware/tici/modem.py +++ b/system/hardware/tici/modem.py @@ -308,7 +308,7 @@ class Modem: if not (imei.isdigit() and 14 <= len(imei) <= 17): # 3GPP TS 23.003 imei = "" - iccid = self._atv("AT+QCCID", "+QCCID:") or "" + iccid = (self._atv("AT+QCCID", "+QCCID:") or "").rstrip("F") if not iccid.isdigit(): iccid = "" @@ -387,7 +387,7 @@ class Modem: def _check_iccid(self, state): if state in (State.INITIALIZING, State.DISCONNECTING) or not self.S["iccid"]: return - iccid = self._atv("AT+QCCID", "+QCCID:") + iccid = (self._atv("AT+QCCID", "+QCCID:") or "").rstrip("F") if iccid and iccid != self.S["iccid"]: logging.warning(f"iccid changed: {self.S['iccid']} -> {iccid}") self._sim_change = True