update
This commit is contained in:
@@ -774,7 +774,7 @@ try:
|
||||
# Getting the LTE Signal
|
||||
print("➡️Getting LTE signal")
|
||||
ser_sara.write(b'AT+CSQ\r')
|
||||
response2 = read_complete_response(ser_sara, wait_for_lines=["OK", "ERROR", "+CME ERROR"])
|
||||
response2 = read_complete_response(ser_sara, wait_for_lines=["OK", "ERROR", "+CME ERROR","Socket:bind"])
|
||||
print('<p class="text-danger-emphasis">')
|
||||
print(response2)
|
||||
print("</p>", end="")
|
||||
@@ -797,12 +797,25 @@ try:
|
||||
#end loop
|
||||
sys.exit()
|
||||
|
||||
#2. si on a une erreur
|
||||
#2. si on a une reponse du SARA mais c'est une erreur
|
||||
elif "+CME ERROR" in response2:
|
||||
print(f"SARA module returned error: {response2}")
|
||||
print("The CSQ command is not supported by this module or in its current state")
|
||||
print("⚠️ATTENTION: SARA is connected over serial but CSQ command not supported")
|
||||
print('🛑STOP LOOP🛑')
|
||||
print("<hr>")
|
||||
|
||||
#end loop
|
||||
sys.exit()
|
||||
|
||||
#3. On peut avoir une erreur de type "Socket:bind: Treck error 222 : Invalid argument"
|
||||
elif "Socket:bind: Treck error" in response2:
|
||||
print(f"SARA module returned error: {response2}")
|
||||
print("⚠️ATTENTION: low-level error from the Treck TCP/IP stack")
|
||||
print('🛑STOP LOOP🛑')
|
||||
print("<hr>")
|
||||
#Send notification (WIFI)
|
||||
send_error_notification(device_id, "Treck TCP/IP stack error")
|
||||
#end loop
|
||||
sys.exit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user