diff --git a/SARA/sara_setURL.py b/SARA/sara_setURL.py index 5ad9092..bb0079c 100755 --- a/SARA/sara_setURL.py +++ b/SARA/sara_setURL.py @@ -8,7 +8,6 @@ Script to set the URL for a HTTP request Ex: /usr/bin/python3 /var/www/nebuleair_pro_4g/SARA/sara_setURL.py ttyAMA2 data.nebuleair.fr 0 -To do: need to add profile id as parameter First profile id: AT+UHTTP=0,1,"data.nebuleair.fr" diff --git a/loop/SARA_send_data_v2.py b/loop/SARA_send_data_v2.py index 26029c5..8646b98 100755 --- a/loop/SARA_send_data_v2.py +++ b/loop/SARA_send_data_v2.py @@ -629,17 +629,20 @@ try: 73 Secure socket connect error ''' - #Essayer un reboot du SARA R4 (ne fonctionne pas) - #print("🔄SARA reboot!🔄") - #command = f'AT+CFUN=15\r' - #ser_sara.write(command.encode('utf-8')) - #response_SARA_9r = read_complete_response(ser_sara, wait_for_lines=["OK"], debug=False) - #print('
') - #print(response_SARA_9r) - #print("
") + #Essayer un reboot du SARA R4 + print('🔄SARA reboot!🔄') + command = f'AT+CFUN=15\r' + ser_sara.write(command.encode('utf-8')) + response_SARA_9r = read_complete_response(ser_sara, wait_for_lines=["OK"], debug=True) + print('') + print(response_SARA_9r) + print("
") - #reset l'url - print('❓Try Resetting the HTTP Profile❓') + print("Sleep 10 secs before continuing") + time.sleep(10) + + #reset l'url AirCarto + print('🔧Resetting the HTTP Profile') command = f'AT+UHTTP={aircarto_profile_id},1,"data.nebuleair.fr"\r' ser_sara.write(command.encode('utf-8')) responseResetHTTP2_profile = read_complete_response(ser_sara, timeout=5, end_of_response_timeout=5, wait_for_lines=["OK", "+CME ERROR"], debug=True)