# \[Solved\] Startech PCI2S550 Serial Card?

**URL:** https://forum.maboxlinux.org/t/solved-startech-pci2s550-serial-card/1316
**Category:** Hardware and Drivers
**Created:** [April 13, 2023, 12:29pm UTC](https://forum.maboxlinux.org/t/solved-startech-pci2s550-serial-card/1316 "2023-04-13T12:29:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rdtsc](https://forum.maboxlinux.org/user_avatar/forum.maboxlinux.org/rdtsc/32/2168_2.png) [@rdtsc](https://forum.maboxlinux.org/u/rdtsc)
#### Post date: [April 13, 2023, 12:29pm UTC](https://forum.maboxlinux.org/t/solved-startech-pci2s550-serial-card/1316/1 "2023-04-13T12:29:41Z")

</div>

Good day!

On an [Asus Prime Z270-K](https://www.asus.com/us/motherboards-components/motherboards/prime/prime-z270-k/) mainboard, I’m having some trouble using a [Startech PCI2S550](https://www.startech.com/en-us/cards-adapters/pci2s550) dual serial port card. This is Mabox with 6.2.10-1 kernel. The card says it is compatible with many Windows and Linux 3.5.x to 4.11.x _LTS Versions only_.

The motherboard has an integrated `/dev/ttyS0`, and when this card is added, `/dev/ttyS4` and `/dev/ttyS5` appear. So the card seems to be recognized. I have not attempted to test ttyS0 as I do not have a header for it, but am about to manually try probing those pins.

To determine which serial ports are populated, this addition was made to ~/.bashrc:

```auto
alias lsserial="ls -l /sys/class/tty/*/device/driver | grep -v \"platform/drivers/serial8250\" | awk '{print \$9}' | awk -F'/' '{print \"/dev/\" \$5}'"

```

My username was added to `uucp` with `gpasswd -a username uucp` and the system rebooted.

There is an oscilloscope connected to serial pins 2 and 3 (transmit and receive) for monitoring. (I use serial quite often in an electronics repair environment.) `moserial` was installed for fast and easy testing. I select `/dev/ttyS4` or 5, open the port, enter a string of text to send, and absolutely nothing happens - zero bits seen on the oscilloscope. Sometimes, `moserial` freezes for 10-60 seconds, like it is having trouble accessing the card. Any ideas? What else can I try? Thank you.

---

<div class="post-metadata">

### Author: ![rdtsc](https://forum.maboxlinux.org/user_avatar/forum.maboxlinux.org/rdtsc/32/2168_2.png) [@rdtsc](https://forum.maboxlinux.org/u/rdtsc)
#### Post date: [April 13, 2023, 3:31pm UTC](https://forum.maboxlinux.org/t/solved-startech-pci2s550-serial-card/1316/2 "2023-04-13T15:31:39Z")

</div>

Oh, the issue was a missing driver.

Had seen “missing firmware for module XXXX” during `mkinitcpio` and ignored it… until I needed to use the serial port.

[https://wiki.archlinux.org/title/Mkinitcpio#Possibly\_missing\_firmware\_for\_module\_XXXX](https://wiki.archlinux.org/title/Mkinitcpio#Possibly_missing_firmware_for_module_XXXX)

Installing `mkinitcpio-firmware` from the AUR and rebooting allowed it to work.

---

<div class="post-metadata">

### Author: ![rdtsc](https://forum.maboxlinux.org/user_avatar/forum.maboxlinux.org/rdtsc/32/2168_2.png) [@rdtsc](https://forum.maboxlinux.org/u/rdtsc)
#### Post date: [April 20, 2023, 1:04pm UTC](https://forum.maboxlinux.org/t/solved-startech-pci2s550-serial-card/1316/3 "2023-04-20T13:04:35Z")

</div>

Addendum. The Startech driver download includes a Linux installation document. While small (four pages for serial and parallel cards), it did give a few interesting commands. Researching these returned a plethora of information. The following may be useful to know.

- We should have many serial ports already defined in Mabox (`ls -aG /dev/ttyS*`), even if they do not exist physically. However if one is missing, it can be created with GNU coreutils: `sudo mknod /dev/ttyS* c 4 6*` where `ttyS*` is the port number, `c` means to create an (unbuffered, character) file, `4` is the major type (I/O port), and `6*` is the minor type. Notice that above, `ttyS0` is minor type 64 (“/dev/ttyS0”), while minor type 65 would be (“/dev/ttyS1”) etc. A huge list of all the possible major and minor numbers can be found at the [Github Linux Kernel Devices List](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin-guide/devices.txt).

- To get the major/minor numbers of an existing device, you can `cat` the device data: `cat /sys/class/tty/ttyS0/uevent`. This should return:

```auto
MAJOR=4
MINOR=64
DEVNAME=ttyS0

```

- To configure this serial port card, first find its details from `lspci -v`:

```auto
04:01.0 Serial controller: MosChip Semiconductor Technology Ltd. PCI 9835 Multi-I/O Controller (rev 01) (prog-if 02 [16550])
	Subsystem: Broadcom / LSI 2S (16C550 UART)
	Flags: medium devsel, IRQ 19
	I/O ports at e050 [size=8]
	I/O ports at e040 [size=8]
	I/O ports at e030 [size=8]
	I/O ports at e020 [size=8]
	I/O ports at e010 [size=8]
	I/O ports at e000 [size=16]
	Kernel driver in use: serial
	Kernel modules: parport_serial

```

- For this particular dual-port card, in this particular PC, the two ports are addresses `e050` and `e040`. The MosChip is physically capable of 5 serial and 1 parallel ports, but only two serial are populated on this board. Lets say we wanted to set them up as `ttyS4` and `ttyS5` and have entries for these in /dev. To configure these, the `setserial` package is needed from the AUR, so install that. Then issue the following: `sudo setserial /dev/ttyS4 port e050 UART 16550A irq 19 Baud_base 115200` and `sudo setserial /dev/ttyS5 port e040 UART 16550A irq 19 Baud_base 115200`.

I tried this, but it would always respond with `Cannot set serial info: Device or resource busy`. But these were already configured by the `mkinitcpio-firmware` package. Had that not been installed, the above likely would have worked.
