How to setup a modem with Linux

Recently, broadband internet has become so common that the use of modems has dropped dramatically. It has been many years since I had to configure a modem on a computer, let alone do so on Linux. However, modems do still have their uses. I bought a used 3COM 5610 PCI modem in order to be able to fax from Linux, and had to relearn how to configure a modem on Linux again. So, here is what I did.


There are two types of modems, true modems, and Winmodems. Winmodems do not have the hardware circuitry that true modems have, and hence rely on the computer's CPU doing all the work for them.

If you have a Winmodem, then it will most probably not work with Linux at all. There is no easy way to know which modems are Winmodems and which are not.

As a rule of thumb, all external serial modems should work with Linux. Internal modems can be either type.

The steps below detail what you need to do to get the modem configured with Linux. Once configured, you can use the modem to dial out, receive calls (dial-in), or as a fax.

Configuring the Modem

Getting the IRQ, I/O Port, and UART

There are several ways to determine these settings for the modem.

If your modem is an external serial modem, then you probably connected it to a serial port on the back of your computer. Just do a dmesg command and watch for something like this:

ttyS01 at 0x02f8 (irq = 3) is a 16550A

If your modem is a PCI internal modem, you can either use the lspci -v command or view the contents of the /proc/pci file to determine the settings of the modem. Note down the IRQ and I/O port settings, since you will need them in a later setup.

Determining the device name

If the modem is not connecting to one of the serial ports on the back of your computer, then it is best to assign it a device name beyond the first four names. I prefer using ttyS4 for a PCI modem. Check the /dev directory to see if the devices are already there or not. If not, then you can create it using the command:

cd /dev./MAKEDEV ttyS4

Also, create a symbolic link to the /dev/modem device, using the following command:

ln -sf /dev/ttyS4 /dev/modem

Using setserial

Now you need to tie the Linux device name to the settings you found in a previous step. This can be done using the setserial command:

setserial /dev/ttyS4 irq 11 port 0xc800 uart 16550

If you do not know the UART type, you can use the autoconfig parameter to setserial instead, for example:

setserial /dev/ttyS4 port 0xc800 skip_test auto_irq autoconfig

Testing the Modem

The easiest way to test the modem, is to use the minicom command. Run minicom, then enter the setup (Ctrl-A then Z then O) and use either /dev/modem or the correct /dev/ttyS? device. Save the configuration, then exit minicom and run it again. You should see some response from the modem (e.g. ATZ then OK).


Now the modem is configured correctly. You can now proceed to use it for dialing to the internet, or as a dial-in device, or as a fax server.


You can read more on this topic here:



modem in linux

the information given is very useful and is written very simply
thank you

Thanks a lot

very nice explanation and clear to understand. and also very useful, got my modem configured to use as dial-in & for fax...

Thanks a lot ....

Minhaj ...