There are the 4 serial devices corresponding to COM1 - COM4:
/dev/cua0, /dev/ttyS0 (COM1) address 0x3f8 IRQ 4
/dev/cua1, /dev/ttyS1 (COM2) address 0x2f8 IRQ 3
/dev/cua2, /dev/ttyS2 (COM3) address 0x3e8 IRQ 4
/dev/cua3, /dev/ttyS3 (COM4) address 0x2e8 IRQ 3
The /dev/ttyS
n devices are for dialin and
/dev/cua
n devices for dialout. n is the serial port
number. In this document, I refer to COM1 as ttyS0
, COM2
as ttyS1
, COM3 as ttyS2
, and COM4 as ttyS3
.
On some installations, two extra devices will be created,
/dev/modem
for your modem and /dev/mouse
for your
mouse. Both of these are symbolic links to the appropriate
/dev/cua
n device which you specified during the
installation
(unless you have a bus mouse, then /dev/mouse
will point to
the bus mouse device).
There has been some discussion on the merits of /dev/mouse
and
/dev/modem
. I prefer using the real device names, and not
the symbolic links. Use them if you like, but make sure they point to
the right device.
On the other hand, if you use the links, and they point to the correct
devices, using /dev/modem
may be simpler for some people. It's
really up to you what you use.
/dev
/dev/ttyS0 major 4, minor 64 /dev/cua0 major 5, minor 64
/dev/ttyS1 major 4, minor 65 /dev/cua1 major 5, minor 65
/dev/ttyS2 major 4, minor 66 /dev/cua2 major 5, minor 66
/dev/ttyS3 major 4, minor 67 /dev/cua3 major 5, minor 67
Note that all distributions come with these devices already made correctly.
/dev
If you don't have a device, you will have to create it with the
mknod
command.
Example, suppose you needed to create devices for ttyS0
:
linux# mknod /dev/cua0 c 5 64
linux# mknod /dev/ttyS0 c 4 64
You can also get the MAKEDEV
script, available on the usual
FTP sites. This simplifies the making of devices. For example,
if you needed to make the devices for ttyS0
you would
type:
linux# cd /dev
linux# MAKEDEV ttyS0
This handles the devices creation for the dialin and dialout devices.
The devices your multiport board uses depends on what kind of board
you have. These are listed in detail in the rc.serial
which
comes with the setserial
program. You will need to create
these devices for sure! Either use the mknod
command, or get the
MAKEDEV
script. Devices for mulitport boards are made by adding
64 + the port number. So, if you wanted to create devices for
ttyS17
, you would type:
linux# mknod /dev/cua17 c 5 81
linux# mknod /dev/ttyS17 c 4 81
Note that "64 + 17 = 81". Using the MAKEDEV
script, you would
type:
linux# cd /dev
linux# /dev/MAKEDEV ttyS17
Next Chapter, Previous Chapter
Table of contents of this chapter, General table of contents
Top of the document, Beginning of this Chapter