Rework UE activation scripts

new adb script
This commit is contained in:
Robert Schmidt
2023-02-23 17:37:31 +01:00
parent 5d78609871
commit 503a6b1a8b
2 changed files with 64 additions and 6 deletions
+9 -6
View File
@@ -32,7 +32,7 @@
import sys
import time
import serial
import subprocess as sp
class qtel_ctl:
#---------------
@@ -75,12 +75,15 @@ class qtel_ctl:
self.__set_modem_state(self.modem,'0')
if __name__ == "__main__":
#argv[1] : usb port
#argv[2] : qtel command (see function pointers dict "wup", "detach" etc ...)
command = sys.argv[2]
Module=qtel_ctl(sys.argv[1])
if len(sys.argv) >= 3:
command = sys.argv[2]
print(command)
Module=qtel_ctl(sys.argv[1])
#calling the function to be applied
Module.cmd_dict[command]()
Module.cmd_dict[command]()
print(Module.cmd_dict[command])
else:
print("To many arguments")