update
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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('<p class="text-danger-emphasis">')
|
||||
#print(response_SARA_9r)
|
||||
#print("</p>")
|
||||
#Essayer un reboot du SARA R4
|
||||
print('<span style="color: orange;font-weight: bold;">🔄SARA reboot!🔄</span>')
|
||||
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('<p class="text-danger-emphasis">')
|
||||
print(response_SARA_9r)
|
||||
print("</p>")
|
||||
|
||||
#reset l'url
|
||||
print('<span style="color: orange;font-weight: bold;">❓Try Resetting the HTTP Profile❓</span>')
|
||||
print("Sleep 10 secs before continuing")
|
||||
time.sleep(10)
|
||||
|
||||
#reset l'url AirCarto
|
||||
print('<span style="color: orange;font-weight: bold;">🔧Resetting the HTTP Profile</span>')
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user