diff --git a/loop/SARA_send_data_v2.py b/loop/SARA_send_data_v2.py index 48cadf3..1afdab8 100755 --- a/loop/SARA_send_data_v2.py +++ b/loop/SARA_send_data_v2.py @@ -515,6 +515,15 @@ def reset_PSD_CSD_connection(): """ print("⚠️Reseting PDP connection ") pdp_reset_success = True + + #check if PDP context is already active + print('➡️ Check if PDP context is already active') + command = f'AT+CGACT?\r' + ser_sara.write(command.encode('utf-8')) + response_check = read_complete_response(ser_sara, wait_for_lines=["OK"]) + print(response_check, end="") + time.sleep(1) + # Activate PDP context 1 print('➡️ Activate PDP context 1') command = f'AT+CGACT=1,1\r'