This commit is contained in:
root
2025-06-05 16:48:38 +02:00
parent fcc30243f5
commit 057dc7d87b

View File

@@ -1068,6 +1068,7 @@ try:
# Display interpretation based on error code # Display interpretation based on error code
if error_code == 0: if error_code == 0:
print('<p class="text-success">No error detected</p>') print('<p class="text-success">No error detected</p>')
# INVALID SERVER HOSTNAME
elif error_code == 4: elif error_code == 4:
print('<p class="text-danger">Error 4: Invalid server Hostname</p>') print('<p class="text-danger">Error 4: Invalid server Hostname</p>')
send_error_notification(device_id, "UHTTPER (error n°4) -> Invalid Server Hostname") send_error_notification(device_id, "UHTTPER (error n°4) -> Invalid Server Hostname")
@@ -1076,9 +1077,15 @@ try:
print("✅server hostname reset successfully") print("✅server hostname reset successfully")
else: else:
print("⛔There were issues with the modem server hostname reinitialize process") print("⛔There were issues with the modem server hostname reinitialize process")
# SERVER CONNECTION ERROR
elif error_code == 11: elif error_code == 11:
print('<p class="text-danger">Error 11: Server connection error</p>') print('<p class="text-danger">Error 11: Server connection error</p>')
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")
# PSD OR CSD ERROR
elif error_code == 22: elif error_code == 22:
print('<p class="text-danger">⚠Error 22: PSD or CSD connection not established (SARA-R5 need to reset PDP conection)⚠️</p>') print('<p class="text-danger">⚠Error 22: PSD or CSD connection not established (SARA-R5 need to reset PDP conection)⚠️</p>')
send_error_notification(device_id, "UHTTPER (error n°22) -> PSD or CSD connection not established") send_error_notification(device_id, "UHTTPER (error n°22) -> PSD or CSD connection not established")
@@ -1087,12 +1094,15 @@ try:
print("✅PSD CSD connection reset successfully") print("✅PSD CSD connection reset successfully")
else: else:
print("⛔There were issues with the modem CSD PSD reinitialize process") print("⛔There were issues with the modem CSD PSD reinitialize process")
# CONNECTION TIMED OUT
elif error_code == 26: elif error_code == 26:
print('<p class="text-danger">Error 26: Connection timed out</p>') print('<p class="text-danger">Error 26: Connection timed out</p>')
send_error_notification(device_id, "UHTTPER (error n°26) -> Connection timed out") send_error_notification(device_id, "UHTTPER (error n°26) -> Connection timed out")
# CONNECTION LOST
elif error_code == 44: elif error_code == 44:
print('<p class="text-danger">Error 44: Connection lost</p>') print('<p class="text-danger">Error 44: Connection lost</p>')
send_error_notification(device_id, "UHTTPER (error n°44) -> Connection lost") send_error_notification(device_id, "UHTTPER (error n°44) -> Connection lost")
# SECURE SOCKET ERROR
elif error_code == 73: elif error_code == 73:
print('<p class="text-danger">Error 73: Secure socket connect error</p>') print('<p class="text-danger">Error 73: Secure socket connect error</p>')
else: else: