Hardware manual
virtual terminal you may send something to ttyS2 (or whatever) by "echo test_message > /dev/ttyS2". Then go
back to the receive virtual terminal and look for the test_message. See Serial Electrical Test Equipment for
more info.
Connect a device to the connector
Another way to try to identify a serial port is to connect some physical serial device to it and see if it works.
But a problem here is that it might not work because it's not configured right. A serial mouse might get
detected at boot-time if connected.
You may put a device, such as a serial mouse (use 1200 baud), on a port and then use minicom or picocom to
communicate with that port. Then by clicking on the mouse, or otherwise sending characters with the device,
see if they get displayed. It not you may have told picocom the wrong port (such as ttyS0 instead of ttyS1) so
try again.
Missing connectors
If the software shows that you have more serial ports than you have connectors for (including an internal
modem which counts as a serial port) then you may have a serial port that has no connector. Some
motherboards come with a serial port with no cable or external serial DB connector. Someone may build a PC
from this and decide not to use this serial port. There may be a "serial" connector and label on the
motherboard but no ribbon cable connects to its pins. To use this port you must get a ribbon cable and
connector. I've seen different wiring arrangements for such ribbon cables so beware.
10.8 Creating Devices In the /dev directory
If you don't use devfs (which automatically creates such devices) and don't have a device "file" that you need,
you will have to create it. Use the mknod command or with the MAKEDEV shell script. Example, suppose
you needed to create ttyS0:
linux# mknod -m 666 /dev/ttyS0 c 4 64
The MAKEDEV script is easier to use. See the man page for it. For example, if you needed to make the
device for ttyS0 you would just type:
linux# MAKEDEV ttyS0
If the above command doesn't work (and you are the root user), look for the MAKEDEV script in the /dev
directory and run it.
This handles the devices creation and should set the correct permissions. For making multiport devices see
Making multiport devices in the /dev directory.
11. Interesting Programs You Should Know About
Most info on getty has been moved to Modem-HOWTO with a little info on the use of getty with directly
connected terminals now found in Text-Terminal-HOWTO.
Serial HOWTO
Send bytes to the port 40