Combine Dependencies; Other Improvements
-Removed CPU intensive python based telnet server option -Removed Micropython -Renamed AT Telnet Daemon socat-at bridge -Moved TTL related files not part of the www/cgi-bin directory to /simplefirewall -Improved Simplefirewall menu, added ability to change TTL -Combined uninstall and install functions for simpleadmin and dependencies into single functions
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
#!/usrdata/micropython/micropython
|
||||
|
||||
# Add the /usrdata/micropython directory to sys.path so we can find the external modules.
|
||||
# TODO: Move external modules to lib?
|
||||
# TODO: Recompile Micropython with a syspath set up for our use case.
|
||||
import sys
|
||||
# Remove the home directory from sys.path.
|
||||
if "~/.micropython/lib" in sys.path:
|
||||
sys.path.remove("~/.micropython/lib")
|
||||
sys.path.append("/usrdata/micropython")
|
||||
|
||||
import serial
|
||||
import uos
|
||||
|
||||
|
||||
atcmd = sys.argv[1]
|
||||
|
||||
ser = serial.Serial("/dev/ttyOUT", baudrate=115200)
|
||||
ser.write(atcmd + "\r\n")
|
||||
|
||||
uos.system("sleep 0.025s")
|
||||
# wait for an OK
|
||||
out=r''
|
||||
while ser.in_waiting > 0:
|
||||
out += ser.read(1)
|
||||
|
||||
if "OK" not in str(out):
|
||||
print('Error NOT OK')
|
||||
|
||||
print(out.decode('utf-8'))
|
||||
ser.close()
|
||||
Reference in New Issue
Block a user