April 25, 2019

New HOWTO: Modem-HOWTO - page 3

Table of Contents

  • April 12, 2001
  2.  Modems for a Linux PC

  2.1.  External vs. Internal

  A modem for a PC may be either internal or external.  The internal one
  is installed inside of your PC (you must remove screws, etc. to
  install it) and the external one just plugs into a serial port
  connector on a PC.  Internal modems are less expensive, are less
  likely to to suffer data loss due to buffer overrun, usually use less
  electricity, and use up no space on your desk.

  External modems are usually easier to install and usually require less
  configuration.  They have lights which may give you a clue as to what
  is happening and aid in troubleshooting.  The fact that the serial
  port and modem can be physically separated also aids in
  troubleshooting.  External modems are easy to move to another

  Unfortunately most external modems have no switch to turn off the
  power supply when not in use and thus are likely to consume a little
  electricity even when turned off (unless you unplug the power supply
  from the wall).  Each watt they draw costs you about $1/yr.  Another
  possible disadvantage of an external is that you will be forced to use
  an existing serial port which may not support a speed of over 115,200
  bps (although as of late 1998 and late 2000 most new internal modems
  don't either --but some do).  If a new internal modem had say a 16650
  UART it would put less load on the CPU.

  Internal modems present a special problem for Linux, but will work
  just as well as external modems provided you avoid the high percentage
  of them that will work only for MS Windows, and also provided that you
  spend time (sometimes a lot of time) to configure them correctly.
  Some of the modems which will work only under MS Windows are,
  unfortunately, not labeled as such.  If you buy a new one, make sure
  that you can return it for a refund if it will not work under Linux.

  While most new modems are plug-and-play you have various ways to deal
  with the PnP configuring:

  �  The serial driver does it all for you (more likely for a PCI modem)

  �  Use the "isapnp" program

  �  Let a PnP BIOS do the configuring

     Each of the above has shortcomings.  Isapnp documentation is
     difficult to understand although reading the Plug-and-Play-HOWTO
     (long) will aid in understanding it.  If you want the PnP BIOS to
     do the configuring, all you need to do is to make sure that it
     knows you don't have a PnP operating system.  But it may not do it
     correctly and you may need to find out what it's done see ``What is
     set in my serial port hardware?''.

  There are many Linux users that say that it's a lot simpler just to
  get an external modem and plug it in.  But since new peripherals are
  PnP today, you will sometime need to deal with it, so why delay the
  inevitable?  Still, the most expedient (and expensive) solution is an
  external modem (if you have a free serial port).

  2.2.  External Modems

  2.2.1.  PnP External Modems

  Many external modems are labeled "Plug and Play" (PnP) but they should
  all work fine as non-PnP modems.  While the serial port itself may
  need to be configured (IRQ number and IO address) unless the default
  configuration is OK an external modem uses no such IRQ/IO
  configuration.  You just plug the modem into the serial port.  Since
  you usually plug the modem into a serial port (and connect it to

  How can an external modem be called PnP since it can't be configured
  by PnP?   Well, it has a special PnP identification built into it that
  can be read (thru the serial port) by a PnP operating system.  Such an
  operating system would then know that you have a modem on a certain
  port and would also know the model number.  Then you might not need to
  configure application programs by telling them what port the modem is
  on (such as /dev/ttyS2 or COM3).  But since you don't have such a PnP
  operating system you will need to configure your application program
  manually by giving it the /dev id (such as /dev/ttyS2).

  2.2.2.  Cabling & Installation

  Connecting an external modem is simple compared to connecting most
  other devices to a serial port that require various types of "null
  modem" cables (which will not work for modems).  Modems use straight
  through cable, with no pins crossed over.  Most computer stores should
  have this.  Make sure you get the correct gender and number of pins.
  Hook up your modem to one of your serial ports.  If you are willing to
  accept the default IRQ and IO address of the port you connect it to,
  then you are ready to start your communication program and configure
  the modem itself.

  2.2.3.  What the Lights (LED's) Mean (for some modems)

  �  TM Test Modem

  �  AA Auto Answer (If on, your modem will answer an incoming call)

  �  RD Receive Data line = RxD

  �  SD Send Data line = TxD

  �  TR data Terminal Ready = DTR (set by your PC)

  �  RI Ring Indicator (If on, someone is "ringing" your modem)

  �  OH Off Hook (If off, your modem has hung up the phone line)

  �  MR Modem Ready = DSR ??

  �  EC Error Correction

  �  DC Data Compression

  �  HS High Speed (for this modem)

  2.3.  Internal Modems

  An internal modem is installed in a PC by taking off the cover of the
  PC and inserting the modem card into a vacant slot on the motherboard.
  There are modems for the ISA slots and others for the PCI slots.  Some
  new PC don't have any ISA slots.  While external modems plug into the
  serial port (via a short cable) the internal modems have the serial
  port built into the modem.  In other words, the modem card is both a
  serial port and a modem.

  Setting the IO address and IRQ for a serial port was formerly done by
  jumpers on the card.  These are little black rectangular "cubes" about
  5x4x2 mm in size which push in over pins on the card.  Plug-and-Play
  modems (actually the serial port part of the modems) don't use jumpers
  for setting these but instead are configured by sending configuration
  commands to them over the bus inside the computer.  Such configuration
  commands can be sent by a PnP BIOS, by the isapnp program (for the ISA
  bus only), or by newer serial device drivers for certain modems. Under
  Linux you have a choice of how to configure the ones that don't get
  io-irq configured by the serial driver.

  1. Use "isapnp" which may be run automatically at every boot-time

  2. Let a PnP BIOS do it, and then maybe tell setserial the IO and IRQ

  2.4.  Software-based Modems (winmodems)

  2.4.1.  Introduction software modems (winmodems)

  Software modems turn over some (or even almost all) of the work of the
  modem to the main processor (CPU) chip of your computer (such as a
  Pentium chip).  This requires special software (a modem driver) to do
  the job.  Until late 1999, such software was released only for MS
  Windows and wouldn't work with Linux.  Even worse was that the maker
  of the modem kept the interface to the modem secret so that no one
  could write a Linux driver for it (even though a few volunteers were
  willing to write Linux drivers).  With few exceptions, this is still
  true today (late 2000).  Also, there is no standard interface so that
  different brands/models of software-modems need different drivers
  (unless the different brands/models happen to use the same chipset

  A third name for a software modem (used by MS) is "driver-based
  modem".  The conventional hardware-based modem (that works with Linux)
  doesn't need a modem driver (but does use the Linux serial driver)
  After about mid-1998 most new internal modems were winmodems and would
  work only for MS Windows.

  2.4.2.  Linmodems

  Finally in late 1999 two software-based modems appeared that could
  work under Linux and were sometimes called "linmodems".  Lucent
  Technologies (LT) unofficially released a Linux binary-only code to
  support its PCI modems.  PC-TEL (includes "Zoltrix") introduced a new
  software-based modem for Linux.  There is a GPL'ed driver being
  developed for the Modem Silicon Operation MD563X HaM chipset (nee
  Ambient division of Cirrus Logic).  Will other companies follow these
  leads and thus create "linmodems"?  For a list of modems which
  work/don't_work under Linux see modem list
  .  Links to "linmodem"
  drivers may also be found there.  A project to get winmodems to work
  under Linux is at  .  They also have a mailing

  There is some effort underway at reverse-engineering with at least one
  report of a winmodem that has been made to work under Linux (but not
  yet with full functionality).  So by the time you read this there may
  be more linmodems.

  For details of how to get some winmodems to work under Linux see the
  Linmodem-HOWTO (and/or Winmodems-and-Linux-HOWTO which is not as well
  written).  If code is made available to operate a "winmodem" under
  Linux, then one may call it a "linmodem".  Is it still a "winmodem"?
  Well, it's still a software-based modem.  The term "Winmodem" is also
  a trademark for a certain model of "winmodem".

  2.4.3.  Software-based modem types

  There are two basic types of software modems.  In one type the
  software does almost all of the work.  The other is where the software
  only does the "control" operations (which is everything except
  processing the digital waveshapes --to be explained later).  Since the
  hardware doesn't do the control it's called a "controllerless" modem.
  The first type is an all-software modem (sometimes just called a
  software modem).

  For both of these types there must be analog hardware in the modem to
  generate an electrical waveshape to send out the phone line.  It's
  generated from a digital signal (which is sort of a "digital
  waveshape").  It's something like the digital electronics creates a
  lot of discrete points on graph paper and then the modem draws a
  smooth curve thru them.  There must also be hardware to convert the
  incoming waveshape to digital.  Then this digital waveshape must be
  converted to a data byte stream.  The modem can't just send this data
  byte stream to the PC but must first do decompression, error
  correction, and convert from serial to the parallel bus of the

  The difference between the two types of software-based modems is where
  these digital waveshapes are processed (generated and interpreted).
  In the all-software modem this waveshape processing is done in the CPU
  using a Host Signal Processor (HSP).  In the controllerless modem it's
  done in the modem but all other digital work is done by the CPU (data
  compression, AT-commands, etc.) For example the Rockwell HCF (Host
  Controlled Family) does this.  If the software that does these tasks
  could be ported to Linux and then there wouldn't be a major problem.

  2.4.4.  Is this modem a software modem?

  How do you determine if an internal modem will work under Linux?
  First see if the name, description of it, or even the name of the MS
  Windows driver for it indicates it's a software modem: HSP, HCF, HSF,
  controllerless, host-controlled, host-based, and soft-...  modem.  If
  it's one of these modem it will only work for the few cases (so far)
  where a Linux driver is available.

  If you don't know the model of the modem and you also have Windows on
  your Linux PC, click on the "Modem" icon in the "Control Panel".  Then
  check out the modem list (see ``Web Sites''.  If the above doesn't
  work (or isn't feasible), you can look at the package it came in (or a
  manual) find the section on the package that says something like
  "Minimum System Requirements" or just "System Requirements".  It may
  be in fine print.  Read it closely.

  If it requires a Pentium CPU, then almost all of it's work is done by
  software and it's not likely to work under Linux.  If it requires a
  486 CPU (or better) then it's likely a host-controlled modem that will
  work only if there exists a Linux driver for it.  Saying that it only
  works with Windows is also bad news.

  Otherwise, it may work under Linux if it fails to state explicitly
  that you must have Windows.  By saying it's "designed for Windows" it
  may only mean that it fully supports Microsoft's plug-and-play which
  is OK since Linux uses the same plug-and-play specs (but it's harder
  to configure under Linux).  Being "designed for Windows" thus gives no
  clue as to whether or not it will work under Linux.  You might check
  the Website of the manufacturer or inquire via email.  Some
  manufacturers are specifically stating that certain models work under

  2.4.5.  Should I get a software modem?

  Only if you know there is a Linux driver for it that works OK.
  Besides the problems of getting a driver, what are the pros and cons
  of software modems?  Since the software modem uses the CPU to do much
  of its work, the software modem requires less on-board electronics and
  thus costs less.  At the same time, the CPU is heavily loaded by the
  modem which may result in slower operation.  This is especially true
  if other CPU-intensive tasks are running at the same time the modem is
  being used.  Of course when you're not using the software modem there
  is no degradation in performance at all.

  Is the cost savings worth it?  In some cases yes, especially if you
  seldom use the modem and/or are not running any other CPU intensive
  tasks when the modem is in use.  Thus there are cases where use of a
  software modem is economically justified.  The savings in modem cost
  could be used for a better CPU which would speed things up a little.
  But the on-board electronics of a modem can do the job more
  efficiently than a general purpose CPU (except that it's not efficient
  when it's not in use).  So if you use the modem a lot it's probably
  better to avoid software modems (and then you can use a less powerful
  CPU :-).

  2.5.  PCI Modems

  A PCI modem card is one which inserts into a PCI-bus slot on the
  motherboard of a PC.  While most PCI winmodems will not work under
  Linux (no driver available) other PCI modems mostly work under Linux.
  The Linux serial driver is being modified to support certain PCI modem
  cards (but not winmodems).  If the Linux serial driver supports it
  then the driver will set up the PnP configuration for you.  See ``PCI
  Bus Support Underway'' If no special support is in the Linux serial
  driver but it may still work OK but you have to do some work to
  configure it.

  2.6.  Which Internal Modems might not work with Linux

  �  ``Software-based Modems (winmodems)'' only work in rare cases where
     a Linux driver is available.

  �  ``MWave and DSP Modems'' might work, but only if you first start
     Windows/Dos each time you power on your PC

  �  Modems with ``RPI (Rockwell)'' drivers work but with reduced

  2.6.1.  MWave and DSP Modems

  Such modems use DSP's (Digital Signal Processors) which are programmed
  by driver which must be downloaded from the hard disk to the DSP's
  memory just before using the modem.  Unfortunately, such downloading
  is normally done by Dos/Windows programs (which doesn't work for
  Linux).  But there has been substantial success in getting some of
  these modems to work with Linux.  For example, there is a Linux driver
  available to run a Lucent (DSP) modem.

  Ordinary modems that work fine with Linux (without needing a driver
  for the modem) often have a DSP too (and may mention this on the
  packaging), but the program that runs the DSP is stored inside the
  modem.  This is not a "DSP modem" in the sense of this section.  An
  example of a DSP modem is IBM's Aptiva MWAVE.

  If a DSP modem modem simulates a serial port, then it may be usable
  with Linux provided you're willing/able to boot from DOS.  You must
  have Dos/Windows on the same PC.   You first install the driver under
  DOS (using DOS and not Window drivers).  Then start Dos/Windows and
  start the driver for the modem so as to program the DSP.  Then without
  turning off the computer, go into Linux.

  One may write a "batch" file (actually a script) to do this.  Here is
  an example but you must modify it to suit your situation.

       rem mwave is a batch file supplied by the modem maker
       call c:\mww\dll\mwave start
       rem loadlin.exe is a DOS program that will boot Linux from DOS (See
       rem Config-HOWTO).
       c:\linux\loadlin f:\vmlinuz root=/dev/hda3 ro

  One may create an icon for the Window's desktop which points to such a
  batch file and set the icon properties to "Run in MSDOS Mode".  Then
  by clicking on this icon one sets up the modem and goes to Linux.
  Another possible way to boot Linux from DOS is to press CTRL-ALT-DEL
  and tell it to reboot (assuming that you have set things up so that
  you can boot directly into Linux).  The modem remains on the same com
  port (same IO address) that it used under DOS.

  The Newcom ifx modem needs a small kernel patch to work correctly
  since its simulation of a serial port is non-standard.  The patch and
  other info for using this modem with Linux is at

  2.6.2.  Rockwell (RPI) Drivers

  Some older Rockwell chips need Rockwell RPI (Rockwell Protocol
  Interface) drivers.  They can still be used with Linux even though the
  driver software works only under MS Windows.  This is because the MS
  Windows software which you don't have does only compression and error
  correction.  If you are willing to operate the modem without
  compression and error correction then it's feasible to use it with
  Linux.  To do this you will need to disable RPI by sending the modem
  (via the initialization string) a "RPI disable" command each time you
  power on your modem.  On my modem this command was +H0.  Not having
  data compression available makes it slower to get webpages but is just
  as fast when downloading files that are already compressed.


Most Popular LinuxPlanet Stories