trying to get a pci card w/ 2 serial ports working

Issues related to hardware problems
Post Reply
hoodcanaljim
Posts: 312
Joined: 2006/02/05 17:49:10

trying to get a pci card w/ 2 serial ports working

Post by hoodcanaljim » 2015/10/22 01:29:12

Hi guys

I bought a Multi I/O PCI Card and have been having problems getting it working with my optiplex 745 x Centos 7 64bit computer.
About the only id on the card is a tag saying SD-PCI 15039.

with the card installed this shows up in the lspci -vv
04:02.0 Serial controller: Device 1c00:2273 (rev 0f) (prog-if 02 [16550])
Subsystem: Device 1c00:2273
Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Interrupt: pin A routed to IRQ 18
Region 0: I/O ports at dcf0
Region 1: I/O ports at dcf8
Kernel driver in use: serial
dmesg | grep -i tty
[ 0.000000] console [tty0] enabled
[ 0.924813] 00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 0.925548] 0000:04:02.0: ttyS1 at I/O 0xdcf0 (irq = 18) is a XScale
[ 0.925678] 0000:04:02.0: ttyS2 at I/O 0xdcf8 (irq = 18) is a XScale
cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:224 rx:0 RTS|DTR
1: uart:16550A port:0000DCF0 irq:18 tx:33 rx:0
2: uart:16550A port:0000DCF8 irq:18 tx:33 rx:0 RTS|DTR
3: uart:unknown port:000002E8 irq:3
setserial -g /dev/ttyS?
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0xdcf0, IRQ: 18
/dev/ttyS2, UART: 16550A, Port: 0xdcf8, IRQ: 18
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3

On boot ttyS1 / 2 were UART: unknown before this command.
setserial /dev/ttyS1 UART 16550A; setserial /dev/ttyS2 UART 16550A


Using minicom with nothing connected to any of the serial ports, when I upload a file to ttyS0 it acts as though it has happened and the computer chips and a message displays saying
0.2 Kbytes transferred at 200 CPS... Done.
READY: press any key to continue...


But ttyS1 and ttyS2 lock up when the same file is uploaded.

ttyS3 does this
Error while writing (errno = 5) |
|Error while writing (errno = 5) |
|Error while writing (errno = 5) |
|Error while writing (errno = 5) |
|0.2 Kbytes transferred at 200 CPS... Done. |
| |
| READY: press any key to continue...


I've been reading everything I could find on the net but I have not found an answer.
One posting had two lines showing in the lspci -vv that displayed the memory assigned to the ports. Which is missing on my output. Does that make a difference??

Anyone with experience around pci serial cards have an idea what I could do to make this work??

Thanks for you time
Jim

hoodcanaljim
Posts: 312
Joined: 2006/02/05 17:49:10

Re: trying to get a pci card w/ 2 serial ports working

Post by hoodcanaljim » 2015/10/23 14:15:31

Hi

Still trying to get this working. Does the line "Kernel driver in use: serial" at the end of the lspci -vv ouput, mean I do NOT need to compile a driver and use modprobe or insmod to insert it into the kernel??

I believe this mean the the 3.10.0-229 has support for this serial card built into the kernel.

Jim

found this command by googling

cat /lib/modules/$(uname -r)/modules.builtin | grep serial
kernel/drivers/tty/serial/serial_core.ko
kernel/drivers/tty/serial/kgdboc.ko
kernel/drivers/tty/serial/8250/8250.ko
kernel/drivers/tty/serial/8250/8250_pci.ko
kernel/drivers/usb/serial/usbserial.ko

hoodcanaljim
Posts: 312
Joined: 2006/02/05 17:49:10

Re: trying to get a pci card w/ 2 serial ports working

Post by hoodcanaljim » 2015/10/23 20:04:25

Well I finally found my rs232 tester (old radioshack) and hooked it up to each of the serial ports.

After reboot, run setserial to set UART 16550A for both ttyS1 and 2.

Hook up each serial port in turn and check the lights on the serial tester.

All show DT, RTS, DTR as Red when first checked. Once minicom is started and set to the serial port they all show DT and DTR turn Green.

ttyS0 -- when a ascii file is sent DT light turns a red/green pulsing color and at the end of the transmission the computer beeps and DT goes back to Red.

ttyS1/2 -- when the same file is sent minicom locks up. Nothing is transmitted and the only way to stop it is Ctr-C

Does anyone know what would cause this behavior?

I have been unable to find any similar case after several days of looking.

Thanks
Jim

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: trying to get a pci card w/ 2 serial ports working

Post by AlanBartlett » 2015/10/24 14:48:39

The only advice I can give is, as the device is a PCI card, you should be able to identify the Vendor:Device ID paring for it from the output returned by --

lspci -nn.

There will be two colon separated hexadecimal numbers delimited by a pair of open/close square brackets.

Here is an example, taken from my own system. For simplicity, I take the last device mentioned in the list output --

[Duo2 ~]$ lspci -nn | tail -n 1
0c:00.0 Network controller [0280]: Intel Corporation Ultimate N WiFi Link 5300 [8086:4235]
[Duo2 ~]$


The two hexadecimal numbers in this case are 8086 and 4235.

For this example, let's assume that your PCI card has output the above line. Now perform a "double grep" on the modules directory of all the installed kernels on your system --

[Duo2 ~]$ grep -i 8086 /lib/modules/*/modules.alias | grep -i 4235
/lib/modules/2.6.32-573.7.1.el6.x86_64/modules.alias:alias pci:v00008086d00004235sv*sd00001104bc*sc*i* iwlwifi
/lib/modules/2.6.32-573.7.1.el6.x86_64/modules.alias:alias pci:v00008086d00004235sv*sd00001004bc*sc*i* iwlwifi
/lib/modules/2.6.32-573.7.1.el6.x86_64/modules.alias:alias pci:v00008086d00004235sv*sd00001101bc*sc*i* iwlwifi
/lib/modules/2.6.32-573.7.1.el6.x86_64/modules.alias:alias pci:v00008086d00004235sv*sd00001001bc*sc*i* iwlwifi
/lib/modules/2.6.32-573.7.1.el6.x86_64/modules.alias:alias pci:v00008086d00004235sv*sd00001124bc*sc*i* iwlwifi
/lib/modules/2.6.32-573.7.1.el6.x86_64/modules.alias:alias pci:v00008086d00004235sv*sd00001024bc*sc*i* iwlwifi
/lib/modules/2.6.32-573.7.1.el6.x86_64/modules.alias:alias pci:v00008086d00004235sv*sd00001121bc*sc*i* iwlwifi
/lib/modules/2.6.32-573.7.1.el6.x86_64/modules.alias:alias pci:v00008086d00004235sv*sd00001021bc*sc*i* iwlwifi
[Duo2 ~]$


At the right hand end of each line we see the name of the appropriate kernel module, iwlwifi.

So do the same for your PCI based serial port card and see if it gives you a hint of the appropriate driver.
Image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

hoodcanaljim
Posts: 312
Joined: 2006/02/05 17:49:10

Re: trying to get a pci card w/ 2 serial ports working

Post by hoodcanaljim » 2015/10/24 20:22:00

Alan

lspci -nn | tail -n 1
04:02.0 Serial controller [0700]: Device [1c00:2273] (rev 0f)

grep -i 1c00 /lib/modules/*/modules.alias | grep -i 2273
returns nothing.


Jim

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: trying to get a pci card w/ 2 serial ports working

Post by AlanBartlett » 2015/10/24 21:27:21

So a loadable driver (module) is not identified for the device. That is not necessarily a significant failing as, quite often, the serial drivers are configured to be built into the basic kernel image.

If there had been any output, it would have guided the direction upon which you would have needed to concentrate.

The only other suggestion that I currently have is to carefully review the contents of the kernel's ring buffer, the output of which is displayed by the dmesg command. Look at all the lines which reference PCI devices; which reference device IRQ settings, etc. Once possibility is that there is an interrupt request (IRQ) line conflict. Also consider the BIOS settings of your system.

Are there any user configurable jumpers or switches on the card? Does the manufacturer's documentation mention its default configuration? How it can be reconfigured?

I have a vague feeling that the kernel routinely "knows" about two serial ports by default -- whether the physical devices are or are not present. They would be devices numbered as 0 & 1. Any new devices would be numbered 2 and upwards -- even if there is no physical hardware present as devices 0 & 1.
Image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

hoodcanaljim
Posts: 312
Joined: 2006/02/05 17:49:10

Re: trying to get a pci card w/ 2 serial ports working

Post by hoodcanaljim » 2015/10/24 23:49:35

Alan

The BIOs showed a pci in slot 3 "pci serial". that is the 2/port serial card.
dmesg showed this
<snip>
[ 0.000000] Console: colour VGA+ 80x25
[ 0.000000] console [tty0] enabled
[ 0.000000] allocated 8388608 bytes of page_cgroup
<snip>
[ 0.908239] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.928810] 00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 0.929549] 0000:04:02.0: ttyS1 at I/O 0xdcf0 (irq = 18) is a XScale
[ 0.929680] 0000:04:02.0: ttyS2 at I/O 0xdcf8 (irq = 18) is a XScale
[ 0.930165] Non-volatile memory driver v1.3
<snip>
[ 0.954437] uhci_hcd 0000:00:1d.2: UHCI Host Controller
[ 0.954481] uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 7
[ 0.954488] uhci_hcd 0000:00:1d.2: detected 2 ports
[ 0.954515] uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000ff40
[ 0.954568] usb usb7: New USB device found, idVendor=1d6b, idProduct=0001
[ 0.954571] usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
cat /proc/interrupts
CPU0 CPU1
0: 250 0 IO-APIC-edge timer
1: 3 0 IO-APIC-edge i8042
3: 0 0 IO-APIC-edge serial
7: 0 0 IO-APIC-edge parport0
8: 1 0 IO-APIC-edge rtc0
9: 3 0 IO-APIC-fasteoi acpi
12: 4 0 IO-APIC-edge i8042
16: 0 0 IO-APIC-fasteoi uhci_hcd:usb3
17: 1422 0 IO-APIC-fasteoi uhci_hcd:usb4, uhci_hcd:usb6
18: 200012 0 IO-APIC-fasteoi uhci_hcd:usb7
20: 8358 6514 IO-APIC-fasteoi ata_piix, ata_piix, i801_smbus
<snip>
Thanks for you help
Jim

hoodcanaljim
Posts: 312
Joined: 2006/02/05 17:49:10

Re: trying to get a pci card w/ 2 serial ports working

Post by hoodcanaljim » 2015/10/25 16:51:25

Alan

Took a second look at the BIOS and under Onboard Devices --> Serial Port #1 it showed.
OFF <AUTO> COM1 COM3
OFF = is disabled
AUTO = BIOS selects between Com1 and Com3
COM1 = Port is configured at 3F8h irq 4
COM3 = Port is configured at 3E8h irq 4

Moved card over one slot and now it shows irq 16 in dmesg.
[ 0.930239] 0000:04:00.0: ttyS1 at I/O 0xdcf0 (irq = 16) is a XScale
[ 0.930370] 0000:04:00.0: ttyS2 at I/O 0xdcf8 (irq = 16) is a XScale

But again, while the lights on the tester show the same change when minicom is using ttyS1 as when using ttyS0, no file is transmitted by minicom thru ttyS1.

Only jumpers on the card are to set voltage on pins 1 and 9.

Is there any chance that purchasing a different manufacturers serial card would be improve this???

Thanks
Jim

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: trying to get a pci card w/ 2 serial ports working

Post by AlanBartlett » 2015/10/26 17:02:34

Sorry for the delay in my response, I was away for a day.

Quite honestly, I do not know. :(

It is a very long time since I last installed a multi-port serial card into a system . . . Thinking about it, it might have been into a computer running Unix System III, sometime in the early 1980s!

You seem to have performed all the experiments -- Moving the card to a different PCI slot, checking the IRQ lines that are being used, looking at the current BIOS configuration, etc.

Ideally you need somebody to post saying that they have a "multi-port serial controller card, manufactured by ???, installed and operational in their CentOS system".
Image 100% Linux and, previously, Unix. Co-founder of the ELRepo Project.

hoodcanaljim
Posts: 312
Joined: 2006/02/05 17:49:10

Re: trying to get a pci card w/ 2 serial ports working

Post by hoodcanaljim » 2015/10/26 23:36:40

Alan

Thanks again for your help. Its about time to find another way to solve my port problem. Either a USB or something else to get around this piece of Shingle card.
I'll use the card as a Frisbee and go on.

Jim

Post Reply