When usb_ser_mon is waiting for the USB device to be connected, it's impossible to terminate it with Ctrl-X because it's using sys.stdin.read() in the waiting mode. This change replaces sys.stdin.read with os.read, making it possible to recognise Ctrl-X and terminate gracefully.
When usb_ser_mon is waiting for the USB device to be connected, it's impossible to terminate it with Ctrl-X because it's using sys.stdin.read() in the waiting mode. This change replaces sys.stdin.read with os.read, making it possible to recognise Ctrl-X and terminate gracefully.