diff --git a/loop/SARA_send_data_v2.py b/loop/SARA_send_data_v2.py index 6bdd013..e4b53d1 100755 --- a/loop/SARA_send_data_v2.py +++ b/loop/SARA_send_data_v2.py @@ -1068,6 +1068,7 @@ try: # Display interpretation based on error code if error_code == 0: print('
No error detected
') + # INVALID SERVER HOSTNAME elif error_code == 4: print('Error 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") else: print("⛔There were issues with the modem server hostname reinitialize process") - + # SERVER CONNECTION ERROR elif error_code == 11: print('Error 11: Server connection error
') + 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: print('⚠️Error 22: PSD or CSD connection not established (SARA-R5 need to reset PDP conection)⚠️
') 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") else: print("⛔There were issues with the modem CSD PSD reinitialize process") + # CONNECTION TIMED OUT elif error_code == 26: print('Error 26: Connection timed out
') send_error_notification(device_id, "UHTTPER (error n°26) -> Connection timed out") + # CONNECTION LOST elif error_code == 44: print('Error 44: Connection lost
') send_error_notification(device_id, "UHTTPER (error n°44) -> Connection lost") + # SECURE SOCKET ERROR elif error_code == 73: print('Error 73: Secure socket connect error
') else: