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.)