Serial port in Linux

Soldato
Joined
10 Oct 2005
Posts
4,192
Location
London
I can't get my ubuntu laptop to connect to any network switch via a serial port and it is doing my head in!!!

Have tried minicom,gtkterm and putty but can't get a serial to console connection working, I get no response. Rebooting the router while still connected should bring up all the output as it restarts, but I get zilch:mad:

Can someone please help me with the steps that I need to go through to verify that my serial port is working.

dmesg output below...

dmesg |grep tty
[ 24.190802] console [tty0] enabled
[ 26.170611] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 26.171246] 00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 42.489382] audit(1213879796.770:2): type=1503 operation="inode_permission" requested_mask="a::" denied_mask="a::" name="/dev/tty" pid=5320 profile="/usr/sbin/cupsd" namespace="default"
[ 4071.319780] ttySHSF0 at MMIO 0x0 (irq = 1) is a Conexant HSF softmodem (HDA-14f12bfa:14f100c3-1)
[ 4073.915328] ttySHSF0 at MMIO 0x0 (irq = 1) is a Conexant HSF softmodem (HDA-14f12bfa:14f100c3-1)
[ 4076.363149] ttySHSF0 at MMIO 0x0 (irq = 1) is a Conexant HSF softmodem (HDA-14f12bfa:14f100c3-1)

One thing Im sure on is that the settings in any terminal program I use are set to 8-N-1 with no flow control
 
[ 26.170611] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 26.171246] 00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
well the port is working.. do you get anything back from echoing into the port? e.g.
Code:
echo "foo" > /dev/ttyS0
other than that I'm not much use.. not sure what protocol/api/etc. switches use.
 
Not that I can see...

root@CJN3H2J:~# echo "foo" > /dev/ttyS0
root@CJN3H2J:~#

Serial communication should be handled by the app used to connect - its pretty standard and hasn't changed in years...
Its a dual boot machine and if I boot into windows, everything works fine using hyperterminal, or putty so I know the port works
 
look up what the handshake strings are for the device, and see if they respond to that.

Also try using an app/command called cu (short for call up)
 
Still no Joy...
There was a link off of the post above about how to set up a console client, but it has everything I have already done...

I have tried minicom, kermit, cutecom gtkterm, and putty, so I doubt it is the software. I tried cu, but Im not sure I configured it correctly
Im not completely clear on handshake strings, but I know that the line speed is 9600 8-N-1 with no flow control. This has always been the settings that I use to connect using either SecureCRT or putty in windows..

Do I need to mount the serial port or assign it an alias?
How can I test that the serial port is actually working?

Just to be clear, I am not looking to output messages to my serial port, I am looking to connect my serial port to switches or routers in order to set them up. This is the last thing I need to dual boot for, crack this and I can be completely ubuntu, if I cant, then XP it is for me...
I can find my way around in linux, but diagnosing this one is beyond my skill set! :mad:
 
Thats exactly how I thought it would work, but apparently not..


OPTI+-----------------------------------------------------------------------+
Comp| A - Serial Device : /dev/ttyS0 |
Port| B - Lockfile Location : /var/lock |
| C - Callin Program : |
| D - Callout Program : |
| E - Bps/Par/Bits : 9600 8N1 |
| F - Hardware Flow Control : Yes |
| G - Software Flow Control : No


It opens another window, I press <return> a few times to initiate session but I get no response from the remote device.
If I dual boot into XP, these settings work for me on putty, SecureCRT and the dreaded 'hyperterminal'...
 
Im not trying to use the modem, Im just trying to use a com port to connect to a router.
Cheers for that hsf link though, just wished Id known about it back when I was trying to get the modem to work..

Are you saying that I need to load drivers for the serial port for it to work?
I thought that because I can see it via dmesg, the port was verified as working?
 
This is where my lack of *nix knowledge come into play.
As long as the port communication parameters are correct, Im thinking that the connection should work, ie 8-N-1, no flow control etc.
I know that in windows, these settings work, reboot into linux, and I cant get them to work.
I need help on where to look to diagnose why I can't use my serial port to talk to remote devices.
Will carry on googling..
 
Back
Top Bottom