Some days ago I exchanged my MOS9835 based I/O card with newer version based on MOS9845. Old one had one parallel port (which I never used) and two serial ports. New one do not have parallel port but has 6 serial ports instead. Why so much?
The answer is simple — more devices on desk require more ports. I could go into USB-serial adapters and buy bunch of them and create set of udev rules to make them stick with device node names. But I read too many stories when such adapters works when 2 of them are used but adding 3rd breaks config. So I bought PCI card.
Is it useful? Yes, it is. Does it add new problems? Few, but simple ones.
First problem is to get proper numbering of ports. As mainboard used in desktop has one serial port already I wanted it to be /dev/ttyS0 and additional ones to be /dev/ttyS[1-6]. But fun starts in kernel config…
There are few options which controls amount of serial ports in total (named
CONFIG_SERIAL_8250_NR_UARTS) and amount of runtime registered ports (named
CONFIG_SERIAL_8250_RUNTIME_UARTS). To get sane numbering I had to play with those values a bit. I set
NR_UARTS to “10” (just in case) and then
RUNTIME_UARTS to “7” so ports works like I wanted.
Next thing is guessing which port is which ttySx node. I did that by connecting devices and checking with “picocom” which one is which. Now connectors are signed with number on one side :D
Last thing was adding names to device nodes as it is easier to use /dev/ttyALIX then remember that Alix is connected to /dev/ttyS2 port. So currently I have this config:
|ttyS3||not used yet|
I use also serial cable with BUG but as it has female connector I use USB adapter with it. Have to buy female->male cable for it so it will use ttyS3…
This is how it looks on desktop side:
And one more thing — few readers suggested to use cards which adds 8 serial ports. I have to admit that I was thinking about it but decided against it. I already have lot of cables under desk and adding such hydra (card connector -> 8 cables with DB9 connector) would make it even harder to organize.
Next cables to organize would be network — each device on desk wants at least one Ethernet cable…