Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question
    
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 '11 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 –  Riccardo Magrini Jan 21 '11 at 11:56
add comment

4 Answers

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.

share|improve this answer
    
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. –  Riccardo Magrini Jan 21 '11 at 11:52
    
Please confirm my answer by pressing the checkbox to the left. –  Martin Owens -doctormo- Jan 21 '11 at 15:25
add comment

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.

share|improve this answer
add comment

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*

share|improve this answer
add comment

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

share|improve this answer
    
Yes, it shows up: 03:00.0 Serial controller: Oxford Semiconductor Ltd Device c158 –  Ingram Nov 14 '11 at 23:01
    
Does that mean it works for sure, just because it shows up there? –  Ingram Nov 14 '11 at 23:03
    
This is really a comment, not an answer to the question. You can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. –  Mitch Aug 21 '12 at 7:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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