File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / mpd / doc / mpd43.html
Revision 1.1.1.4 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Mar 17 00:39:23 2021 UTC (3 years, 3 months ago) by misho
Branches: mpd, MAIN
CVS tags: v5_9p16, v5_9, HEAD
mpd 5.9

    1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    2: <HTML>
    3: <HEAD>
    4: <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    5: <TITLE>Modem type commands</TITLE>
    6: </HEAD>
    7: <BODY text="#000000" bgcolor="#ffffff">
    8: 
    9: <A HREF="mpd.html"><EM>Mpd 5.9 User Manual</EM></A>
   10:  <b>:</b> <A HREF="mpd42.html"><EM>Device Types</EM></A>
   11:  <b>:</b> <EM>Modem type commands</EM><BR>
   12: <b>Previous:</b> <A HREF="mpd42.html"><EM>Device Types</EM></A><BR>
   13: <b>Next:</b> <A HREF="mpd44.html"><EM>Netgraph device type commands</EM></A>
   14: 
   15: 
   16: <HR NOSHADE>
   17:   <H2><A NAME="43"></A>5.1. Modem type commands<A NAME="modem"></A></H2>
   18: <p>This chapter describes commands that are specific to modem type links.
   19: These commands apply to the currently active link, and are only
   20: valid if the currently active link has type <b>modem</b>.</p>
   21: <p>
   22: <dl>
   23: 
   24: <dt><b><code>set modem device <em>devname</em></code></b><dd><p>Modem links operate over serial ports. This command tells mpd
   25: which serial port to use for this link, and is required.
   26: The <code><em>devname</em></code> should be the pathname of a serial
   27: device, e.g., <code>/dev/cuau0</code>.</p>
   28: 
   29: <dt><b><code>set modem var <em>$variable</em> <em>string</em></code></b><dd><p>Pre-sets the chat script variable <code><em>$variable</em></code> to contain
   30: the string <code><em>string</em></code>. See 
   31: <A HREF="mpd50.html#chat">the chapter on chat scripting</A> for more information
   32: on chat variables.</p>
   33: 
   34: <dt><b><code>set modem speed <em>speed</em></code></b><dd><p>This commands sets the initial serial port speed when opening
   35: the serial device, e.g., 9600, 57600, 115200. Note that you can
   36: always change the serial port speed later from within the chat script.</p>
   37: 
   38: <dt><b><code>set modem script <em>connect-script</em></code></b><dd><p>This command tells mpd which chat script to run in order to initiate
   39: a PPP connection for this link. The <code><em>connect-script</em></code>
   40: should correspond to a label in <code>mpd.script</code>. Mpd will jump
   41: to this label after opening the serial port device. If
   42: <code><em>connect-script</em></code> is not set, then the chat phase
   43: of the connection is skipped (e.g., if you have a direct null modem
   44: connection).</p>
   45: 
   46: <dt><b><code>set modem idle-script <em>idle-script</em></code></b><dd><p>This command tells mpd what to do with the serial port when the link is
   47: not connected. If no <code><em>idle-script</em></code> is set, then mpd will
   48: leave the serial port closed when not connected. Otherwise, when the
   49: link is disconnected mpd runs the <code><em>idle-script</em></code> chat
   50: script. If this script returns <code>failure</code>, then mpd
   51: restarts the script.</p>
   52: <p>Otherwise, (i.e., if it returns <code>success</code>) mpd examines the
   53: contents of the <code>$IdleResult</code> chat variable to decide what to do
   54: next. If it equals
   55: <code>answer</code> then mpd will assume that an incoming call has been
   56: answered and immediately enter PPP negotiation. If it equals
   57: <code>ringback</code> then mpd will close the serial port, reopen it,
   58: and initiate an outgoing connection normally (i.e., using
   59: <code><em>connect-script</em></code>). </p>
   60: <p>If <code>$IdleResult</code> contains anything else or is not set, then
   61: mpd acts as if <code>failure</code> had occurred and simply restarts
   62: the script.</p>
   63: 
   64: <dt><b><code>set modem watch <em>+/-signal ...</em></code></b><dd><p>Mpd normally tracks the carrier detect signal on the serial port
   65: and drops the connection when this signal is lost. You can disable
   66: this behavior with <code><b>set modem watch -cd</b></code>. Also,
   67: mpd can do the same thing with the DSR signal, though the default
   68: is to ignore DSR. To enable watching of the DSR signal, use
   69: <code><b>set modem watch +dsr</b></code>.</p>
   70: 
   71: </dl>
   72: </p>
   73: 
   74: 
   75: 
   76:  <HR NOSHADE>
   77: <A HREF="mpd.html"><EM>Mpd 5.9 User Manual</EM></A>
   78:  <b>:</b> <A HREF="mpd42.html"><EM>Device Types</EM></A>
   79:  <b>:</b> <EM>Modem type commands</EM><BR>
   80: <b>Previous:</b> <A HREF="mpd42.html"><EM>Device Types</EM></A><BR>
   81: <b>Next:</b> <A HREF="mpd44.html"><EM>Netgraph device type commands</EM></A>
   82: 
   83: 
   84: 
   85: </BODY>
   86: </HTML>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>