Project

General

Profile

Actions

StarTech PEX16S952LP

The StarTech PEX16S952LP is a PCI-Express card with 16 RS-232 connectors using DB-9 cables. A CD is distributed, but it contains only some code for ancient Linux kernel. The card has support in the upstream kernel.

Enabling UARTs

The 8250 Kconfig in the Linux kernel sets the default number of UARTs to 4, with the following note:

Set this to the maximum number of serial ports you want the kernel to register at boot time. This can be overridden with the module parameter "nr_uarts", or boot-time parameter 8250.nr_uarts

Unknown why the kernel has a hard coded default, but it's how it is.

create /etc/default/grub/uarts.cfg with:

GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} nr.uarts=16" 

Make sure to choose the right amount of UARTs for the total number in the entire computer. So you need to calculate the number of the 8520's in the PCIe card + any internal 8250's in the PC. In the case Eloy's Fujitsu E900, this is 17 because there is one internal UART.

Then run:

su -
grub-update

The su - is important (at least in Debian), when using sudo -s or something similar the grub-update command does not work.

The numbers on the connectors are NOT the number in the Linux /dev/ttySx device file. It is recommended to label them. It is unknown on basis Linux assigns the device file number, but it seems to be consistent with reboots.

To run mgetty on all the serial interfaces, run the following command. It assumes that ttyS1 until ttyS15 is used, might be different for other hardware.

for i in {1..15}; do sudo systemctl enable --now mgetty@ttyS"$i"; done

Updated by eloy 20 days ago · 1 revisions

Add picture from clipboard (Maximum size: 48.8 MB)