Project

General

Profile

StarTech PEX16S952LP » History » Version 1

eloy, 07/28/2024 03:40 PM

1 1 eloy
h1. StarTech PEX16S952LP
2
3
The "StarTech PEX16S952LP":https://web.archive.org/web/20240219124205/https://cdn.cnetcontent.com/syndication/mediaserver/inlinecontent/stech/683/473/683473204caf40629ddc342ca128d7c5/original.pdf 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.
4
5
h2. Enabling UARTs
6
7
The "8250 Kconfig":https://elixir.bootlin.com/linux/v6.7.5/source/drivers/tty/serial/8250/Kconfig#L199 in the Linux kernel sets the default number of UARTs to 4, with the following note:
8
9
> 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
10
11
Unknown why the kernel has a hard coded default, but it's how it is.
12
13
create @/etc/default/grub/uarts.cfg@ with:
14
<pre>
15
GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT} nr.uarts=16"
16
</pre>
17
18
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.
19
20
Then run:
21
<pre>
22
su -
23
grub-update
24
</pre>
25
The @su -@ is important (at least in Debian), when using @sudo -s@ or something similar the @grub-update@ command does not work.
26
27
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.
28
29
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.
30
31
<pre>
32
for i in {1..15}; do sudo systemctl enable --now mgetty@ttyS"$i"; done
33
</pre>
Add picture from clipboard (Maximum size: 48.8 MB)