April 26, 2019

New HOWTO: Modem-HOWTO - page 21

Table of Contents

  • April 12, 2001
  20.  Appendix B: Digital Modem Signal Processing (not done)

  21.  Appendix C: "baud" vs. "bps"

  21.1.  A simple example

  ``baud'' and ``bps'' are perhaps one of the most misused terms in the
  computing and telecommunications field.  Many people use these terms
  interchangeably, when in fact they are not!  bps is simply the number
  of bits transmitted per second.  The baud rate is a measure of how
  many times per second a signal changes (or could change).  For a
  typical serial port a 1-bit is -12 volts and a 0-bit is +12 v (volts).
  If the bps is 38,400 a sequence of 010101... would also be 38,400 baud
  since the voltage shifts back and forth from positive to negative to
  positive, etc. and there are 38,400 shifts per second.  For another
  sequence say 111000111... there will be fewer shifts of voltage since
  for three 1's in sequence the voltage just stays at -12 volts yet we
  say that its still 38,400 baud since there is a possibility that the
  number of changes per second will be that high.

  Looked at another way, put an imaginary tic mark separating each bit
  (even though the voltage may not change).  38,400 baud then means
  38,400 tic marks per second.  The tic marks at at the instants of
  permitted change and are actually marked by a synchronized clock
  signal generated in the hardware but not sent over the external cable.

  Suppose that a "change" may have more than the two possible outcomes
  of the previous example (of +- 12 v).  Suppose it has 4 possible
  outcomes, each represented by a unique voltage level.  Each level may
  represent a pair of bits (such as 01).  For example, -12v could be 00,
  -6v 01, +6v 10 and +12v 11.  Here the bit rate is double the baud
  rate.  For example, 3000 changes per second will generate 2 bits for
  each change resulting in 6000 bits per second (bps).  In other words
  3000 baud results in 6000 bps.

  21.2.  Real examples

  The above example is overly simple.  Real examples are more
  complicated but based on the same idea.  This explains how a modem
  running at 2400 baud, can send 14400 bps (or higher).  The modem
  achieves a bps rate greater than baud rate by encoding many bits in
  each signal change (or transition).  Thus, when 2 or more bits are
  encoded per baud, the bps rate exceeds the baud rate. If your modem-
  to-modem connection is at 14400 bps, it's going to be sending 6 bits
  per signal transition (or symbol) at 2400 baud.  A speed of 28800 bps
  is obtained by 3200 baud at 9 bits/baud.  When people misuse the word
  baud, they may mean the modem speed (such as 33.6k).

  Common modem bps rates were formerly  50, 75, 110, 300, 1200, 2400,
  9600.  These were also the bps rates over the serial_port-to-modem
  cables.  Today the bps modem-to-modem (maximum) rates are 14.4k,
  28.8k, 33.6k, and 56k, but the common rates over the serialPort-to-
  modem cables are not the same but are: 19.2k, 38.4k, 57.6k, 115.2k,
  230.4k.  The high speed of 230.4k is (as of late 2000) unfortunately
  not provided by most new (and old) hardware.  Using modems with
  V.42bis compression (max 4:1 compression), rates up to 115.2k bps are
  possible for 33.6k modems.  203.2k (4 x 53.3k) is possible for 56k

  Except for 56k modems, most modems run at 2400, 3000, or 3200 baud.
  Even the 56k modems use these bauds for transmission and sometimes
  fall back to them for reception.  Because of the bandwidth limitations
  on voice-grade phone lines, baud rates greater than 2400 are harder to
  achieve, and only work under conditions of good phone line quality.

  How did this confusion between bps and baud start?  Well, back when
  antique low speed modems were high speed modems, the bps rate actually
  did equal the baud rate.  One bit would be encoded per phase change.
  People would use bps and baud interchangeably, because they were the
  same number.  For example, a 300 bps modem also had a baud rate of
  300. This all changed when faster modems came around, and the bit rate
  exceeded the baud rate.  ``baud'' is named after Emile Baudot, the
  inventor of the asynchronous telegraph printer.  One way this problem
  gets resolved is to use the term "symbol rate" instead of "baud" and
  thus avoid using the term "baud".  However when talking about the
  "speeds" between the modem and the serial port (DTE speed) baud and
  the symbol rate are the same.  And even "speed" is a misnomer since we
  really mean flow rate.

  22.  Appendix D: Terminal Server Connection

  This section was adapted from Text-Terminal-HOWTO.

  A terminal server is something like an intelligent switch that can
  connect many modems (or terminals) to one or more computers.  It's not
  a mechanical switch so it may change the speeds and protocols of the
  streams of data that go thru it.  A number of companies make terminal
  servers: Xyplex, Cisco, 3Com, Computone, Livingston, etc.  There are
  many different types and capabilities.  Another HOWTO is needed to
  compare and describe them (including the possibility of creating your
  own terminal server with a Linux PC).  Most are used for modem
  connections rather than directly connected terminals.

  One use for them is to connect many modems (or terminals) to a high
  speed network which connects to host computers.  Of course the
  terminal server must have the computing power and software to run
  network protocols so it is in some ways like a computer.  The terminal
  server may interact with the user and ask what computer to connect to,
  etc. or it may connect without asking.  One may sometimes send jobs to
  a printer thru a terminal server.

  A PC today has enough computing power to act like a terminal server
  except that each serial port should have its own hardware interrupt.
  PC's only have a few spare interrupts for this purpose and since they
  are hard-wired you can't create more by software.  A solution is to
  use an advanced multiport serial card which has its own system of
  interrupts (or on lower cost models, shares one of the PC's interrupts
  between a number of ports).  See Serial-HOWTO for more info.  If such
  a PC runs Linux with getty running on many serial ports it might be
  thought of as a terminal server.  It is in effect a terminal server if
  it's linked to other PC's over a network and if its job is mainly to
  pass thru data and handle the serial port interrupts every 14 (or so)
  bytes.  Software called "radius" is sometimes used.

  Today real terminal servers serve more than just terminals.  They also
  serve PC's which emulate terminals, and are sometimes connected to a
  bank of modems connected to phone lines.  Some even include built-in
  modems.  If a terminal (or PC emulating one) is connected directly to
  a modem, the modem at the other end of the line could be connected to
  a terminal server.  In some cases the terminal server by default
  expects the callers to use PPP packets, something that real text
  terminals don't generate.

  23.  Appendix E:  Other Types of Modems

  This HOWTO currently only deals with the common type of modem used to
  connect PC's to ordinary analog telephone lines.  There are various
  other types of modems, including devices called modems that are not
  really modems.

  23.1.  Digital-to-Digital "Modems"

  The standard definition of a modem is sometimes broadened to include
  "digital" modems.  Today direct digital service is now being provided
  to many homes and offices so a computer there sends out digital
  signals directly (well almost) into the telephone lines.  But a device
  is still needed to convert the computer digital signal into the type
  allowed on telephone circuits and this device is sometimes called a
  modem.  This HOWTO doesn't cover such modems but some links to
  documents that do may be found at the start of this HOWTO.  The next 3
  sections: ISDN, DSL and 56k, concern digital-to-digital "modems".

  23.2.  ISDN "Modems"

  The "modem" is  really a Terminal Adapter (TA).  A Debian package
  "isdnutils" is available.  There is a ISDN Howto in German with an
  English translation:  .
  It's put out by the SuSE distribution of Linux and likely is about
  drivers available in that distribution.  There is an isdn4linux
  package and a newsgroup: de.alt.comm.isdn4linux.  Many of the postings
  are in German.  You might try using a search engine (such as DejaNews)
  to find "isdn4linux".

  23.3.  Digital Subscriber Line (DSL)

  DSL uses the existing twisted pair line from your home (etc.) to the
  local telephone office.  This can be used if your telephone line can
  accept higher speeds than an ordinary modem (say 56k) sends over it.
  It replaces the analog-to-digital converter at the local telephone
  office with a converter which can accept a much faster flow of data
  (in a different format of course).  The device which converts the
  digital signals from your computer to the signal used to represent
  digital data on the local telephone line is also called a modem.

  23.4.  56k Digital-Modems

  For any 56k modem to work as a 56k modem in your home or office the
  other end must be connected directly to the digital system of the
  telephone company.  Thus ISPs at the other end of the line must obtain
  special digital modems to provide customers with 56k service.  There's
  more to it than this since banks of many modems are multiplexed onto a
  high capacity telephone cable that transports a large number of phone
  calls simultaneously (such as a T1, E1, ISDN PRI, or better line).
  This requires a concentrator or "remote access server".  This has
  usually been done by stand-alone units (like PC's but they cost much
  more and have proprietary OSs).  Now there are some cards one may
  insert into a PC's PCI bus to do this.

  23.5.  Leased Line Modems

  These are analog and not digital modems.  These special modems are
  used on lines leased from the telephone company or sometimes on just a
  long direct wire hookup.  Ordinary modems for a telephone line will
  not normally work on such a line.  An ordinary telephone line has
  about 40-50 volts (know as the "battery) on it when not in use and the
  conventional modem uses this voltage for transmission.  Furthermore,
  the telephone company has special signals indicating a ring, line
  busy, etc.  Conventional modems expect and respond to these signals.
  Connecting two such modems by a long cable will not provide the
  telephone signals on the cable and thus the modems will not work.

  A common type of leased line used two pairs of wires (one for each
  direction) using V.29 modulation at 9600 baud.  Some brands of leased
  line modems are incompatible with other brands.

  24.  Appendix F: Fax pixels (dots)

  Here's some info on the bloated bandwidth required for standard fax
  including the dot density.  You can of course send a fax via your
  modem if you dial the real telephone number of the recipient.

       A4 paper:    216mm (horizontal) * 297mm (vertical)
       normal mode       8dots/mm      * 3.85dots/mm
       fine   mode                     * 7.7dots/mm
       extra fine mode                 *15.4dots/mm

  Each dot is either white or black and thus 1 bit.  One sheet of A4
  paper using fine mode is (216*8) * (297*7.7) = about 4 million dots.
  With a compression ratio of 8:1 it takes about 50 seconds at 9600bps
  for transmission.

  25.  Appendix G: Antique Modems

  This section is about modems with modem-to-modem speeds of 9600 bps or
  less.  Around 1980 many modems only had a speed of 300 bps (which was
  also 300 baud).  This is only 0.3kbps.  Modern modems are over 100
  times faster.  Many old-slow modems are still in use so they are not
  really "antique" quite yet.  This section compares the antique modems
  with the modern ones.  You should read it if you are interested in
  modem history or are intending to actually use an antique modem.

  25.1.  Autobauding

  25.1.1.  Various meanings

  This term has a few different meanings.  In general it means the
  automatic adjustment of modem-to-modem speed or modem-to-serial_port

  25.1.2.  Modem-to-modem speed

  Modern modems negotiate the modem-to-modem speed and protocol when
  they first connect to each other.  If one side can't negotiate, the
  other side should accept whatever speed and protocol that the antique
  modem has available.  Sometimes this is called "autobauding".  When
  both modems automatically lower their speed due to a noisy line it's
  called "fallback".  Thus users (or computer programs in your PC) don't
  need to deal with this (unless the S37 register has been set so as to
  disable autobauding).

  But many old modems didn't have such autobauding (although many had
  fallback).  If you have such a modem, it will likely work OK if the
  other modem you connect to is a modern one that can adjust it's speed
  and protocol to yours.  But a problem arises if both modems which want
  to communicate with each other are both antique and don't support
  autobauding.  How was this done?

  In olden days, a computer dial-in site might have a number of phone
  lines, each of which would have a specific speed modem on it.  For
  example, if you had a 1200 bps modem then you simply only dialed in to
  certain telephone numbers that supported that speed.  Once a site
  obtained modems that could support various speeds on the same modem
  and automatically detect the callers speed (do autobauding) then
  people could call in using modems that didn't do this autobauding
  (providing that their speed and protocol was supported).

  25.1.3.  Modem-to-serial_port speed

  When a modem modem is sent an init string (or a dial command), the
  modem detects the speed of the serial port and sets it's modem-to-
  serial_port speed to this value.  It does this by sensing the speed of
  the "AT" at the beginning of the string.

  Old modems couldn't do this and one would need to set the computer's
  serial port speed (with stty or the like) to the same exact value as
  the modem-to-modem speed (such as 1200 bps).  If the modem had a
  choice of speeds one could use the AT register S37 to select one.  But
  for dial-in when there was a choice of speeds (via autobauding), if a
  connection was made at say 2400 bps, then the modem-to-serial_port
  speed would change to 2400 bps.  Then one would need to start getty at
  2400 bps.  Thus getty needed to adjust to whatever speed was coming
  from the modem.  Today it's the other way around: the modem adjusts
  its modem-to-serial_port speed to whatever the serial port is using.

  In Linux, there's a problem if the speed is set to a speed not
  supported by Linux's serial port (for example 7200 bps).  You may dial
  out and connect at 7200 bps (both modem-to-modem and modem-to-
  serial_port speed) but you only see garbage since Linux doesn't
  support 7200 on the serial port.  Once you connect there is no simple
  way to hang up because even the +++ escape sequence can't be sent to
  the modem over a 7200 baud interface.

  To dial out by the antique method using a modern modem set &Q0 N0 and
  S17=5 (for 1200 bps).  Some of the S17 settings vary with the make of
  modem except that S17=0 is the default that connects the modern way at
  the highest speed supported.

  The original getty program configuration file /etc/gettydefs has an
  optional autobauding feature (see "next-label" in the manual) which
  will change the speed of the serial port.  The agetty program has a
  similar baud rate detection feature.  This was used to adjust the
  speed of the serial port to the modem-to-modem speed of an incoming
  dial-in call.

  Modern modems can use almost any serial port speed.  To do this they
  employ speed buffering and flow control.  Speed buffering means that
  modems have buffers so that there can be a difference between the
  modem-to-modem speed and the modem-to-serial_port speed.  If the flow
  entering the modem is faster than the flow exiting it, the excess flow
  is simply stored in a buffer in the modem.  Then to prevent the buffer
  from overflowing, the modem sends a flow control signal to stop the
  input flow to the modem.  This is true for either direction of flow.
  See ``Flow Control'' for more details.

  25.2.  Before AT Commands

  Hayes introduced the AT command set and other modem manufacturers
  adopted it as a standard.  Before the AT commands, many modems used
  dip switches to configure the modem.  Another command set is the CCITT
  V.25bis command set.  Some modems supported both CCITT and AT
  commands.  The CCITT V.25bis also specifies how Synchronous modem-to-
  serial_port communication is to take place using either the ASCII or
  8-bit EBCDIC character sets.

  25.3.  Data Compression and Error Correction

  MNP 2, 3, or 4 were used for error correction.  MNP 5 was compression.
  Modern modems generally use V42 (error correction) and V42bis
  (compression).  Many modems support both MNP and V42.

  25.4.  Obsolete CCITT (ITU) and Bell Protocols

  �  Bell 103   300 bps; frequency shift keying = FSK

  �  v.21       300 bps; frequency shift keying (used a different
     frequency than Bell 103)

  �  v.23      1200/75 bps and 600/75 bps asymmetric; 75 bps is the
     reverse channel; frequency shift keying
  �  Bell 212A 1200 bps; quadrature differential phase shift keying =

  �  v.22      1200 bps; fallback to 600 bps ; QDPSK = DPSK

  �  v.22bis   2400 bps; quadrature (QDPSK) amplitude modulation = QAM

  �  v.32      9600 bps; QAM

  �  v.32bis  14400 bps; QAM


Most Popular LinuxPlanet Stories