reboot when udp send error
This commit is contained in:
@@ -1136,6 +1136,20 @@ try:
|
|||||||
#parfois ici on peut avoir une erreur ERROR
|
#parfois ici on peut avoir une erreur ERROR
|
||||||
if "+CME ERROR" in response_SARA_2 or "ERROR" in response_SARA_2:
|
if "+CME ERROR" in response_SARA_2 or "ERROR" in response_SARA_2:
|
||||||
print('<span style="color: red;font-weight: bold;">⚠️ATTENTION: Error while sending data⚠️</span>')
|
print('<span style="color: red;font-weight: bold;">⚠️ATTENTION: Error while sending data⚠️</span>')
|
||||||
|
print('🛑STOP LOOP🛑')
|
||||||
|
print("<hr>")
|
||||||
|
|
||||||
|
#Send notification (WIFI)
|
||||||
|
send_error_notification(device_id, "UDP sending issue")
|
||||||
|
#Hardware Reboot
|
||||||
|
hardware_reboot_success = modem_hardware_reboot()
|
||||||
|
if hardware_reboot_success:
|
||||||
|
print("✅Modem successfully rebooted and reinitialized")
|
||||||
|
else:
|
||||||
|
print("⛔There were issues with the modem reboot/reinitialize process")
|
||||||
|
|
||||||
|
#end loop
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
|
||||||
#Read reply from server (USORD)
|
#Read reply from server (USORD)
|
||||||
|
|||||||
Reference in New Issue
Block a user