diff --git a/loop/SARA_send_data_v2.py b/loop/SARA_send_data_v2.py index 3a76082..d82104f 100755 --- a/loop/SARA_send_data_v2.py +++ b/loop/SARA_send_data_v2.py @@ -527,7 +527,7 @@ try: # 2.1 code 0 (HTTP failed) ⛔⛔⛔ if len(parts) == 3 and parts[-1] == '0': # The third value indicates success print("*****") - print('ATTENTION: HTTP operation failed') + print('⛔ATTENTION: HTTP operation failed') update_json_key(config_file, "SARA_R4_network_status", "disconnected") print("*****") print("Blink red LED") @@ -567,8 +567,8 @@ try: # 2.2 code 1 (HHTP succeded) else: - # Si la commande HTTP a réussi ✅✅✅ - print('HTTP operation successful.') + # Si la commande HTTP a réussi + print('✅✅HTTP operation successful.') update_json_key(config_file, "SARA_R4_network_status", "connected") print("Blink blue LED") led_thread = Thread(target=blink_led, args=(23, 5, 0.5)) @@ -671,11 +671,11 @@ try: # 1.Vérifier si la réponse contient un message d'erreur CME if "+CME ERROR" in lines[-1]: print("*****") - print('ATTENTION: CME ERROR') + print('⛔ATTENTION: CME ERROR') print("error:", lines[-1]) print("*****") #update status - update_json_key(config_file, "SARA_R4_network_status", "disconnected") + #update_json_key(config_file, "SARA_R4_network_status", "disconnected") # Gestion de l'erreur spécifique if "No connection to phone" in lines[-1]: @@ -700,7 +700,7 @@ try: # 2.1 code 0 (HTTP failed) if len(parts) == 3 and parts[-1] == '0': # The third value indicates success print("*****") - print('ATTENTION: HTTP operation failed') + print('⛔ATTENTION: HTTP operation failed') update_json_key(config_file, "SARA_R4_network_status", "disconnected") print("*****") print("Blink red LED") @@ -710,7 +710,7 @@ try: # Get error code print("Getting error code (11->Server connection error, 73->Secure socket connect error)") - command = f'AT+UHTTPER={aircarto_profile_id}\r' + command = f'AT+UHTTPER={uSpot_profile_id}\r' ser_sara.write(command.encode('utf-8')) response_SARA_9 = read_complete_response(ser_sara, wait_for_lines=["OK"], debug=False) print('

') @@ -735,8 +735,8 @@ try: # 2.2 code 1 (HHTP succeded) else: - # Si la commande HTTP a réussi ✅✅✅ - print('HTTP operation successful.') + # Si la commande HTTP a réussi + print('✅✅HTTP operation successful.') update_json_key(config_file, "SARA_R4_network_status", "connected") print("Blink blue LED") led_thread = Thread(target=blink_led, args=(23, 5, 0.5))