This commit is contained in:
Your Name
2025-02-27 11:48:42 +01:00
parent 700de9c9f4
commit 3d507ae659
2 changed files with 148 additions and 12 deletions

View File

@@ -562,12 +562,14 @@ try:
73 Secure socket connect error
'''
#Pas forcément un moyen de résoudre le soucis
#print("resetting the URL (domain name):")
#command = f'AT+UHTTP={aircarto_profile_id},1,"{url_nebuleair}"\r'
#ser_sara.write(command.encode('utf-8'))
#response_SARA_31 = read_complete_response(ser_sara)
#print(response_SARA_31)
#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=False)
#print('<p class="text-danger-emphasis">')
#print(response_SARA_9r)
#print("</p>")
# 2.2 code 1 (HHTP succeded)
else:
@@ -716,9 +718,9 @@ try:
print("Getting error code (4-> Invalid server Hostname, 11->Server connection error, 73->Secure socket connect error)")
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)
response_SARA_9b = read_complete_response(ser_sara, wait_for_lines=["OK"], debug=False)
print('<p class="text-danger-emphasis">')
print(response_SARA_9)
print(response_SARA_9b)
print("</p>")
'''
@@ -749,9 +751,9 @@ try:
#4. Read reply from server
print("Reply from server:")
ser_sara.write(b'AT+URDFILE="uSpot_server_response.txt"\r')
response_SARA_4 = read_complete_response(ser_sara, wait_for_lines=["OK"], debug=False)
response_SARA_4b = read_complete_response(ser_sara, wait_for_lines=["OK"], debug=False)
print('<p class="text-success">')
print(response_SARA_4)
print(response_SARA_4b)
print('</p>')
@@ -759,8 +761,8 @@ try:
#5. empty json
print("Empty SARA memory:")
ser_sara.write(b'AT+UDELFILE="sensordata_json.json"\r')
response_SARA_9 = read_complete_response(ser_sara, wait_for_lines=["OK"], debug=False)
print(response_SARA_9)
response_SARA_9t = read_complete_response(ser_sara, wait_for_lines=["OK"], debug=False)
print(response_SARA_9t)