Serial console blocks/hangs at speeds > 9600 baud

If/when it hangs, check if the hardware still handles the characters.

iostat; echo foo > /dev/ttyu0; iostat. vmstat -ishould show an increase in interrupts as well. ps lax might show what the hung processes are waiting for.

I see a 3wire.115200 entry in /etc/gettytab, commented "Entries for 3-wire serial terminals".

Juha

Well, thanks for your new ideas.

When the serial console hangs with std.115200 it does not handle any characters anymore. And if I interpret the output of iostat correctly there is no increase of interrupts.

When using 3wire.115200 I do not get a login prompt at all. More precise even console output stopped at some point which is probably when init should start getty processes. This first looked very promising to me because the comment of the 3wire terminals seemed to match my serial cable. And a check with stty revealed the required serial parameters:
Code:
# stty -a -f /dev/ttyu0 |grep -E "xon|off|crtscts|clocal"
iflags: -istrip icrnl inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk
cflags: cread cs8 -parenb -parodd -hupcl clocal -cstopb -crtscts -dsrflow
Peter
 
Some more "useful" commands

Code:
stty -f device 0
procstat -af | grep /dev

First one used to reset a terminal, very driver-dependent thing.

Reaching at straws, terminal lflags also contains some potential culprits, pendin and flush0. cflags wraps to another line, containing mdmbuf and dtrflow. Use stty -a without the grep, to rule those gremlins out.

Juha

oo la laa ~ man termios :)
 
I rarely use stty and moreover I am not aware of terminal lflags possibly being culprits. I have never used stty to make any changes to a serial port so far.

To make things clearer I give here full stty output:
Code:
# stty -a -f /dev/ttyu0
speed 38400 baud; 0 rows; 0 columns;
lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl
  -echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin
  -nokerninfo -extproc
iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel -ignbrk
  -brkint -inpck -ignpar -parmrk
oflags: -opost onlcr -ocrnl tab3 -onocr -onlret
cflags: cread cs8 -parenb -parodd -hupcl clocal -cstopb -crtscts -dsrflow
  -dtrflow -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
  eol2 = <undef>; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U;
  lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q;
  status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;
I have seen on my soekris that ACPI has been disabled in /boot/loader.conf.local. On my FreeNAS machine, however, where 115200 baud are working correctly as well I did not explicitly disable ACPI.

And thanks for the # stty -f /dev/ttyu0 0 hint. During my next test with 115200 baud I will try to reset terminal.

Peter
 
Back
Top