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("
') print(response2) print("
", end="")