Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm pretty new to Linux, and I'm running into a problem with my serial ports. I'm using Centos 5.4 (2.6.18-164.el5).
I'm using an Intel d510mo mini-itx mainboard, this board was chosen for this application because of its' 2 onboard serial port headers. I need both of them to work, one for receiving a GPS signal, the other for a Matrix Orbital LK202-25 display.
The problem is that whatever I do, I can't seem to get /dev/ttyS0 and /dev/ttyS1 to work, while they do show up.
When I try to control the display, I can't get it to do anything (no difference between /dev/ttyS0 and /dev/ttyS1). When I connect the GPS, /dev/ttyS0 does nothing, but when I connect to /dev/ttyS1, it does show something coming in, just not the text string the GPS is sending. It appears the incoming data is deformed (at first I thought there might be a baudrate mismatch, but I checked that multiple times, also the deformed data is too consistent in it's deformation to have a cause like that)
I checked everything a million times, but I feel like I'm overlooking something.
dmesg shows the following:
[root@ra-pcw-wks0003 ~]# dmesg | grep tty
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:09: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
00:0a: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
which looks ok I think. I checked with lspci to see if there were any IRQ conflicts, but there aren't.
To test I'm using minicom, I've gone over the minicom settings quite a few times too, but everything there looks good. To make sure the settings are good, I used a USB to RS232 converter (which is on my system as /dev/ttyUSB0) When changing nothing but the port from either /dev/ttyS0 or /dev/ttyS1 to /dev/ttyUSB0, everything works fine. But via the onboard serial headers it seems impossible to get working.
I went as far as swapping out the mainboard to make sure the problem isn't in the hardware, but no luck. As the second mainboard has the exact same issues as the first, I think it might be a driver or configuration issue, but my knowledge of linux is not yet at a level where I can troubleshoot problems like that...
Can anyone please help?
If you need more information, just let me know what you need. (remember I'm a n00b, so you might have to tell me how to get certain pieces of info).
For testing purposes I have the GPS sending out the coordinates as text (ascii), I'm monitoring the serialport using minicom.
When the GPS is connected to the mainboard headers I get either nothing (ttyS0) or deformed date (ttyS1). When I use the USB to RS232 converter (ttyUSB0), everything is fine (nothing but the tty to use was changed).
First go back and make sure that everything is wired correctly. The white stripe should be closest to pin 1 of the header. I assume it is a standard flat wire cable.
Checked that already, verified the pinout in the mainboards manual, tried several header cables, and even took the multimeter to my header cables to make sure they are wired as they are supposed to.
Ugh! Serial Ports.
/going back 6-10 years.
There is a compatibility problem with rs-232, in that high should be +10V, and low, if I'm not mistaken, some specs say -10V. The MAX-232 (a chip which blows every time the sun goes behind a cloud) is a great rs232 connector, giving +10 and maybe -5V in most applications I have put an oscilloscope on. Other hardware uses +10 and 0V although it tolerates negative voltage. Some pair of old chips are surprisingly common there still and do +10 & 0V. These level issues can cause connection problems.
RS232, unlike usb is extremely sensitive to earthing issues. If you connect two powered boxes, you may blow something - flashover, it's called ((IIRC?). Any difference in earths also does damage. RS232 links earth to earth to 0V. Anyhow, you zap the port.
Try something like
dd if=/dev/ttyS1 of=~/foo bs=1 count=20
and power on one box when you are trying to connect.This will sit waiting for 20 bytes. But if your port is blown, it won't get them. Try something else in your serial port and try to narrow the problem down. It could be a blown port on something
In my case, I keep a DSUB connector, which is soldered to loopback.
That is 2-3(txd-rxd), 4-6(dtr-dsr), 7-8(rts-cts) wired.
And plug it in the serial recp, and test with minicom.
Well, not exactly solved, but at least I have a workaround and offloaded the original issue to my hardware supplier.
It turns out that Centos and the serialcontroller on the mainboard I was using don't play nice together. I swapped out the Intel D510mo mainboard for a Jetway NC92-330-LF I had laying around re-installed Centos but used the same cables, same settings: instant success
I sent back the batch of Intel boards to my supplier... I did ask him for Centos 5.4 compatible, Atom based, Mini ITX boards with 2 serial ports... so he didn't send me what I needed...
This confirms incomptability of Intel D510 motherboard serial ports with CentOS
I am running Centos 6 and I have the same problem. Tried everything above and more to make this serial ports work to no avail. So this confirms that this motherboard serial ports are not compatible with CentOS.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.