From 00c964abfb38fa49fc27cca14d8674254e7523de Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Tue, 26 Nov 2024 13:33:17 -0800 Subject: [PATCH] tici: more modem config (#34110) * tici: more modem config * separate those --------- Co-authored-by: Comma Device --- system/hardware/tici/hardware.py | 37 +++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/system/hardware/tici/hardware.py b/system/hardware/tici/hardware.py index 21e2c8fe1a..2692fc128a 100644 --- a/system/hardware/tici/hardware.py +++ b/system/hardware/tici/hardware.py @@ -452,17 +452,11 @@ class Tici(HardwareBase): manufacturer = None cmds = [] - if 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', - ] - elif self.get_device_type() in ("tici", "tizi"): + if self.get_device_type() in ("tici", "tizi"): + # clear out old blue prime initial APN + os.system('mmcli -m any --3gpp-set-initial-eps-bearer-settings="apn="') + cmds += [ # configure modem as data-centric 'AT+QNVW=5280,0,"0102000000000000"', @@ -470,14 +464,31 @@ class Tici(HardwareBase): 'AT+QNVFW="/nv/item_files/modem/mmode/ue_usage_setting",01', ] if self.get_device_type() == "tizi": + # SIM hot swap, not routed on tici cmds += [ - # SIM hot swap 'AT+QSIMDET=1,0', 'AT+QSIMSTAT=1', ] + 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: + cmds += [ + # SIM sleep disable + 'AT$QCSIMSLEEP=0', + 'AT$QCSIMCFG=SimPowerSave,0', + + # ethernet config + 'AT$QCPCFG=usbNet,1', + ] - # clear out old blue prime initial APN - os.system('mmcli -m any --3gpp-set-initial-eps-bearer-settings="apn="') for cmd in cmds: try: modem.Command(cmd, math.ceil(TIMEOUT), dbus_interface=MM_MODEM, timeout=TIMEOUT)