LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices



Reply
 
Search this Thread
Old 06-14-2010, 05:11 AM   #1
masue
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Rep: Reputation: 0
Angry [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,
 
Old 06-15-2010, 11:15 AM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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.

Last edited by theNbomr; 06-15-2010 at 11:17 AM.
 
Old 06-20-2010, 09:18 PM   #3
masue
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 06-20-2010, 10:22 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Quote:
Originally Posted by masue View Post
Hi ROD,

stty can recevie (print out to terminal screen) a lot of message without any resume signal.
This seems to contradict your original post. Your terminology is a bit confusing (receive <==> print out). You need to clearly distinguish which tty you are referring to in all cases.
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.
 
Old 06-21-2010, 08:48 PM   #5
masue
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
The correct terminal is /dev/ttyS0.
thanks.
 
Old 06-22-2010, 09:23 AM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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.
 
Old 06-22-2010, 08:55 PM   #7
masue
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
INIT: open(/dev/console): Input/output error pazkaw Slackware 13 03-25-2008 06:15 PM
INIT: open(/dev/console): Input/output error nykey Slackware 12 09-21-2006 04:30 PM
Redirect /dev/ttyS0 input/output to tty2 Kymbo Linux - General 1 09-07-2006 11:07 AM
cat /dev/ttyS0: Input/output error lionking_x Linux - Hardware 3 01-07-2006 12:16 AM
open(/dev/console): Input/Output error fintanmcevoy General 2 11-18-2005 07:44 AM


All times are GMT -5. The time now is 11:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration