So I have an Ubuntu server (12.10) running on Shuttle XS36V. This computer is totaly headless (just connected on the TV while installing). Now, I'm trying to use the serial port to connect to my box (in case network is unavailable). By the way, that doesn't work at all :(

I followed https://help.ubuntu.com/community/SerialConsoleHowto

On the server :

root@server # dmesg | grep ttyS0
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.5.0-23-generic root=/dev/mapper/vg00-lvroot ro console=tty0 console=ttyS0,115200n8
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.5.0-23-generic root=/dev/mapper/vg00-lvroot ro console=tty0 console=ttyS0,115200n8 
[    0.000000] console [ttyS0] enabled
[    1.720744] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    1.777564] 00:09: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

I have also configured ttyS0 :

root@server # cat /etc/init/ttyS0.conf 
# ttyS0 - getty
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.

start on stopped rc or RUNLEVEL=[2345]
stop on runlevel [!2345]

exec /sbin/getty -L 115200 ttyS0 vt102

On the client side (Ubuntu Desktop 12.10, but also tried Windows 7), I have just plugged the rs232 to usb cable and dmesg show that :

root@client # dmesg
[ 8722.807731] usb 1-1.2: new full-speed USB device number 5 using ehci_hcd
[ 8722.900863] usb 1-1.2: New USB device found, idVendor=067b, idProduct=2303
[ 8722.900872] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 8722.900877] usb 1-1.2: Product: USB-Serial Controller D
[ 8722.900882] usb 1-1.2: Manufacturer: Prolific Technology Inc. 
[ 8722.945131] usbcore: registered new interface driver usbserial
[ 8722.945147] usbcore: registered new interface driver usbserial_generic 
[ 8722.945159] USB Serial support registered for generic
[ 8722.945163] usbserial: USB Serial Driver core
[ 8722.945517] usbcore: registered new interface driver pl2303
[ 8722.945532] USB Serial support registered for pl2303
[ 8722.945549] pl2303 1-1.2:1.0: pl2303 converter detected
[ 8722.947531] usb 1-1.2: pl2303 converter now attached to ttyUSB0

By the way, when running

screen /dev/ttyUSB0 115200 

nothing happened (of course my user belong to dialout group) ... Only a blask screen.

Any idea ? Thanks for help

  • Could it be that you are using a wrong cable? The XS36V has two serial ports, the upper one is ttyS0, the second one is ttyS1. Have you connected the correct port? – Lekensteyn May 31 '13 at 8:32
  • Have tried both. Maybe my rs232 cable do not work with Linux. – sherpa Jul 13 '13 at 6:57
  • 2
    s/Linux/the computer/ (if you would use other OSes, you may will have the same issue). Unlike USB, there are multiple different cables to connect to serial devices. Is the internal wiring of the cable correct? Do you need a null modem instead? Is a serial console attached on the XS36V? – Lekensteyn Jul 13 '13 at 14:25

For modern Ubuntus you can found an example here:



There's a couple of points to note regarding serial consoles.

  1. You need a crossover cable, connecting TX on the client to RX on the server, and vice versa. In addition you need ground connection. The others is more or less optional. This cable is commonly called a null modem cable, and can be had cheaply on e-bay, amazon and so on. Or you can make your own.
  2. It has no state. The server doesn't know when there is a client listening. You thus has to inform the server to send something - or it will sit there waiting for input. Sending enter is a common way of getting some response. If it's sitting at the login prompt, this will provide some output.

This is the two most common pitfalls I've seen people make with serial connection. They're used to ssh or telnet, which has a state - and the server responds when connecting. Or they're used to modern cables, where it generally works if the cable fits.

With the advent of cheap computers like Raspberry Pi, a serial console may in a lot of cases be a convenient and cheap Out Of Band management system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.