Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
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.
|
 |
10-07-2010, 04:06 AM
|
#1
|
LQ Newbie
Registered: Oct 2010
Posts: 6
Rep:
|
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).
|
|
|
10-07-2010, 07:49 AM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,672
|
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.
|
|
|
10-08-2010, 03:35 AM
|
#3
|
LQ Newbie
Registered: Oct 2010
Posts: 6
Original Poster
Rep:
|
OK, will try this and report to you.
|
|
|
10-08-2010, 05:27 AM
|
#4
|
LQ Newbie
Registered: Oct 2010
Posts: 6
Original Poster
Rep:
|
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...
|
|
|
10-08-2010, 07:43 AM
|
#5
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,672
|
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.
|
|
|
10-08-2010, 01:09 PM
|
#6
|
LQ Newbie
Registered: Oct 2010
Posts: 6
Original Poster
Rep:
|
I've already followed everything on this serial how-to.
Unfortunately, Getty don't work better... 
|
|
|
10-15-2010, 06:37 AM
|
#7
|
LQ Newbie
Registered: Jun 2010
Posts: 4
Rep:
|
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.
|
|
|
10-15-2010, 09:55 AM
|
#8
|
LQ Newbie
Registered: Oct 2010
Posts: 6
Original Poster
Rep:
|
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.
|
|
|
10-17-2010, 01:21 PM
|
#9
|
LQ Newbie
Registered: Oct 2010
Posts: 6
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 05:25 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
|
|