stty shows the exact same settings for 8.04 and 12.04:
12.04
Code:
$ stty -F /dev/ttyS0 -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = <undef>; quit = <undef>; erase = <undef>; kill = <undef>; eof = <undef>; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = <undef>; stop = <undef>;
susp = <undef>; rprnt = <undef>; werase = <undef>; lnext = <undef>; flush = <undef>; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke
8.04
Code:
$ stty -F /dev/ttyS0 -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = <undef>; quit = <undef>; erase = <undef>; kill = <undef>; eof = <undef>; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = <undef>; stop = <undef>;
susp = <undef>; rprnt = <undef>; werase = <undef>; lnext = <undef>; flush = <undef>; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke
All of the settings displayed by stty appear to be also handled by the termios struct. Like I mentioned before I have verified at runtime that the termios struct is exactly the same on the different machines.
for completeness sake here is the code that sets termios:
Code:
newtio.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON);
newtio.c_oflag &= ~OPOST;
newtio.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
newtio.c_cflag &= ~(CSIZE);
//turn off parity bit and input parity checking
newtio.c_cflag &= ~(PARENB | INPCK);
newtio.c_cflag |= CS8;
newtio.c_iflag &= ~(IXOFF | IXON);
newtio.c_cflag &= ~(HUPCL | CSTOPB);
newtio.c_cflag |= (CLOCAL | CREAD);
//disable flow control
newtio.c_cflag &= ~CRTSCTS;
// set input mode (non-canonical, no echo,...)
newtio.c_lflag = 0;
newtio.c_cc[VTIME] = 0; // min time between chars (*.1sec)
newtio.c_cc[VMIN] = 1; // min number of chars for read
int posix_baud = B9600;
cfsetispeed(&newtio, posix_baud);
cfsetospeed(&newtio, posix_baud);
tcflush(fd, TCIFLUSH);
tcsetattr(fd, TCSANOW, &newtio);
So it seems to me that there is either some setting that is not controlled by termios or stty that I need to change, or there is something in kernel that changed the details on how one of these settings is implemented. I'm not really sure where to start looking for either of these.
One other thing. Just for a sanity check we scrounged up an old serial modem with an auto dialer and we were able to use cu to send and receive data with the auto dialer, so the serial port does work.
Bookmarks