Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
No rx on Serial Port
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
vetoll
n00b
n00b


Joined: 30 Nov 2011
Posts: 7

PostPosted: Thu Mar 07, 2013 12:22 pm    Post subject: No rx on Serial Port Reply with quote

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]
[ 0.739983] serial 00:08: activated

anteras / # dmesg | grep tty
[ 0.000000] console [tty0] enabled
[ 0.760893] 00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A


Quote:
anteras / # setserial -g /dev/ttyS*
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, 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
1: uart:unknown port:000002F8 irq:3
2: uart:unknown port:000003E8 irq:4
3: uart:unknown port:000002E8 irq:3


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
crw-rw---- 1 root uucp 4, 66 Mar 7 2013 /dev/ttyS2
crw-rw---- 1 root uucp 4, 67 Mar 7 2013 /dev/ttyS3


Quote:
anteras / # cat /usr/src/linux/.config | grep SERIAL
CONFIG_PARPORT_SERIAL=y
# CONFIG_MOUSE_SERIAL is not set
CONFIG_SERIAL_NONSTANDARD=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_PNP=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_PCI=y
# CONFIG_SERIAL_8250_CS is not set
CONFIG_SERIAL_8250_NR_UARTS=32
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_8250_RSA=y
# CONFIG_SERIAL_MAX3100 is not set
# CONFIG_SERIAL_MAX310X is not set
# CONFIG_SERIAL_MFD_HSU is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set
# CONFIG_SERIAL_SCCNXP is not set
# CONFIG_SERIAL_TIMBERDALE is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
# CONFIG_SERIAL_PCH_UART is not set
# CONFIG_SERIAL_ARC is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_USB_SERIAL is not set


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

Regards

Vetoll
Back to top
View user's profile Send private message
chiefbag
Guru
Guru


Joined: 01 Oct 2010
Posts: 542
Location: The Kingdom

PostPosted: Thu Mar 07, 2013 12:30 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
vetoll
n00b
n00b


Joined: 30 Nov 2011
Posts: 7

PostPosted: Thu Mar 07, 2013 12:42 pm    Post subject: Reply with quote

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.
Port /dev/ttyS0

Press CTRL-A Z for help on special keys



Regards
Back to top
View user's profile Send private message
chiefbag
Guru
Guru


Joined: 01 Oct 2010
Posts: 542
Location: The Kingdom

PostPosted: Thu Mar 07, 2013 12:49 pm    Post subject: Reply with quote

Try this to get into the minicom settings:

Code:
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
Back to top
View user's profile Send private message
vetoll
n00b
n00b


Joined: 30 Nov 2011
Posts: 7

PostPosted: Thu Mar 07, 2013 12:59 pm    Post subject: Reply with quote

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
pu baudrate 9600
pu rtscts No
Back to top
View user's profile Send private message
chiefbag
Guru
Guru


Joined: 01 Oct 2010
Posts: 542
Location: The Kingdom

PostPosted: Thu Mar 07, 2013 2:15 pm    Post subject: Reply with quote

My only suggestion would be to try it with a live cd, this might prove its a kernel config issue or not.
Back to top
View user's profile Send private message
vetoll
n00b
n00b


Joined: 30 Nov 2011
Posts: 7

PostPosted: Thu Mar 07, 2013 2:22 pm    Post subject: Reply with quote

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

which is why I resorted to the forum as a last stand !!
Back to top
View user's profile Send private message
chiefbag
Guru
Guru


Joined: 01 Oct 2010
Posts: 542
Location: The Kingdom

PostPosted: Thu Mar 07, 2013 2:35 pm    Post subject: Reply with quote

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 :)
Back to top
View user's profile Send private message
vetoll
n00b
n00b


Joined: 30 Nov 2011
Posts: 7

PostPosted: Fri Mar 08, 2013 3:44 pm    Post subject: Reply with quote

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

guess what, doesn't work in blows either!! new mobo time...
Back to top
View user's profile Send private message
chiefbag
Guru
Guru


Joined: 01 Oct 2010
Posts: 542
Location: The Kingdom

PostPosted: Fri Mar 08, 2013 4:15 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54099
Location: 56N 3W

PostPosted: Fri Mar 08, 2013 8:48 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
billium
Apprentice
Apprentice


Joined: 22 Mar 2003
Posts: 185

PostPosted: Fri Mar 08, 2013 10:54 pm    Post subject: Reply with quote

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!?
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Sat Mar 09, 2013 6:33 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Sat Mar 09, 2013 6:40 pm    Post subject: Reply with quote

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.
If that works, your serial port may be ok. The data parts are OK anyway. Handshaking can still be broken.


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.
Back to top
View user's profile Send private message
_______0
Guru
Guru


Joined: 15 Oct 2012
Posts: 521

PostPosted: Sat Mar 09, 2013 7:28 pm    Post subject: Reply with quote

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!!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54099
Location: 56N 3W

PostPosted: Sat Mar 09, 2013 8:16 pm    Post subject: Reply with quote

_______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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum