[problem] frequency log causes /dev/ttyS0 console freeze until any key input
my board uses uclinux -2.6.18 , and I have servals shell scripts which executes every 5mins.
If scripts print amount log, it randomly causes console (/dev/ttyS0) freeze, then scripts also can not finish (also hang). If I press any key, the console will print the amount queue message and scripts goes continus I had check dmesg, there is no any message about that~~ Is any thing wrong? # stty -F /dev/ttyS0 speed 115200 baud; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -brkint ixoff -imaxbel # cd /avail/tmp/ # ./setserial -g /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x0000, IRQ: 22, Flags: spd_shi # ./setserial -ga /dev/ttyS0 /dev/ttyS0, Line 0, UART: 16550A, Port: 0x0000, IRQ: 22 Baud_base: 5068800, close_delay: 50, divisor: 0 closing_wait: 3000 Flags: spd_shi skip_test # cat /proc/tty/driver/serial serinfo:1.0 driver revision: 0: uart:16550A mmio:0x00000000 irq:22 tx:40519 rx:0 RTS|CTS|DTR 1: uart:16550A mmio:0x00000000 irq:66 tx:0 rx:0 2: uart:16550A mmio:0x00000000 irq:67 tx:0 rx:0 thanks for any advice, |
Wild guess...
Your terminal is issuing 'XOFF', causing the sender to pause. Some implementations of XON/XOFF are not strict about the use of XON to resume the transmission, hence your 'any key' is acceptable as XON. From the output of stty, it does appear that your port is configured to use XON/XOFF flow control. I see also, that the report of received characters is 0, which I think results because the bytes interpreted as flow-control are swallowed by the driver, and don't appear in the statistics. --- rod. |
Hi ROD,
stty can recevie (print out to terminal screen) a lot of message without any resume signal. Is it in waiting status? And if I do not plug the console line, it stills happen randomly. Do you mean that I need change the flow control of ttyS0 to XON/XOFF? Thanks. |
Quote:
Your embedded host uses a serial console (tty), and external to that, you have some linux host acting as a terminal (using a tty). I think we may be each talking about two different hosts/ports. --- rod. |
The correct terminal is /dev/ttyS0.
thanks. |
You seem to have missed my point. Your board that is running uclinux uses a serial console. The serial console is connected to a serial terminal. So, there are two serial ports involved. You aren't distinguishing between them, and the wording you use doesn't disambiguate between them. What kind of terminal are you using to monitor the serial console of your embedded Linux board? The problem could originate at either end or both ends of the system. From your original description, I still believe my first reply is a reasonable analysis of the problem.
--- rod. |
Hi ROD,
Thanks for your kind reply. I use 'console=ttyS0,115200' in bootloader. If the information is wrong, could you remind how to get ? Thank you very much. |
All times are GMT -5. The time now is 07:00 AM. |