I bought a Conrad 6 port serial card,
thinking that any non intelligent card should be 'supported'. As it turns out,
the nmos 9835 is supported by a 2.4 kernel, but the 9845 isn't. What this means
is that the kernel won't automatically recognise the card (2.6 kernels recognise
9835, 9845 and 9855).
According to the documentation that comes with the card, Linux supports no more then four serial ports. According to '/usr/src/linux/Documentation/devices.txt' however, Linux supports 192 serial ports.
So what you need to do, is to configure it with setserial;
A 'lspci -vv' shows;
0000:00:0d.0 Serial controller: NetMos Technology PCI 9845 Multi-I/O Controller (rev 01) (prog-if 02 ) Subsystem: LSI Logic / Symbios Logic 0P6S (6 port 16550a serial card) Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Interrupt: pin A routed to IRQ 11 Region 0: I/O ports at c400 [size=8] Region 1: I/O ports at c800 [size=8] Region 2: I/O ports at cc00 [size=8] Region 3: I/O ports at d000 [size=8] Region 4: I/O ports at d400 [size=8] Region 5: I/O ports at d800 [size=16]
On a Brazilian website I found that it's a good idea to tell setserial that this card isn't a fourport;
/dev/ttyS4 uart 16550A port 0xc400 irq 11 spd_normal ^fourport ^skip_test /dev/ttyS5 uart 16550A port 0xc800 irq 11 spd_normal ^fourport ^skip_test /dev/ttyS6 uart 16550A port 0xcc00 irq 11 spd_normal ^fourport ^skip_test /dev/ttyS7 uart 16550A port 0xd000 irq 11 spd_normal ^fourport ^skip_test /dev/ttyS8 uart 16550A port 0xd400 irq 11 spd_normal ^fourport ^skip_test /dev/ttyS9 uart 16550A port 0xd800 irq 11 spd_normal ^fourport ^skip_test
Of course, if lspci gives you different values you enter those instead.
These ttySs probably don't exist in /dev/, so you need to create them with makedev. I chowned them all root:dialout mode 660;
0 crw-rw---- 1 root dialout 4, 68 Jan 28 18:35 /dev/ttyS4 0 crw-rw---- 1 root dialout 4, 69 Jan 29 16:23 /dev/ttyS5 0 crw-rw---- 1 root dialout 4, 70 Jan 28 18:45 /dev/ttyS6 0 crw-rw---- 1 root dialout 4, 71 Jan 29 15:36 /dev/ttyS7 0 crw-rw---- 1 root dialout 4, 72 Jan 29 15:39 /dev/ttyS8 0 crw-rw---- 1 root dialout 4, 73 Jan 29 15:39 /dev/ttyS9
The above applies to a classic /dev/ with a 2.4 kernel or lower. Apparently, with older 2.6 kernels the above table starts with ttyS14.
With nothing connected this card may consider the DCD input high. This confuses getty, which complains about 'respawning too fast'. Connecting something (even a cable with 232 tester will do) to the port will solve this problem
Initially I tested the card with getty and an old VT420 terminal. The /etc/inittab entries are below;
T4:23:respawn:/sbin/getty ttyS4 38400 vt420 T5:23:respawn:/sbin/getty ttyS5 38400 vt420 T6:23:respawn:/sbin/getty ttyS6 38400 vt420 T7:23:respawn:/sbin/getty ttyS7 38400 vt420 T8:23:respawn:/sbin/getty ttyS8 38400 vt420 T9:23:respawn:/sbin/getty ttyS9 38400 vt420
The above mentioned quirk however makes it necessary to run 'init q' after plugging the terminal into an other 232 port.
I also tested with a minicom Z-modem filetransfer at 115200 bps over a
null modem cable.
This works OK.
I then tested it with two 28k8 modems with the port speed at 115200 bps in order to check flow control. This also seems to work fine.
Folder : GD75232 - Multiple RS-232 Drivers And Receivers
GD75232 Data sheets and application notes.
With the more recent 2.6 kernels, things are a lot simpler. Look in your kernel config for the following strings;
The first is the maximum number of supported serial ports. If it is too small,
change it and recompile your kernel.
The second can be increased at boot time;
Edit /boot/grub/menu.lst to include the number of UARTS with '8250.nr_uarts='. EG;
# kopt=root=/dev/hda3 ro 8250.nr_uarts=8
On newer systems this is /etc/default/grub. EG;
Then run update-grub.
After reboot the new ttySs will be in /dev/;
0 crw-rw---- 1 root dialout 4, 64 2009-01-04 01:11 /dev/ttyS0 0 crw-rw---- 1 root dialout 4, 65 2009-01-04 01:11 /dev/ttyS1 0 crw-rw---- 1 root dialout 4, 66 2009-01-04 03:38 /dev/ttyS2 0 crw-rw---- 1 root dialout 4, 67 2009-01-04 01:32 /dev/ttyS3 0 crw-rw---- 1 root dialout 4, 68 2009-01-04 01:27 /dev/ttyS4 0 crw-rw---- 1 root dialout 4, 69 2009-01-04 01:28 /dev/ttyS5 0 crw-rw---- 1 root dialout 4, 70 2009-01-04 01:32 /dev/ttyS6 0 crw-rw---- 1 root dialout 4, 71 2009-01-04 01:32 /dev/ttyS7
If you still want to tweak things with setserial, you can find the info you need in /proc/tty/driver/serial
The boot process determines which RS232 port is connected to which tty. '/proc/tty/driver/serial' can be used to find out which is which. Just connect a modem to a port and switch it on. The tty with CTS and DSR high is the Port with the modem;
3: uart:16550A port:0000EF50 irq:17 tx:0 rx:0 CTS|DSR
In this case ttyS3.
Some motherboard / kernel / serial-card combinations have problems with long
sequences of zeros such as break, hold and framing errors: The serial port sort
of freezes and you need to restart the application using this serial port.
Use standard serial ports (the ones on the motherboard) when you expect long sequences of zeros.