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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-15-2011, 03:05 PM
|
#1
|
LQ Newbie
Registered: Sep 2011
Posts: 5
Rep: 
|
Line wrap on embedded system issues carriage return but no linefeed
I'm working on a terminal I/O bug in my embedded linux system. When the data typed on the shell via a terminal serial UART connection exceeds 80 lines, further input continues at the beginning of the same line rather than jumping down to the next, overwriting the initial data entered.
Everything else about the terminal I/O works correctly and this issue is not present over a remote telnet session.
Can anyone venture a guess as to why this might be happening? Keywords and search terms would be greatly appreciated as well, since admittedly I don't have a great understanding of how the terminal display works within the kernel and I'm not sure where to start. Thanks!
|
|
|
09-15-2011, 06:10 PM
|
#2
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852
|
I've seen similar behavior in bash if ansi color codes aren't escaped properly in the PS1 prompt. The escape codes must be enclosed in \[ and \] brackets.
|
|
|
09-16-2011, 11:09 AM
|
#3
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
This, and other similar behaviors, usually result from a mismatch between what the shell &/or application expects as a terminal type, and what the actual terminal (more commonly, terminal emulator, these days) is. I've worked at solving these kinds of problems, and have never really developed a fool-proof method to solve them. I think part of the difficulty is that there are different ways of setting and configuring terminal settings (termcap vs terminfo), and also there are varying degrees of compatibility by various terminal emulations. The command stty can often be used to fix row/column settings (as well as many other configurations).
I would love to find a really good tutorial that explains all of the underlying mechanisms and related utilities well enough that I could use it to fix these kinds of problems.
--- rod.
|
|
|
09-16-2011, 01:06 PM
|
#4
|
LQ Newbie
Registered: Sep 2011
Posts: 5
Original Poster
Rep: 
|
Thanks for the response guys. You both are suggesting that the issue is in the terminal application (this issue occurs in all PC host-side applications: teratermpro, hyperterm, secureCRT, etc.) or in the shell formatting. Does it make sense to rule out the possibility of how kernel console graphics is configured being the cause?
I've done a little more research and found this little wikipedia entry offers a brief overview of the console system in linux: http://en.wikipedia.org/wiki/Linux_console
I know bugs in the kernel are very very rare, especially in systems like this that are near the core of the kernel. Again, I don't know exactly how it works, but is there a setting in the kernel config that can affect this system?
|
|
|
09-18-2011, 12:20 AM
|
#5
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
Quote:
Originally Posted by crunchytheory
Thanks for the response guys. You both are suggesting that the issue is in the terminal application
|
No, I'm suggesting that there is a difference between what kind of terminal is being emulated, and what kind of terminal your shell &/or application thinks exists. Or perhaps a disagreement about the size (number of lines) of the terminal. Have you tried something like
(use whatever number makes sense to you; see what effect it has). A link with some interesting information, but little that ever seems to help resolve problems like yours is
Text-Terminal-HOWTO
--- rod.
|
|
|
All times are GMT -5. The time now is 06:18 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|