# No rx on Serial Port

## vetoll

Hi,

I've got an HP Probook 6570b, loaded with Gentoo X86_64.

I can't seem to get the serial port to work, trying to configure a cisco switch.

I've tried minicom/screen/putty, all of them don't receive anything??

 *Quote:*   

> anteras / # uname -a
> 
> Linux anteras 3.8.2-gentoo #5 SMP Thu Mar 7 12:22:26 SAST 2013 x86_64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz GenuineIntel GNU/Linux
> 
> 

 

 *Quote:*   

> anteras / # dmesg | grep serial
> 
> [    0.739361] serial 00:08: [io  0x03f8-0x03ff]
> 
> [    0.739402] serial 00:08: [irq 4]
> ...

 

 *Quote:*   

> anteras / # setserial -g /dev/ttyS*
> 
> /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
> 
> /dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3
> ...

 

 *Quote:*   

> anteras / # cat /proc/tty/driver/serial 
> 
> serinfo:1.0 driver revision:
> 
> 0: uart:16550A port:000003F8 irq:4 tx:169 rx:0
> ...

 

 *Quote:*   

> anteras / # ls -l /dev/ttyS*
> 
> crw-rw---- 1 root uucp 4, 64 Mar  7 14:02 /dev/ttyS0
> 
> crw-rw---- 1 root uucp 4, 65 Mar  7  2013 /dev/ttyS1
> ...

 

 *Quote:*   

> anteras / # cat /usr/src/linux/.config | grep SERIAL 
> 
> CONFIG_PARPORT_SERIAL=y
> 
> # CONFIG_MOUSE_SERIAL is not set
> ...

 

Any assistance would be appreciated, tried to post everything I think would be needed.

Regards

Vetoll

----------

## chiefbag

What error are you getting from Minicom?

Have you configured the the port to  /dev/ttyS0 in minicom correctly 

Are you running Minicom as root? , if not you need to add your user to the uucp group.

What device are you trying to connect to? , did you set the baud rate correctly? eg 9600 baud (default), 8 data bits, no parity, 1 stop bits, for a Cisco 5505

----------

## vetoll

I get no response from minicom...

Connecting to a cisco 3560 switch at a baud rate of 9600, 8 data bits, 1 stop bit, no parity... default settings.

I've tested a windows laptop with putty and it works fine. (Sample console cable, same switch, same baud rates)

 *Quote:*   

> Welcome to minicom 2.6
> 
> OPTIONS: I18n 
> 
> Compiled on Mar  7 2013, 11:23:41.
> ...

 

Regards

----------

## chiefbag

Try this to get into the minicom settings:

```
minicom -s
```

Then scroll down to " Serial port setup "

You should see "E -    Bps/Par/Bits       : 9600 8N1" if not edit this and don't forget to save the settings when exiting

----------

## vetoll

Hi,

My settings are correct, like i said, even screen /dev/ttyS0 9600 doesnt work.

Nor does putty. And yes I'm running all 3 of them from root.

I've even tried to cat /dev/ttyS0, that just outputs nothing at all

 *Quote:*   

> anteras / # cat /etc/minicom/minirc.dfl 
> 
> # Machine-generated file - use "minicom -s" to change parameters.
> 
> pu port             /dev/ttyS0
> ...

 

----------

## chiefbag

My only suggestion would be to try it with a live cd, this might prove its a kernel config issue or not.

----------

## vetoll

haha, tried with both the i386 and amd64 live CDs.....

which is why I resorted to the forum as a last stand !!

----------

## chiefbag

Could be just a faulty socket so assuming your cable is ok?

 I suppose your only way of proving that is to install Windows or something, but you have probably tried that already  :Smile: 

----------

## vetoll

loaded windows finally, sigh.. all that effort wasted...

guess what, doesn't work in blows either!! new mobo time...

----------

## chiefbag

I'd get the board checked at a repair shop.

There is bound to be some protection on the port eg fuse of some description

----------

## NeddySeagoon

vetoll,

RS-232 is a wonderful standard.  There are so many versions to choose from and they don't all interoperate either.

20mA current loop, the original which uses something like 25v for signalling

12v, found on early PCs

5v, found on middle aged PCs

3.3v on some modern equipment.  I've never seen it on a PC. Probably just as well as its instantly destroyed by connecting it to any of the others.

Link pins 2 and 3 together in your serial port, thats Tx data and Rx data.  Turn off hardware and software handshaking.

Now anything sent to the serial port is received back again over your improvised loopback connector.

If that works, your serial port may be ok. The data parts are OK anyway.  Handshaking can still be broken.

Serial ports are made to be short circuit proof to either ground or the other signalling voltage, so they are fairly robust.

It would be unusual to find devices like fuses.

----------

## billium

I would use usb<->serial (~£5).

board repair / check (~£50)

replace mobo (~£ depends on quality)

I think you have covered most things  ... just in case handshaking off!?

----------

## _______0

yeah, I doubt is serial's port physical problem. Serial would be about the last piece of a mobo to go wrong. And your kernel reports everything's fine with it. Looks like a misconfigured port.

And try stty instead of setserial, it's better. Then test it with:

echo "testing" > /dev/ttyS0

The usb <-> serial adapter is also another solution.

/me is amazed shit works with 9600

----------

## _______0

 *NeddySeagoon wrote:*   

> 
> 
> Link pins 2 and 3 together in your serial port, thats Tx data and Rx data.  Turn off hardware and software handshaking.
> 
> Now anything sent to the serial port is received back again over your improvised loopback connector.
> ...

 

lolwut??? Are you sure this is safe? Won't short the mobo or something?? And where's the output?

PS:

Just tried, I don't see the reply.

To turn off hardware handshake is like this?

stty -crtscts -F /dev/ttyS0

What about software handshaking?

So far I don't get any reply in console with your hack.

echo 'test' > /dev/ttyS0

I've joined pins 2 and 3 with a mobo jumper.

----------

## _______0

as crazy as it may sound the 2 and 3 pin shorting hack works!

just follow this link: http://stackoverflow.com/questions/3701955/serial-port-loopback-duplex-test-in-bash-or-c-process-substitution

resumed:

first terminal:

while (true) do cat -A /dev/ttyS0 ; done

second terminal:

echo "1234567890" > /dev/ttyS0

Or compile the more sophisticated and complex file:

writeread.c

serial.h

the first one needs serial.h apparently.

computers be crazy!!

----------

## NeddySeagoon

_______0,

Being an old fart who can remember when 110 baud modems with acoustic couplers were new and real teleprinters, with paper, inked ribbons, real bells for Ctrl-G etc.

I'm sure connecting pings 2 and 3 together on a serial port is safe. You can actually buy (or could at one time)  'loopback connectors' to do exactly this with the data and hardware handshake lines.  You can also make one yourself.

When you send a character, it goes into the receive buffer in the UART, just as if it had been received from an external piece of equipment.

When you use a terminal emulator, everything you type is echoed back to you.  If you have local echo on too, you get both the local echo and the loopback character.

----------

