RS-232 serial port devices are accessed using the /dev/ttySn device files, where n is a number from 0 up. Prior to the 2.2.x kernels, these devices could also be accessed using the /dev/cuan devices. These devices were the callout devices, which were used for dialing out with modems. The /dev/ttySn devices, by contrast, were used for incoming connections, such as links to "dumb terminals."
The / dev/ttySn and /dev/cuan devices both linked to the serial hardware, but the way they did so was subtly different. The existence of two access methods also posed problems in terms of controlling access to the serial hardware, because a program might not be able to tell that a device was already in use. Therefore, the /dev/cuan devices fell into disfavor, and it's recommended that you not use them. Support for /dev/cuan devices might be removed from the kernel in the future.
USB ports are handled in an entirely different way from RS-232 ports. RS-232 is intended as a one-to-one communications link—it connects one computer to one other device. If you have two RS-232 devices, you need two RS-232 ports on the computer to control both devices. USB, on the other hand, is a one-to-many bus. You can connect several USB devices to a single USB port. (You do need a USB hub to multiply the physical connectors to enable this type of connection, though.) As such, a single device file is inadequate to handle all USB devices. After all, if you've connected, say, a digital camera, a modem, and a mouse to your computer via USB, you need some way to uniquely identify each device. For this reason, Linux's USB support provides separate device files for each device. I describe the appropriate files for each USB device type in the appropriate chapters of this book.
You can often connect more than one device to a parallel or RS-232 serial port by using a switch box. This box enables you to safely and quickly direct the port's traffic to and from one of two or more devices by pushing a button or turning a dial. Some switches can work the other way; you can use them to connect one printer to two or more computers. Today, this latter task is generally handled by networking the computers and enabling printer-sharing protocols, but a switch box can still sometimes be a useful tool.
USB support is a very recent addition to the Linux kernel. Only in the 2.2.x kernel series was USB support officially added, and it's still very primitive even late in the 2.2.x kernel series. The 2.3.x development kernels include much more extensive USB support, as described later in this chapter.
Was this article helpful?
Read how to maintain and repair any desktop and laptop computer. This Ebook has articles with photos and videos that show detailed step by step pc repair and maintenance procedures. There are many links to online videos that explain how you can build, maintain, speed up, clean, and repair your computer yourself. Put the money that you were going to pay the PC Tech in your own pocket.