Hi All,
I have a very simple test program to set the serial attributes for /dev/ttyFIM0. I am getting a termio.error: (22, ‘Invalid argument’) error message when I try to set a new speed attribute. Plus a print of the get attribute list doesn’t look right either. Here is my program:
import os
import termios
serfd = os.open( ‘/dev/ttyFIM0’, os.O_RDWR | os.O_NOCTTY)
print ‘termios =’, termios.tcgetattr( serfd)
old = termios.tcgetattr(serfd)
old[4] = 38400 # ispeed
old[5] = 38400 # ospeed
termios.tcsetattr(serfd, termios.TCSANOW, old)
os.close(serfd)
The print show 13 and 13 for the baud rate which is bogus.
try/except left out for clarity
Any help is appreciated.
Mark