2

I just installed a 2 port serial adapter in my Ubuntu 10.10 system, then I tried following this tutorial that I used on my old system to connect to a cisco router (my old system had an onboard serial adapter, and the tutorial worked just fine). I can't get my system to connect to the cisco router, so I'm wondering if the card even works in Ubuntu. How can I tell if the card actually works with Ubuntu?

#dmesg | grep tty
[    0.000000] console [tty0] enabled
[    0.358667] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.358994] 00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.359128] ttyS1: detected caps 00000700 should be 00000100
[    0.359132] 0000:03:00.0: ttyS1 at MMIO 0xfeafd000 (irq = 16) is a 16C950/954
[    0.359191] ttyS2: detected caps 00000700 should be 00000100
[    0.359195] 0000:03:00.0: ttyS2 at MMIO 0xfeafd200 (irq = 16) is a 16C950/954
2
  • Have you verified that the console settings on the router are correct by, e.g., using a different laptop or your windows/putty combination? Also, what is minicom showing? Just no response when you hit 'enter' repeatedly?
    – belacqua
    Jan 20, 2011 at 22:39
  • Yes I've verified all setting, and after must attempts I were able to connect to Cisco Router. I don't know to explain me what it was happened but now the connection works. thanks Jan 21, 2011 at 11:56

4 Answers 4

2

The way you've got Ubuntu setup is correct, the serial port at /dev/ttyUSB0 is the right serial port. You can test the port by piping some data into it and if it doesn't return an error, then it's working as a serial port:

ls > /dev/ttyUSB0

Now to get it working you may have to find out what the right settings are. Or you may have to switch on serial port communication on your cisco router (it's not always switched on).

If you want you can use ttywatch to do some serial port debugging. But it might be beyond your scope.

2
  • I run that command without received any errors, after must attempts I were able to connect to Cisco Router. I don't know to explain me what it was happened but now the connection works. Jan 21, 2011 at 11:52
  • Please confirm my answer by pressing the checkbox to the left. Jan 21, 2011 at 15:25
1

The easiest way to test a serial port is to loop back Tx to Rx. This is easy if you have a loopback plug. If not connect pin 2 to pin 3 (db9 or db25).

Then open the port with a terminal program like picocomm. If the port is working you should see the characters you type. If not, the port is not working. You may have to configure picocomm to ignore RTS/CTS signalling.

I find an RS-232 inline signal tester (a small block with LEDs for each signal) helpful. It will help find if you have your signal lines crossed. At slow speeds you can see the data passing on the Tx and Rx lines. If the lines are crossed you may need a null modem cable.

I believe that it important to use the cable that came with the router. If I am not mistaken it connects pins in the opposite order to what you get with a CAT-5 cable.

1

With the same setup, I found that I had to tweak the setserial baud_base to get correct baud rates.

E.g.:

setserial /dev/ttyS1 baud_base 115200
setserial /dev/ttyS2 baud_base 115200

You can paste that in /etc/rc.local for example.

With another serial card, the baud base was 921600.

Check the serial status of your serial lines with setserial -gav /dev/ttyS*

0

Is the card connected via PCI? If so, just run lspci in terminal and see if it shows up.

2
  • Yes, it shows up: 03:00.0 Serial controller: Oxford Semiconductor Ltd Device c158
    – Ingram
    Nov 14, 2011 at 23:01
  • Does that mean it works for sure, just because it shows up there?
    – Ingram
    Nov 14, 2011 at 23:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .