LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-30-2014, 03:09 AM   #1
razer900
LQ Newbie
 
Registered: Jul 2014
Posts: 2

Rep: Reputation: Disabled
TTY USB Input Overruns


I have a problem:

I'm using a BeagleBoard-xM with an Angstrom Distribution an a Linux-Kernel 3.6.7+. There is a USB-serial-converter connected, with 4 RS-232 ports.

The software is reading on three ports at a time, 115200 8N1. One Software every port, reading character-by-character and print a line to a logfile.

What can cause the tty input overrun(s) as a kernel_warning and how can i prevent this?
 
Old 07-30-2014, 03:49 AM   #2
SIG_SEGV
Member
 
Registered: Jul 2012
Location: Banglore, INDIA
Distribution: Fedora-Core
Posts: 70

Rep: Reputation: 11
Quote:
What can cause the tty input overrun(s) as a kernel_warning and how can i prevent this?
The tty input overrun means you reciever buffer at BeagleBoard-xM is getting filled and overflowed before the processor is processing all the data in buffer. It means you are loosing the input data stored at reciever buffer of BB-xM here due to new data being overwrriten into buffer before the old data is completely processed.

This might be due to data coming simultaneously from all 4 RS-232 ports (as you mentioned) and the BB-xM reciever buffer is bottle-necked.

An overrun error generally means that the buffer, usually in the UART peripheral, was already full when a new byte arrived in the receive register. This happens from reading the receiver buffer too infrequently. Usually, reading will be done in response to an interrupt that is generated when the UART receives a byte, or possibly when the UART's receiver buffer reaches a set level of 'fullness' (some UARTs have multi-byte buffers).


To overcome, I think we can try for interrupt at tty port and use threading so we can read the data at buffer quickly & allow new bytes to fill the buffer.. Find any way to tell all the 4 ports at outside that reciever buff is full and wait for GREEN FLAG.

Last edited by SIG_SEGV; 07-30-2014 at 03:53 AM.
 
Old 08-05-2014, 11:18 AM   #3
razer900
LQ Newbie
 
Registered: Jul 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for your answer. I fixed the problem with increasing the N_TTY_BUF_SIZE from 4096 to 131072 (file /include/linux/tty.h) and recompiled the linux kernel. I'm getting no more tty input overrun(s).

Is that a legal/correct way of fixing the problem?

Last edited by razer900; 08-05-2014 at 11:20 AM.
 
  


Reply



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
How to determine USB port tty value coondog52 Linux - Hardware 14 06-29-2009 05:18 PM
installing Sierra 881 USB wireless, cannot find /usb/tty/USB0 becausei'mstubborn Linux - Hardware 7 01-04-2009 12:49 PM
tty not taking keyboard input plus clock problem Treize.k Linux - General 1 10-31-2006 05:46 AM
tty usb terminal? DarkstarNL Linux - Hardware 0 04-21-2004 09:34 AM
tty blocked for input after shutting down X tar.bz2 Slackware 2 10-29-2003 06:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:07 PM.

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
Open Source Consulting | Domain Registration