From 5e7375cd4ea83084ac09935c1ce7d94c76329761 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 11 Mar 2025 15:40:22 +0100 Subject: [PATCH] update --- loop/SARA_send_data_v2.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/loop/SARA_send_data_v2.py b/loop/SARA_send_data_v2.py index 408831b..c438cbf 100755 --- a/loop/SARA_send_data_v2.py +++ b/loop/SARA_send_data_v2.py @@ -427,6 +427,16 @@ try: print("-> Getting LTE signal <-") ser_sara.write(b'AT+CSQ\r') response2 = read_complete_response(ser_sara, wait_for_lines=["OK"]) + + #Here it's possible that the SARA do not repond at all + #-> try to establish connection + #-> end loop, no need to continue + if response2 is None or response2 == "": + print("No answer from SARA module") + print('🛑STOP LOOP🛑') + print("
") + sys.exit() + print('

') print(response2) print("

", end="")