From 80c788e8272c458865f9e87055846314895efa43 Mon Sep 17 00:00:00 2001 From: Trey Moen Date: Sun, 22 Feb 2026 20:23:51 -0700 Subject: [PATCH 1/5] fix: mici sim hotswap --- system/hardware/tici/hardware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/hardware/tici/hardware.py b/system/hardware/tici/hardware.py index 2295ca3cba5143d..b36b7782ce1f6e1 100644 --- a/system/hardware/tici/hardware.py +++ b/system/hardware/tici/hardware.py @@ -464,7 +464,7 @@ def configure_modem(self): cmds = [] - if self.get_device_type() in ("tizi", ): + if self.get_device_type() in ("tizi", "mici"): # clear out old blue prime initial APN os.system('mmcli -m any --3gpp-set-initial-eps-bearer-settings="apn="') From 727688a4973d4ee70ad44d644bf3050d0d07ee26 Mon Sep 17 00:00:00 2001 From: Trey Moen Date: Sun, 22 Feb 2026 20:36:56 -0700 Subject: [PATCH 2/5] modem config: branch on modem model instead of device type Separate SIM hot swap commands (QSIMDET/QSIMSTAT) for EG25 and EG916, keep data-centric config for EG25 only, and remove Cavli block. Co-authored-by: Cursor --- system/hardware/tici/hardware.py | 34 ++++++++++++++------------------ 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/system/hardware/tici/hardware.py b/system/hardware/tici/hardware.py index b36b7782ce1f6e1..6e7abe991db0701 100644 --- a/system/hardware/tici/hardware.py +++ b/system/hardware/tici/hardware.py @@ -458,37 +458,33 @@ def configure_modem(self): modem = self.get_modem() try: - manufacturer = str(modem.Get(MM_MODEM, 'Manufacturer', dbus_interface=DBUS_PROPS, timeout=TIMEOUT)) + modem_model = str(modem.Get(MM_MODEM, 'Model', dbus_interface=DBUS_PROPS, timeout=TIMEOUT)) + modem_mfr = str(modem.Get(MM_MODEM, 'Manufacturer', dbus_interface=DBUS_PROPS, timeout=TIMEOUT)) except Exception: - manufacturer = None + modem_model = None + modem_mfr = None + print(f"configuring modem: {modem_mfr} {modem_model}") cmds = [] - if self.get_device_type() in ("tizi", "mici"): - # clear out old blue prime initial APN - os.system('mmcli -m any --3gpp-set-initial-eps-bearer-settings="apn="') - + if modem_model in ("EG25", "EG916"): + # SIM hot swap cmds += [ - # SIM hot swap 'AT+QSIMDET=1,0', 'AT+QSIMSTAT=1', + ] + + if modem_model == "EG25": + # clear out old blue prime initial APN + os.system('mmcli -m any --3gpp-set-initial-eps-bearer-settings="apn="') - # configure modem as data-centric + # configure modem as data-centric + cmds += [ 'AT+QNVW=5280,0,"0102000000000000"', 'AT+QNVFW="/nv/item_files/ims/IMS_enable",00', 'AT+QNVFW="/nv/item_files/modem/mmode/ue_usage_setting",01', ] - elif manufacturer == 'Cavli Inc.': - cmds += [ - 'AT^SIMSWAP=1', # use SIM slot, instead of internal eSIM - 'AT$QCSIMSLEEP=0', # disable SIM sleep - 'AT$QCSIMCFG=SimPowerSave,0', # more sleep disable - - # ethernet config - 'AT$QCPCFG=usbNet,0', - 'AT$QCNETDEVCTL=3,1', - ] - else: + elif modem_model != "EG916": # this modem gets upset with too many AT commands if sim_id is None or len(sim_id) == 0: cmds += [ From dafc72d84ee71fd2f7fb447525e8e4d2c768f1b0 Mon Sep 17 00:00:00 2001 From: Trey Moen Date: Sun, 22 Feb 2026 20:41:14 -0700 Subject: [PATCH 3/5] modem config: use firmware revision prefix instead of model string The EG25 reports its Model as "QUECTEL Mobile Broadband Module" via ModemManager dbus, not "EG25", so the model-based check never matched. Use the Revision field (e.g. "EG25GGBR07A08M2G", "EG916QGLLGR01A05M04") with startswith() for reliable modem identification. Co-Authored-By: Claude Opus 4.6 --- system/hardware/tici/hardware.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/system/hardware/tici/hardware.py b/system/hardware/tici/hardware.py index 6e7abe991db0701..eb9fc0faba99f98 100644 --- a/system/hardware/tici/hardware.py +++ b/system/hardware/tici/hardware.py @@ -458,23 +458,24 @@ def configure_modem(self): modem = self.get_modem() try: - modem_model = str(modem.Get(MM_MODEM, 'Model', dbus_interface=DBUS_PROPS, timeout=TIMEOUT)) - modem_mfr = str(modem.Get(MM_MODEM, 'Manufacturer', dbus_interface=DBUS_PROPS, timeout=TIMEOUT)) + modem_revision = str(modem.Get(MM_MODEM, 'Revision', dbus_interface=DBUS_PROPS, timeout=TIMEOUT)) except Exception: - modem_model = None - modem_mfr = None + modem_revision = None - print(f"configuring modem: {modem_mfr} {modem_model}") + print(f"configuring modem: {modem_revision}") cmds = [] - if modem_model in ("EG25", "EG916"): + is_eg25 = modem_revision is not None and modem_revision.startswith("EG25") + is_eg916 = modem_revision is not None and modem_revision.startswith("EG916") + + if is_eg25 or is_eg916: # SIM hot swap cmds += [ 'AT+QSIMDET=1,0', 'AT+QSIMSTAT=1', ] - if modem_model == "EG25": + if is_eg25: # clear out old blue prime initial APN os.system('mmcli -m any --3gpp-set-initial-eps-bearer-settings="apn="') @@ -484,7 +485,7 @@ def configure_modem(self): 'AT+QNVFW="/nv/item_files/ims/IMS_enable",00', 'AT+QNVFW="/nv/item_files/modem/mmode/ue_usage_setting",01', ] - elif modem_model != "EG916": + elif not is_eg916: # this modem gets upset with too many AT commands if sim_id is None or len(sim_id) == 0: cmds += [ From db76b861a0bc732df0f5389abb189a4381f9cfb6 Mon Sep 17 00:00:00 2001 From: Trey Moen Date: Sun, 22 Feb 2026 21:06:50 -0700 Subject: [PATCH 4/5] this --- system/hardware/tici/hardware.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/hardware/tici/hardware.py b/system/hardware/tici/hardware.py index eb9fc0faba99f98..deda0e90b5204e7 100644 --- a/system/hardware/tici/hardware.py +++ b/system/hardware/tici/hardware.py @@ -461,13 +461,13 @@ def configure_modem(self): modem_revision = str(modem.Get(MM_MODEM, 'Revision', dbus_interface=DBUS_PROPS, timeout=TIMEOUT)) except Exception: modem_revision = None - - print(f"configuring modem: {modem_revision}") - cmds = [] + finally: + print(f"modem revision: {modem_revision}") is_eg25 = modem_revision is not None and modem_revision.startswith("EG25") is_eg916 = modem_revision is not None and modem_revision.startswith("EG916") + cmds = [] if is_eg25 or is_eg916: # SIM hot swap cmds += [ From 67c5685836ac5cf2905b7dfd728a6aff919bd172 Mon Sep 17 00:00:00 2001 From: Trey Moen Date: Sun, 22 Feb 2026 21:20:41 -0700 Subject: [PATCH 5/5] modem config: simplify revision check Default to empty string, inline startswith checks directly. Co-authored-by: Cursor --- system/hardware/tici/hardware.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/system/hardware/tici/hardware.py b/system/hardware/tici/hardware.py index deda0e90b5204e7..9308692208192f5 100644 --- a/system/hardware/tici/hardware.py +++ b/system/hardware/tici/hardware.py @@ -460,22 +460,19 @@ def configure_modem(self): try: modem_revision = str(modem.Get(MM_MODEM, 'Revision', dbus_interface=DBUS_PROPS, timeout=TIMEOUT)) except Exception: - modem_revision = None + modem_revision = "" finally: print(f"modem revision: {modem_revision}") - is_eg25 = modem_revision is not None and modem_revision.startswith("EG25") - is_eg916 = modem_revision is not None and modem_revision.startswith("EG916") - cmds = [] - if is_eg25 or is_eg916: + if modem_revision.startswith("EG25") or modem_revision.startswith("EG916"): # SIM hot swap cmds += [ 'AT+QSIMDET=1,0', 'AT+QSIMSTAT=1', ] - if is_eg25: + if modem_revision.startswith("EG25"): # clear out old blue prime initial APN os.system('mmcli -m any --3gpp-set-initial-eps-bearer-settings="apn="') @@ -485,7 +482,7 @@ def configure_modem(self): 'AT+QNVFW="/nv/item_files/ims/IMS_enable",00', 'AT+QNVFW="/nv/item_files/modem/mmode/ue_usage_setting",01', ] - elif not is_eg916: + elif not modem_revision.startswith("EG916"): # this modem gets upset with too many AT commands if sim_id is None or len(sim_id) == 0: cmds += [