One of the first things people want to do after they get Linux installed is to get on the Internet. Getting on the Internet requires a working modem. Getting a modem operating under Linux can be a bit complicated. The proplem arises from the fact that almost all modems manufactured today are "winmodems", designed to work only with the Windows operating system.
A winmodem is a software modem. Even though you can pay a lot for a winmodem, they are cheap to manufacture because they use very little electronics. The functions that should be performed in hardware are emulated by software. This places an extra processing burden on your computer's CPU.
To operate, a winmodem requires a piece of software called a "driver". Since over 90 percent of desktop computers run the Windows operating system, modem manufacturers don't feel it's worthwhile to develop a Linux driver for their modems. The Linux community has developed Linux modem drivers for many winmodems, but there are some modem manufactures that won't release the details about their modems so drivers can be developed.
Winmodems will not work with Linux unless you can locate a special "Linmodem" driver. The best source of information about Linux modem drivers is Linux Winmodem Support
A hardware modem contains its own on-board controller and DSP circuits. This takes a major processing load off your computer's CPU. Most hardware modems will work with Linux but can be difficult to find and are more expensive than winmodems. But it may be worthwhile to acquire a hardware modem because even with Windows a hardware modem will make your dial-up connection work faster.
A third type of modem is an external modem. An external modem connects to your computer's USB or serial port. External modems have their own controller and DSP circuits. An external modem is the best choice if you have several computers because the modem can be moved to a different computer without opening the computer's case.
Note: The serial port is a legacy port. USB was designed in part to replace the serial port, but even the newest computers still have a serial port because it's cheap to provide and, by lengthening the features list, it makes a computer easier to sell, so I don't expect the serial port to disappear any time soon.
Use the proper serial cable to install an external modem to your PC. Use a straight-through serial cable with DB9 connectors with the proper gender. Older computers used a DB25 connector. You can get any configuration of DB9/DB25 and gender converter. Connect the modem's line port to the phone line. Connect the power supply to the power connector of the modem.
In order to configure your modem, you'll need to be familiar with use of the Terminal window. To open a Terminal window, in Linux main menu select System Tools | Terminal. When you open a Terminal window it runs the default "Shell". A "shell" is a "command interpreter". You type in commands, press Enter, and Linux carries out the command. The default Fedora shell is "Bash".
Check if Linux has detected your modem
Login to Linux as root and open a terminal window. When you open a terminal window, it presents a "prompt", similar to [root@Localhost ~]#. After the prompt, type the following command:
[root@Localhost ~]# dmesg | grep ttyS
- The dmesg command asks the Linux kernel to show the devices it has found. This command line ports the dmesg command output through the grep command, which searches for the character string "ttys".
When you press the enter key, you should see a message similar to that shown below.
ttyS0 at I/O 0x03f8 (irq = 4) is a 16550A
This indicates that Linux has detected the serial port ttyS0.
A PC has four serial ports called COM 1 through COM 4 (in DOS) that share two IRQ's (3 and 4). On most computers, only COM 1 is brought out through a connector on the back of the computer. In Linux, the serial ports are called ttyS0 through ttyS3.
Create a Symbolic Link to the Serial Port
Most modem using software looks in the /dev directory for a link named "modem" which points to the modem. Login as root and open the file /etc/rc.d/rc.Local.
In Fedora 3, right-click on the file name. In the popup menu that appears select "Open with Emacs Text Editor".
Enter the line shown below (substituting "ttyS0" for the proper serial port) at the bottom of the file.
ln -s /dev/ttyS0 /dev/modem
The file /etc/rc.d/rc.Local is executed when Linux starts and this line creates a symbolic link to the serial port driver. Reboot the computer and check the folder /dev for a file named "modem"
Check the Modem with Minicom
Minicom is a serial communications program that comes with Fedora. To run minicom, login as root, open a terminal window, and type "minicom" as shown below.
[root@Localhost ~]# minicom
Minicom should respond with a message similar to the one shown below.
At S7=45 S0=0 L1 V1 X4 &c1E100
• If minicom responds with an error message, you have some troubleshooting to perform. Start with the basics. Make sure your modem is connected properly. If it's an external modem, check the power light. Verify that the file "modem" exists in the /dev directory.
Hayes Microcomputer Products was one of the first manufacturers of modems, and they defined a standard set of commands, called the AT command set, for controlling modems. Virtually all modems manufactured today are Hayes-compatible. You can use Minicom to debug the modem by entering AT commands. For example, you can enter ATDT along with a phone number to see if the modem can dial.
To exit Minicom press Ctrl+A then X.
Set up a Dial-Up Connection to the Internet
The Internet uses a protocol called TCP/IP. A modem connects to the Internet by packaging the TCP/IP data packets inside Point-to-Point Protocol (PPP) packets.
When you signed up with your Internet Service Provider, they provided you the information you needed to configure your dial-Up connection. Before attempting to configure a dial-Up connection, locate the following information.
• The phone number to dial
• Your username
• Your password
• Your IP address (if any)
• IP addresses of the ISP's Domain Name Servers (DNS) (if provided)
1. Log in as root. In the main menu select, Applications | System Tools | Internet Configuration Wizard to open the Internet Configuration Wizard.
2. In the Add new Device Type dialog box, in the Device Type list, click on Modem Connection, then click on the Forward button.
• If you receive the warning message "No modem was found", you have some troubleshooting to perform, as described previously.
3. on the Select Provider page, enter the phone number, ISP name, username, and password. Note: The ISP name is a just a way to identify the connection, so you can give it any name you like. Click on the Forward button.
4. On the IP Settings page, unless your ISP gave you a specific static IP address, leave the default Automatically obtain IP address settings setting. click on the Forward button.
7. On the Create Dial-up Connection page, click on the Apply button. The Network Configuration dialog box will appear. Highlight Modem connection line and click on Activate button. A dialog box will appear asking if you want to save the changes, click on the Yes button. A dialog box will appear asking if you want to restart the computer. Click on the OK button.
Browse the Web Over Dial-Up
To start a dial-up connection, select Applications | System Tools | Network Device Control to open the Network Device Control application. In "Network Device Control", highlight the PPP connection and click on the "Activate" button. Wait while modem dials in.
Then Open FireFox web browser and enter a Web address.
When finished browsing, close FireFox, open the Network Device Control application and click on the Deactivate button.
More Windows Administration Information:
• 12 Essential Linux Commands for Beginners
• Linux Memory User Space
• How to Use the VIM Text Editor in Linux
• Levels and Layers of Abstraction in a Linux System
• Bootloaders In Linux
• What is a Linux Distribution
• Linux Server Step-by-Step Configuration Guide
• How to Detect and Guard against Linux Security Vulnerabilities
• View Your Linux Server's Network Connections With Netstat
• How to Dual Boot Windows XP and Ubuntu 8