LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-27-2013, 05:54 PM   #1
whatlogic
LQ Newbie
 
Registered: Nov 2013
Posts: 4

Rep: Reputation: Disabled
PCI serial port card problem - garbage I/O


Hello, good people of LinuxQuestions.org.

I am having a problem with a PCI expansion card with two serial ports (yes, they are still used ). Simply put, it just garbles everything arriving at it, and the same happens to the output. I mean, it doesn't flip a single bit or anything like that, it completely messes up the data, without any resemblance to the original (I've looked at a hex dump).

But here's the thing (you've probably guessed it already): it has no problem on Windows. Sure enough, it came with a driver CD, which I used, and needless to say, the drivers were Windows-only.

So, to go into a little more detail, I have a setup of two PCs connected by a null modem cable. One of them runs Linux only, while the other runs both Windows and Linux. To get to the point, the connection works perfectly on Windows, but it works partially on Linux. Why say partially? Well, if I connect one port directly to the other one, it works without a hiccup! I can run getty on one of the ttys, or I can just cat one and write to another, whatever I do, it works normally. Likewise, I haven't noticed any irregularities in the system logs that would point in the direction of solving this issue.

So what, in your opinion, could be the problem I'm facing here? Obviously, I've ruled out hardware failure, and the config is the same across both Win and Lin: 8N1, 38400 baud, software flow control. I've also tried numerous other combinations of parameters on both OSs, and unsurprisingly, it doesn't matter; Windows works with any combination (of course, if I match the config on the other side), while Linux works with none. So I'm figuring it might be a driver problem or something, but I don't really know where to start hacking. It might be that the card is simply unsupported (though that doesn't necessarily mean it won't work - I've had other "unsupported" hardware in here and it ran like clockwork!). Even so, it uses the 16C950 UART which is recognized by setserial and listed by dmesg, so I'm not sure what else needs to be "supported"...

In the end, I'd even be willing out to have a go at writing a special driver for it, but I'd rather like to know if there already is an existing solution. The fact that it works when I connect one port on the card to the other one makes me think it might be some sort of (de)syncing issue, but then again, I'm not sure, because it distorts each different byte differently, but it always changes byte XX to byte YY (e.g. it always changes 0x71->0xD9, 0x3D->0xDF, etc.)

If anyone's had a similar experience, and especially if you solved it, please share.

Oh by the way, here's a dmesg excerpt mentioning the card (or rather, the ports).

Code:
[    1.397253] ttyS1: detected caps 00000700 should be 00000500
[    1.397255] 0000:04:05.0: ttyS1 at I/O 0xe800 (irq = 20, base_baud = 921600) is a 16C950/954
[    1.397408] ttyS2: detected caps 00000700 should be 00000500
[    1.397410] 0000:04:05.0: ttyS2 at I/O 0xe480 (irq = 20, base_baud = 921600) is a 16C950/954
I've read somewhere that the "detected caps..." line isn't an error, and probably isn't relevant at all, but I don't know what to think anymore.

Some technical details: the distro on both PCs is Arch Linux, pretty much up to date, and the UART in the other PC is a good ol' 16550.

Let me know if you need any more info (lspci output, etc.)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PCI to Serial Quad 8-port Controller Card Chipset: ITE 8871 - help matulek Linux - Hardware 1 10-14-2010 05:05 PM
On my PCI serial port card I-440 work only two ports from 4 vitaly_v_ch Linux - Hardware 0 01-16-2010 01:18 AM
regarding multi serial port PCI card IO address problem ayaskant16 Linux - Hardware 0 11-12-2008 12:32 AM
New SIIG 4 Port PCI serial card (16C954) driver problem gpedley Linux - Hardware 2 07-10-2008 10:35 PM
adding a additional pci card serial port da_kidd_er Linux - Hardware 0 01-09-2004 12:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration