Set up a modem

From LQWiki
(Redirected from Set up modem)
Jump to navigation Jump to search

Configuring your modem can be very easy or very difficult, depending on the type of modem you have.

Modem types

Modems can be grouped by

  • PC <-> modem connection
    • via ethernet cable
    • via the computer's (internal) PCI bus
    • via serial connection
  • integration into the computer case
    • external, outside of the computer case
    • internal, installed inside of the computer
  • the amount of logic inside them
    • Hardware modems, which are well supported in Linux
    • Software modems, which have questionable support in Linux.
  • modem <-> ISP connection

Configuring your modem

Ethernet cable connected

If your modem is connected via ethernet cable to your computer, you have usually won. Plug in an ethernet cable to your modem, other end to your computer or into a network Switch. Now set a virtual IP for your computer, 192.168.0.2, and try to ping your modem on 192.168.0.1:

ping 192.168.0.1

If that does not work, set your IP to 192.168.1.2 and ping your modem:

ping 192.168.1.1

Then you know your modem's IP. Point your web browser to it and continue as instructed to configure the modem. You will need your ISP's user account data.

Connected to serial port or PCI bus

Hardware Modems

Hardware modems are often very easy to configure in Linux. They can be external or internal. External modems often use a pre-existing serial port to communicate with your computer. Internal hardware modems tend to have a serial controller built-in. This extra serial controller will appear after your other serial ports.

Serial ports in Linux are represented by device files. They usually have names like ttyS0, ttyS1, etc. These names may be confusing at first but if you're familiar with the DOS/Windows names for serial ports they correspond in an easy to remember way:

Com1 => /dev/ttyS0
Com2 => /dev/ttyS1
Com3 => /dev/ttyS2
Com4 => /dev/ttyS3

An internal modem might appear after your serial ports. For instance, if you had 4 serial ports, the internal modem might appear as a 5th, ttyS4. An external modem would be connected to one of the serial ports you already have.

If your distribution auto detected your modem there will usually be a link from whichever device the modem is on to a link file, /dev/modem. If your distribution doesn't set this up for you automatically you can look through your kernel log to find what device your modem is on. The command:

# dmesg |grep tty

is a good place to start looking. If you know what com port your device is set up to use then using the mapping above, in conjuction with the dmesg output, should be enough information to create your own link. Otherwise try the dialing application steps using a link of /dev/modem to each of the ports shown in the dmesg command until one works.

Software Modems (Winmodems)

Support for software modems in Linux is iffy. If you have a software modem, check to see if it is compatible with linux - see http://www.linmodems.org , or, if you have a PCI modem, then there is a useful database at http://www.pcidatabase.com

Download and install the relevant drivers according to their specific documentation. These drivers will usually create a serial device similar to a hardware modem. You can use the dmesg command explained in the hardware modem section to find out what device your new software modem is on and if needed create a /dev/modem link to it.

Setting Up a Dialing Application

Modems connected via PCI bus or serial connection need a dialing application to be set up. In case of UMTS modems this will typically be umtsmon. For the phone line, we have:

To get these programs to work, you basically only have to know three things, the username that your ISP gave you, your password, and the phone number to dial. A username would probably be something like 12345@yourisp.com.

Once you know those three things, the dialing application should take care of the rest.

ISP Specific Items

See also