File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 55permissions=
66autoconnect=true
77autoconnect-retries=100
8+ autoconnect-priority=2
89
910[gsm]
1011apn=
Original file line number Diff line number Diff line change @@ -540,15 +540,16 @@ def configure_modem(self):
540540
541541 # eSIM prime
542542 if sim_id .startswith ('8985235' ):
543- with open ('/data/openpilot/system/hardware/tici/esim.nmconnection' ) as f , tempfile .NamedTemporaryFile (mode = 'w' ) as tf :
543+ dest = "/etc/NetworkManager/system-connections/esim.nmconnection"
544+ with open (Path (__file__ ).parent / 'esim.nmconnection' ) as f , tempfile .NamedTemporaryFile (mode = 'w' ) as tf :
544545 dat = f .read ()
545546 dat = dat .replace ("sim-id=" , f"sim-id={ sim_id } " )
546547 tf .write (dat )
547548 tf .flush ()
548549
549550 # needs to be root
550- os .system (f"sudo cp { tf .name } /data/etc/NetworkManager/system-connections/esim.nmconnection " )
551- os .system ("sudo nmcli con reload " )
551+ os .system (f"sudo cp { tf .name } { dest } " )
552+ os .system (f "sudo nmcli con load { dest } " )
552553
553554 def get_networks (self ):
554555 r = {}
@@ -617,5 +618,6 @@ def recover_internal_panda(self):
617618
618619if __name__ == "__main__" :
619620 t = Tici ()
621+ t .configure_modem ()
620622 t .initialize_hardware ()
621623 t .set_power_save (False )
You can’t perform that action at this time.
0 commit comments