?? dialup.html
字號:
</pre>to send the signal. If this is your first time setting up the system, you may want towait until your modem(s) are properly configured and connected before signaling <ttclass="COMMAND">init</tt>. <br /><br /><div class="SECT4"><h4 class="SECT4"><a id="AEN22620" name="AEN22620">17.4.4.2.1. Locked-speedConfig</a></h4><p>For a locked-speed configuration, your <tt class="FILENAME">ttys</tt> entry needs tohave a fixed-speed entry provided to <tt class="COMMAND">getty</tt>. For a modem whoseport speed is locked at 19.2 Kbps, the <tt class="FILENAME">ttys</tt> entry mightlook like this:</p><pre class="PROGRAMLISTING">ttyd0 "/usr/libexec/getty std.19200" dialup on</pre><p>If your modem is locked at a different data rate, substitute the appropriate value for<var class="LITERAL">std.<var class="REPLACEABLE">speed</var></var> instead of <varclass="LITERAL">std.19200</var>. Make sure that you use a valid type listed in <ttclass="FILENAME">/etc/gettytab</tt>.</p></div><div class="SECT4"><h4 class="SECT4"><a id="AEN22632" name="AEN22632">17.4.4.2.2. Matching-speedConfig</a></h4><p>In a matching-speed configuration, your <tt class="FILENAME">ttys</tt> entry needs toreference the appropriate beginning ``auto-baud'' (sic) entry in <ttclass="FILENAME">/etc/gettytab</tt>. For example, if you added the above suggested entryfor a matching-speed modem that starts at 19.2 Kbps (the <ttclass="FILENAME">gettytab</tt> entry containing the <var class="LITERAL">V19200</var>starting point), your <tt class="FILENAME">ttys</tt> entry might look like this:</p><pre class="PROGRAMLISTING">ttyd0 "/usr/libexec/getty V19200" dialup on</pre></div></div><div class="SECT3"><h3 class="SECT3"><a id="AEN22642" name="AEN22642">17.4.4.3. <ttclass="FILENAME">/etc/rc.serial</tt></a></h3><p>High-speed modems, like V.32, V.32bis, and V.34 modems, need to use hardware (<ttclass="FILENAME">RTS/CTS</tt>) flow control. You can add <tt class="COMMAND">stty</tt>commands to <tt class="FILENAME">/etc/rc.serial</tt> to set the hardware flow controlflag in the FreeBSD kernel for the modem ports.</p><p>For example to set the <var class="LITERAL">termios</var> flag <varclass="VARNAME">crtscts</var> on serial port #1's (<tt class="DEVICENAME">COM2</tt>)dial-in and dial-out initialization devices, the following lines could be added to <ttclass="FILENAME">/etc/rc.serial</tt>:</p><pre class="PROGRAMLISTING"># Serial port initial configurationstty -f /dev/ttyid1 crtsctsstty -f /dev/cuaia1 crtscts</pre></div></div><div class="SECT2"><h2 class="SECT2"><a id="AEN22659" name="AEN22659">17.4.5. Modem Settings</a></h2><p>If you have a modem whose parameters may be permanently set in non-volatile RAM, youwill need to use a terminal program (such as Telix under <spanclass="TRADEMARK">MS-DOS</span>® or <tt class="COMMAND">tip</tt> under FreeBSD) toset the parameters. Connect to the modem using the same communications speed as theinitial speed <tt class="COMMAND">getty</tt> will use and configure the modem'snon-volatile RAM to match these requirements:</p><ul><li><p><acronym class="ACRONYM">CD</acronym> asserted when connected</p></li><li><p><acronym class="ACRONYM">DTR</acronym> asserted for operation; dropping DTR hangs upline and resets modem</p></li><li><p><acronym class="ACRONYM">CTS</acronym> transmitted data flow control</p></li><li><p>Disable <acronym class="ACRONYM">XON/XOFF</acronym> flow control</p></li><li><p><acronym class="ACRONYM">RTS</acronym> received data flow control</p></li><li><p>Quiet mode (no result codes)</p></li><li><p>No command echo</p></li></ul><p>Please read the documentation for your modem to find out what commands and/or DIPswitch settings you need to give it.</p><p>For example, to set the above parameters on a <span class="TRADEMARK">U.S.Robotics</span>® <span class="TRADEMARK">Sportster</span>® 14,400 external modem,one could give these commands to the modem:</p><pre class="PROGRAMLISTING">ATZAT&C1&D2&H1&I0&R2&W</pre><p>You might also want to take this opportunity to adjust other settings in the modem,such as whether it will use V.42bis and/or MNP5 compression.</p><p>The <span class="TRADEMARK">U.S. Robotics</span> <spanclass="TRADEMARK">Sportster</span> 14,400 external modem also has some DIP switches thatneed to be set; for other modems, perhaps you can use these settings as an example:</p><ul><li><p>Switch 1: UP -- DTR Normal</p></li><li><p>Switch 2: N/A (Verbal Result Codes/Numeric Result Codes)</p></li><li><p>Switch 3: UP -- Suppress Result Codes</p></li><li><p>Switch 4: DOWN -- No echo, offline commands</p></li><li><p>Switch 5: UP -- Auto Answer</p></li><li><p>Switch 6: UP -- Carrier Detect Normal</p></li><li><p>Switch 7: UP -- Load NVRAM Defaults</p></li><li><p>Switch 8: N/A (Smart Mode/Dumb Mode)</p></li></ul><p>Result codes should be disabled/suppressed for dial-up modems to avoid problems thatcan occur if <tt class="COMMAND">getty</tt> mistakenly gives a <sampclass="PROMPT">login:</samp> prompt to a modem that is in command mode and the modemechoes the command or returns a result code. This sequence can result in a extended,silly conversation between <tt class="COMMAND">getty</tt> and the modem.</p><div class="SECT3"><h3 class="SECT3"><a id="AEN22715" name="AEN22715">17.4.5.1. Locked-speed Config</a></h3><p>For a locked-speed configuration, you will need to configure the modem to maintain aconstant modem-to-computer data rate independent of the communications rate. On a <spanclass="TRADEMARK">U.S. Robotics</span> <span class="TRADEMARK">Sportster</span> 14,400external modem, these commands will lock the modem-to-computer data rate at the speedused to issue the commands:</p><pre class="PROGRAMLISTING">ATZAT&B1&W</pre></div><div class="SECT3"><h3 class="SECT3"><a id="AEN22721" name="AEN22721">17.4.5.2. Matching-speedConfig</a></h3><p>For a variable-speed configuration, you will need to configure your modem to adjustits serial port data rate to match the incoming call rate. On a <spanclass="TRADEMARK">U.S. Robotics</span> <span class="TRADEMARK">Sportster</span> 14,400external modem, these commands will lock the modem's error-corrected data rate to thespeed used to issue the commands, but allow the serial port rate to vary fornon-error-corrected connections:</p><pre class="PROGRAMLISTING">ATZAT&B2&W</pre></div><div class="SECT3"><h3 class="SECT3"><a id="AEN22727" name="AEN22727">17.4.5.3. Checking the Modem'sConfiguration</a></h3><p>Most high-speed modems provide commands to view the modem's current operatingparameters in a somewhat human-readable fashion. On the <span class="TRADEMARK">U.S.Robotics</span> <span class="TRADEMARK">Sportster</span> 14,400 external modems, thecommand <tt class="COMMAND">ATI5</tt> displays the settings that are stored in thenon-volatile RAM. To see the true operating parameters of the modem (as influenced by themodem's DIP switch settings), use the commands <tt class="COMMAND">ATZ</tt> and then <ttclass="COMMAND">ATI4</tt>.</p><p>If you have a different brand of modem, check your modem's manual to see how todouble-check your modem's configuration parameters.</p></div></div><div class="SECT2"><h2 class="SECT2"><a id="AEN22736" name="AEN22736">17.4.6. Troubleshooting</a></h2><p>Here are a few steps you can follow to check out the dial-up modem on your system.</p><div class="SECT3"><h3 class="SECT3"><a id="AEN22739" name="AEN22739">17.4.6.1. Checking Out the FreeBSDSystem</a></h3><p>Hook up your modem to your FreeBSD system, boot the system, and, if your modem hasstatus indication lights, watch to see whether the modem's <acronymclass="ACRONYM">DTR</acronym> indicator lights when the <sampclass="PROMPT">login:</samp> prompt appears on the system's console -- if it lights up,that should mean that FreeBSD has started a <tt class="COMMAND">getty</tt> process on theappropriate communications port and is waiting for the modem to accept a call.</p><p>If the <acronym class="ACRONYM">DTR</acronym> indicator does not light, login to theFreeBSD system through the console and issue a <tt class="COMMAND">ps ax</tt> to see ifFreeBSD is trying to run a <tt class="COMMAND">getty</tt> process on the correct port.You should see lines like these among the processes displayed:</p><pre class="SCREEN"> 114 ?? I 0:00.10 /usr/libexec/getty V19200 ttyd0 115 ?? I 0:00.10 /usr/libexec/getty V19200 ttyd1</pre><p>If you see something different, like this:</p><pre class="SCREEN"> 114 d0 I 0:00.10 /usr/libexec/getty V19200 ttyd0</pre><p>and the modem has not accepted a call yet, this means that <ttclass="COMMAND">getty</tt> has completed its open on the communications port. This couldindicate a problem with the cabling or a mis-configured modem, because <ttclass="COMMAND">getty</tt> should not be able to open the communications port until<acronym class="ACRONYM">CD</acronym> (carrier detect) has been asserted by themodem.</p><p>If you do not see any <tt class="COMMAND">getty</tt> processes waiting to open thedesired <tt class="FILENAME">ttyd<var class="REPLACEABLE">N</var></tt> port, double-checkyour entries in <tt class="FILENAME">/etc/ttys</tt> to see if there are any mistakesthere. Also, check the log file <tt class="FILENAME">/var/log/messages</tt> to see ifthere are any log messages from <tt class="COMMAND">init</tt> or <ttclass="COMMAND">getty</tt> regarding any problems. If there are any messages,triple-check the configuration files <tt class="FILENAME">/etc/ttys</tt> and <ttclass="FILENAME">/etc/gettytab</tt>, as well as the appropriate device special files <ttclass="FILENAME">/dev/ttydN</tt>, for any mistakes, missing entries, or missing devicespecial files.</p></div><div class="SECT3"><h3 class="SECT3"><a id="AEN22767" name="AEN22767">17.4.6.2. Try Dialing In</a></h3><p>Try dialing into the system; be sure to use 8 bits, no parity, and 1 stop bit on theremote system. If you do not get a prompt right away, or get garbage, try pressing <spanclass="KEYCODE">Enter</span> about once per second. If you still do not see a <sampclass="PROMPT">login:</samp> prompt after a while, try sending a <ttclass="COMMAND">BREAK</tt>. If you are using a high-speed modem to do the dialing, trydialing again after locking the dialing modem's interface speed (via <ttclass="COMMAND">AT&B1</tt> on a <span class="TRADEMARK">U.S. Robotics</span> <spanclass="TRADEMARK">Sportster</span> modem, for example).</p><p>If you still cannot get a <samp class="PROMPT">login:</samp> prompt, check <ttclass="FILENAME">/etc/gettytab</tt> again and double-check that</p><ul><li><p>The initial capability name specified in <tt class="FILENAME">/etc/ttys</tt> for theline matches a name of a capability in <tt class="FILENAME">/etc/gettytab</tt></p></li><li><p>Each <var class="LITERAL">nx=</var> entry matches another <ttclass="FILENAME">gettytab</tt> capability name</p></li><li><p>Each <var class="LITERAL">tc=</var> entry matches another <ttclass="FILENAME">gettytab</tt> capability name</p></li></ul><p>If you dial but the modem on the FreeBSD system will not answer, make sure that themodem is configured to answer the phone when <acronym class="ACRONYM">DTR</acronym> isasserted. If the modem seems to be configured correctly, verify that the <acronymclass="ACRONYM">DTR</acronym> line is asserted by checking the modem's indicator lights(if it has any).</p><p>If you have gone over everything several times and it still does not work, take abreak and come back to it later. If it still does not work, perhaps you can send anelectronic mail message to the <ahref="http://lists.FreeBSD.org/mailman/listinfo/freebsd-questions" target="_top">FreeBSDgeneral questions 郵件列表</a> describing your modem and your problem, and the good folkson the list will try to help.</p></div></div></div><div class="NAVFOOTER"><hr align="LEFT" width="100%" /><table summary="Footer navigation table" width="100%" border="0" cellpadding="0"cellspacing="0"><tr><td width="33%" align="left" valign="top"><a href="term.html" accesskey="P">Prev</a></td><td width="34%" align="center" valign="top"><a href="index.html"accesskey="H">Home</a></td><td width="33%" align="right" valign="top"><a href="dialout.html"accesskey="N">Next</a></td></tr><tr><td width="33%" align="left" valign="top">Terminals</td><td width="34%" align="center" valign="top"><a href="serialcomms.html"accesskey="U">Up</a></td><td width="33%" align="right" valign="top">Dial-out Service</td></tr></table></div></body></html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -