From 79d7f61e4abdedd050145e1a4a25e0a5f12e86f4 Mon Sep 17 00:00:00 2001 From: PaulVua Date: Thu, 15 Jan 2026 11:19:56 +0100 Subject: [PATCH] improve pdp reconnect --- loop/SARA_send_data_v2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loop/SARA_send_data_v2.py b/loop/SARA_send_data_v2.py index e3bd301..eecb309 100755 --- a/loop/SARA_send_data_v2.py +++ b/loop/SARA_send_data_v2.py @@ -523,10 +523,10 @@ def reset_PSD_CSD_connection(): response_check = read_complete_response(ser_sara, wait_for_lines=["OK"]) print(response_check, end="") # 2. Parser la réponse - if '+CGACT: 1,1' in response: + if '+CGACT: 1,1' in response_check: print("✅ Contexte PDP déjà actif") return True - elif '+CGACT: 1,0' in response: + elif '+CGACT: 1,0' in response_check: print("➡️ ⚠️ Contexte PDP inactif") else: print("⚠️ État PDP inconnu, reset nécessaire")