diff --git a/init.sh b/init.sh index dc2528c..7957895 100755 --- a/init.sh +++ b/init.sh @@ -66,5 +66,8 @@ wget --continue "https://advdownload.advantech.com/productfile/Downloadfile5/1-2 chmod +x DAQ_Linux_4.0.11.0_64bit.run sudo ./DAQ_Linux_4.0.11.0_64bit.run +echo "---------- REMOVE BRLTTY THAT CONFLICTS WITH SERIAL TTYUSB PORTS ----------" +sudo apt remove brltty + echo "---------- INIT DONE ----------" cd "$here" diff --git a/src/test/rfid.py b/src/test/rfid.py index e3c55fc..57cbdf9 100644 --- a/src/test/rfid.py +++ b/src/test/rfid.py @@ -1,6 +1,7 @@ import logging import platform import sys +import termios import time import traceback from datetime import datetime @@ -84,12 +85,18 @@ while True: print(f"IOError: {io_err}") traceback.print_exc() connected = False - clf.close() + try: + clf.close() + except termios.error: + pass except Exception as e: print(f"General Exception: {e}") traceback.print_exc() connected = False - clf.close() + try: + clf.close() + except termios.error: + pass time.sleep(1) print("EXITING")