improve pdp reconnect
This commit is contained in:
@@ -515,6 +515,15 @@ def reset_PSD_CSD_connection():
|
|||||||
"""
|
"""
|
||||||
print("⚠️Reseting PDP connection ")
|
print("⚠️Reseting PDP connection ")
|
||||||
pdp_reset_success = True
|
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
|
# Activate PDP context 1
|
||||||
print('➡️ Activate PDP context 1')
|
print('➡️ Activate PDP context 1')
|
||||||
command = f'AT+CGACT=1,1\r'
|
command = f'AT+CGACT=1,1\r'
|
||||||
|
|||||||
Reference in New Issue
Block a user