[RESOLVED] Using a built-in serial port with Linux CentOS 7.3

Issues related to hardware problems
Post Reply
MarkEHansen
Posts: 118
Joined: 2005/11/25 02:50:31
Location: Sacramento, CA

[RESOLVED] Using a built-in serial port with Linux CentOS 7.3

Post by MarkEHansen » 2017/09/13 18:26:28

I have a hardware project I'm building which needs to communicate with a host controller application running on a PC. I'm using a PIC microcontroller and an RS232 chip to drive the serial communications. My serial cable includes only 3 pins: Ground, RX and TX.

When connecting this hardware to a serial port on my Windows PC which is using a multi-port serial card with an octopus cable, the communications are fine.

When I connect the hardware to my Linux machine, I'm having problems.

My Linux machine is using an ASUS M2NPV-VM motherboard with a 10-pin header on board for the serial port. I then connected a common 10-pin header to DB9 connector to provide the DB9 serial port on the back of the machine. On the Linux machine, I'm running CentOS 7.3.1611

To talk to the board, I'm using Putty (in serial mode) on both computers. Although on the Linux machine, I've also tried minicom but that didn't help.

First, I noticed the board was not getting any data from the host as well as the host was not getting anything from the board.
If I reversed the RX and TX pins on the cable, then the board starting getting communications from the host, but the host is still not getting anything from the board.

I checked and double-checked the serial cable pin connections so I'm pretty sure they are correct (although backward from what was needed by the Windows PC).

I also tried connecting an old external modem to the Linux serial port, but the modem uses a DB25 connector and I only have one cable - and I don't know if it is a null-modem cable (I haven't checked it yet - just tried it and it didn't work). This modem and cable do work when I connect them to my Windows PC.

The serial port is enabled in the BIOS and dmesg shows that it is recognized:

Code: Select all

[    1.102016] 00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
I realize any of the following are possible:
- The serial port on the motherboard is bad
- The 10-pin header to DB-9 connector is bad
- I thought this would be a longer list.

I've ordered new 10-pin header to DB-9 connectors so I can try swapping that out. I've also ordered a plug-in serial port card, but I'm not sure if I'll be able to get the drivers required by the card built for my kernel (the driver source claims it support kernel versions 2.4 and 2.6 only - but I suspect it really means 2.6 and above and just needs some makefile twiddling). I plan to try building/installing the card this weekend.

As for the on-board serial port, given that it will TX to the device but not RX, is there anything I can do to diagnose this?

Thanks,
Last edited by MarkEHansen on 2017/09/16 20:25:58, edited 1 time in total.

MarkEHansen
Posts: 118
Joined: 2005/11/25 02:50:31
Location: Sacramento, CA

Re: Using a built-in serial port with Linux CentOS 7.3

Post by MarkEHansen » 2017/09/16 20:25:26

Well, it turns out it was the 10-pin header to DB9 serial adapter cable. I ordered a couple of these:

https://www.amazon.com/gp/product/B001Y ... UTF8&psc=1

and it just started working (with the RX/TX configured the same as when it was working connected to my Windows PC).

The other connector was wired differently for some reason. Perhaps it was a custom connector from some other motherboard. I just found it in my junk drawer and assumed they were all the same.

Thanks.

Post Reply