You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from mpio import Serial
ser = Serial("/dev/ttyS1", 115200, rtscts=True)
ser.write(b"AT\r")
ser.close()
CTS is high preventing the data from being written, and so ser.close() is hanging indefinitely.
Traceback (most recent call last):
File "mpio-serial-test.py", line 11, in <module>
ser.close()
File "/usr/local/lib/python3.8/dist-packages/mpio/serial.py", line 306, in close
os.close(self._fd)
KeyboardInterrupt
Exception ignored in: <function Serial.__del__ at 0xb6b371d8>
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/mpio/serial.py", line 87, in __del__
File "/usr/local/lib/python3.8/dist-packages/mpio/serial.py", line 306, in close
OSError: [Errno 9] Bad file descriptor
(doesn't happen with rtscts=False)
Consider adding termios.tcflush(fd, termios.TCOFLUSH) to the close() function
The text was updated successfully, but these errors were encountered:
CTS is high preventing the data from being written, and so
ser.close()
is hanging indefinitely.(doesn't happen with
rtscts=False
)Consider adding
termios.tcflush(fd, termios.TCOFLUSH)
to the close() functionThe text was updated successfully, but these errors were encountered: