Modems convert between digital serial signal from a computer and analog signal suitable for transmission over standard phone lines. There are generally three ways to configure a modem:
There are a wide variety of applications that make use of modems, such as SLIP, PPP, and UUCP. This section will not cover specific applications in depth , but rather give a broad understanding of connecting and configuring modems.
There are a multitude of modems on the market for a very large price range. Choosing one can often be a difficult undertaking. Generally, you get what you pay for. Cheap modems are often just that ... cheap. Money saved by buying a cheap modem, is often spent in the extra time it takes to get it working. One factor that increases price is the vendor. The more respected and established the modem vendor, the higher the price. However, these vendors have earned their reputations. Don't skimp!
One of the best ways to judge a modem is through experience. Ask colleagues about their experiences with different modems and vendors, how long it took them to get their modem running and how difficult a time they had. Testimonials from other people are a very good tool in choosing a modem.
Also, it is a good idea to check your system for compatibility. Many Unix vendors support specific modems for specific duties. Very often many other modems will work, but the vendor may not offer any support for those other modems. Look through the system's manuals for mention of supported modems, or contact the vendor directly.
When evaluating and purchasing a modem, there are four background areas to understand:
The modulation protocol determines the transmission rate, or speed, of the modem. When talking about transmission rates, it is important to be clear about the measurement of those rates. There are two terms that have long been incorrectly used interchangeably.
The baud rate of a modem is the measure of how many times per second a modem's signal changes. Because of limitations in standard phone lines, it is hard to get baud rates higher than 2,400. Most high speed modems run at 2,400 baud.
The bps rate of a modem is the measure of how many bits per second the modem transmits. Current modems can sometimes transmit up to 115,200 bits per second.
It is the bits per second that matter most when talking about modem speeds. Unfortunately, people (including vendors!) often incorrectly use the term baud instead of bps, saying for instance that their modem transmits at 28,800 baud, when they mean 28,800 bps. This confusion stems from the fact that older modem's baud rates and bps rates were the same: they encoded one bit per baud. However, today's modems encode more than one bit per baud, thus achieving bps rates greater than their baud rates. For example, a modem transmitting at 28,800 bps sends 12 bits per baud.
When purchasing a modem, buy the fastest one possible. Today's high speed modems rapidly become tomorrow's low speed modems. Also, look for a modem that can run at split speeds. The modem should be able to work at a fixed speed between the Unix system and the modem, but at a negotiated speed between modems, independent of the computer to modem speed.
Line noise can cause significant errors in modem connections. The high speeds of modern modems exacerbate this problem. While a moment of line noise at 300 bps can create several junk characters, that same moment of noise at 28,800 bps can fill the screen with garbage.
Error correction protocols combat the line noise problem by packetizing the data and providing checksums to help determine if the data has been corrupted in transmission. Several protocols have been developed, the two most popular being MNP-4 and CCITT V.42 LAP-M. Which error correction protocol a modem uses is typically determined by the data compression protocol used.
In the never ending quest to increase transmission rates, several data compression protocols have been developed for serial transmissions. Data compression protocols shrink the data that must be transmitted over a connection, thereby increasing the transmission rate. The two most popular data compression protocols for modems are MNP-5, with a maximum compression ratio of 2 to 1, and CCITT V.42bis, with a maximum compression rate of 4 to 1.
Note, however, that these data compression protocols only help with compressible data. It is possible to decrease the transmission rate using a data compression protocol with already compressed data. In general, though, a data compression protocol certainly helps more than it hinders.
Hardware flow control is a must for high-speed modems, and it is also useful for printers. The RTS and CTS pins are used to make sure that the receiving end of the connection has enough resources to process the data that is being sent to it.
For example, if you are talking to a remote site through a modem, and your connection from the modem to the remote site is slower than your connection from the local computer to the modem (as is often the case), it is likely that the modem will begin to run out of space in its buffer. RTS/CTS flow control allows the modem to tell the computer to stop talking while it sends its data over the slow link and its buffer drains.
Most terminals ignore RTS and CTS signals.
As with terminals, the first steps in setting up a modem are connecting it to a free serial port, with the appropriate cable, and determining the appropriate device file to access that port. Since a computer to modem connection is DTE (data terminal equipment) to DCE (data communications equipment), it requires a straight-through serial cable.
Again, the names of the device files vary from system to system. In addition, many systems use different device files when using a serial port connected to a modem, than when connected to a terminal. Using these different files enables certain properties for the port that are useful when using a modem. Although these files are named differently, it is not their names that make the difference, it is the their major and minor device numbers. Table 6 (a plain text version is also available) shows the different device files for use with modems.
System | Device files | Description |
---|---|---|
HP-UX | /dev/ttydXpN | X is the number representing the card instance and N is the number representing the port. Used for incoming connections, e.g. dialing in on a modem. |
/dev/culXpN | X is the number representing the card instance and N is the number representing the port. Used for outgoing connections, e.g. dialing out on a modem. | |
/dev/cuaXpN | X is the number representing the card instance and N is the number representing the port. Used for direct connections, e.g. when debugging a modem connection. | |
IRIX | /dev/ttymN | N is the number representing the port. Used for low speed modems. |
/dev/ttyfN | N is the number representing the port. Used for high speed modems, hardware flow control is enabled. | |
Linux | /dev/ttySN | The N is the number representing the port. Used for incoming connections, e.g. dialing in on a modem. |
/dev/cuaN | The N is the number representing the port. Used for outgoing connections, e.g. dialing out on a modem. | |
Solaris | /dev/term/A | A is the letter representing the port. Used for incoming connections, e.g. dialing in on a modem. |
/dev/cua/A | The A is the number representing the port. Used for outgoing connections, e.g. dialing out on a modem. |
The software configuration for a dial-in modem is much like that for configuring a hardwired terminal. Edit the /etc/inittab to create an entry which runs a getty process on the modem port to accept incoming connections.
Dial-out modem configuration usually deals with configuring files and using programs that are typically associated with UUCP. It may be necessary to install UUCP related software packages in order to set up a dial-out modem.
For operating system specific configuration information see the following essential pages:
Terms used: modem, SLIP, PPP, UUCP, baud rate, bps rate.