LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-07-2010, 04:06 AM   #1
watom
LQ Newbie
 
Registered: Oct 2010
Posts: 6

Rep: Reputation: 0
Question No input on serial console


Hello,

I've got a home server running ubuntu 10.0.4. It have no monitor or keyboard. So I want to access it from a serial console. (I use SSH currently but if something goes wrong, I need to be able to do something... so serial console seems a fine thing).
OK, so on the server, I tell grub to output everything on ttyS0 and opened a getty on ttyS0.

On the client side (Laptop running Ubuntu 10.0.4 with pl2303 USB to Serial adapter) I use Minicom.

Home server restart :
I see grub menu, linux kernel messages, login prompt.
But, I can't do anything : In grub or at the login prompt, no key press is recognized by the server.
I've got write permission to /dev/ttyUSB0.
I tried a different getty (mgetty) with no success.
I stopped the getty on ttyS0 on the server. And run minicom.

From the server's minicom, if I type something, it appear on the client screen.
From the client's minicom, if I type something, some garbage appear on the server screen : ��������������������� (One of this things for each char typed).

If I short-circuit pin 2 and 3 of the client serial port, it echoed what I type.

The two serial ports are connected with a nullmodem cable. (seems to be a full handshaking cable).

Of course, same serial port config for both minicom, grub and getty.

Hope I'm understandable enough. (English not my primary language).
Can somebody help me make this *$*#! serial console working right ?
I'm on it for 10 hours now with no success...

Edit : I nearly forgot to tell you I had to update the standard ubuntu kernel to 2.6.34-020634rc1-generic because there was a bug in the pl2303 driver in the stock kernel (2.6.32-25-generic) which prevented me from doing anything (even receiving).
 
Old 10-07-2010, 07:49 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,672

Rep: Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152
Set the baud rate, stop bits, and parity of the serial port with "setserial", and make sure your terminal settings match. Sounds like you've got a baud mismatch.
 
Old 10-08-2010, 03:35 AM   #3
watom
LQ Newbie
 
Registered: Oct 2010
Posts: 6

Original Poster
Rep: Reputation: 0
OK, will try this and report to you.
 
Old 10-08-2010, 05:27 AM   #4
watom
LQ Newbie
 
Registered: Oct 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for your help.
This thing is driving me crazy !
Today, after unplugging and replugging the USB to serial adapter on the laptop (client), the serial connection stop working in both ways... I receive garbage now...
I try setserial to be sure everything (baud rate, parity etc.) are ok both ways. (Previously, I let minicom do it client side and getty server side).
Setserial don't work on the laptop. I suppose it don't work with USB to serial adapter.
So I used stty.
Here is the output of stty -a on both serial ports.

----------Server stty
speed 38400 baud; rows 0; columns 0; line = 0;
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 = 5;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl -echoke


------------Client stty
speed 38400 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^A; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 5;
-parenb -parodd cs8 -hupcl -cstopb cread clocal -crtscts
ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl -echoke

Everything seems identical... But minicom to minicom transmision fail both ways.
If I try a hexdump -C /dev/ttyS0 on the server and then on the laptop: cat /etc/resolv.conf > /dev/ttyUSB0, I receive only garbage on the server. (ff mostly and some 7f bf)

If I do the reverse thing (send from the server to the client), I receive nonsense data but at less not always the same chars.

Have an Idea about stty parameters to use ?
Is my USB to Serial adapter the culprit ? I wonder...
 
Old 10-08-2010, 07:43 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,672

Rep: Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152Reputation: 8152
I doubt that it's the USB adapter, but it's worth a try. Have you tried just firing up a standard GETTY, and see if that works? This page:
http://www.vanemery.com/Linux/Serial...l-console.html

may help.
 
Old 10-08-2010, 01:09 PM   #6
watom
LQ Newbie
 
Registered: Oct 2010
Posts: 6

Original Poster
Rep: Reputation: 0
I've already followed everything on this serial how-to.
Unfortunately, Getty don't work better...
 
Old 10-15-2010, 06:37 AM   #7
mohammadkapadia
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Rep: Reputation: 0
This problem is nearly similar to mine.

I am using ubuntu 10.04. First when i installed the ubuntu 10.04 it was working fine but after few days problem occurred. I am using a controller board as a client. The problem is on my serial port the host to client communication is not done. I can see the messages sent from client on my minicom but i am not able to command anything to my client from host minicom. I have also tried different tools like cutecom and picocom its same in all. Its also making trouble in handshaking of host and clent in my one of the applications.

This problem is not faced only on one system but more than one system at my work place. I have checked the serial port communication on hyper terminal of windows and its working fine on the same system, it means there is nothing wrong with hardware. I think this problem occured after updating of the system. There may be any bug in the update of the kernel.

Does anyone has any solution on this?

Thanking you.

Mohammad.
 
Old 10-15-2010, 09:55 AM   #8
watom
LQ Newbie
 
Registered: Oct 2010
Posts: 6

Original Poster
Rep: Reputation: 0
I've ordered a new adapter based on FTDI chip set.
If the problem lie within the kernel prolific driver, it should work.
I'll let you know.
 
Old 10-17-2010, 01:21 PM   #9
watom
LQ Newbie
 
Registered: Oct 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Have changed my adapter to a FTDI based one.
Everything works perfectly !
Maybe the prolific driver is faulty or the unit I had.
I don't know.
Thank you everybody for your help.
 
  


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
serial input read into a character app rpaulk Linux - Newbie 1 10-27-2009 02:44 PM
serial console +plx tech console server card pankajd Linux - Hardware 1 10-14-2009 01:45 PM
Serial input device using usb-serial connector slackiz Linux - Hardware 4 01-12-2009 05:04 AM
capture serial input at startup TomFuchs Linux - General 4 11-23-2005 10:00 AM
How to Redirect serial port input to a file Legaviu Linux - General 1 07-31-2001 07:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:25 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