make webinterface translatable. there are around 20 short strings, all with context...
[kdenetwork.git] / doc / kppp / tricks.docbook
blobc2abc3bf30b5f9e4355eeb50821782002ac1cc6e
1 <chapter id="modem-tricks">
2 <title>Modem Tricks and Hints</title>
4 <para>This section should get the fearful started on the (not so) arcane art of
5 modem tweaking. The commands here are all Hayes AT standard, but all modems are
6 not equal, so your mileage may vary.</para>
8 <sect1 id="modem-sessions">
9 <title>Modem Sessions</title>
11 <para>A Modem session allows you to interact with the modem directly. You type
12 commands, and it will respond. To obtain a modem session, when no connection is
13 active, go into <guibutton>Setup</guibutton>, then <guilabel>Modem</guilabel>
14 <guibutton>Terminal</guibutton> dialog. This will open a window for interactive
15 configuration of the modem. Try typing
16 <userinput><command>ATZ</command></userinput> (which resets your modem) Your
17 should get an OK response. Use
18 <menuchoice><guimenu>File</guimenu><guimenuitem>Close</guimenuitem></menuchoice>
19 to end the session.</para>
21 </sect1>
23 <sect1 id="modem-profiles">
24 <title>Modem Profiles</title>
25                                         
26 <para>One reason you might want to send the modem commands directly is if you
27 have a set of modem configurations you want to keep, and not have to specify for
28 every connection. A good way to do that is via modem profiles. Modems can have
29 several stored profiles numbered 0,1,... <command>AT&amp;V</command> can be used to
30 view them all. The default profile is usually 0 (this can be changed via
31 <command>AT&amp;Y</command>.) The profile currently in use is called the
32 <quote>active</quote> profile.</para>
34 <para>When you change a setting, the active profile is modified. The
35 <command>ATZ</command> command will have the modem load the default profile,
36 erasing any changes you have made. To save changes, Load the profile you want to
37 change via <command>ATZ<replaceable>n</replaceable></command> (where
38 <replaceable>n</replaceable> is the profile number). Make the changes you want,
39 then save it with <command>AT&amp;W<replaceable>n</replaceable></command>. To
40 have kppp use the profile you want, change the modem initialization string
41 (<guibutton>Setup</guibutton> <guilabel>Modem</guilabel> <guibutton>Modem
42 Commands</guibutton> <guilabel>Initialization String</guilabel>.) For example
43 <command>ATZ1</command> will have the kppp reset the modem and use stored
44 profile #1.</para>
46 <para>If you want reset you modem to get back to some known starting point, use
47 <command>AT&amp;F&amp;W</command> to set the active profile to the factory
48 defaults, and store those settings as the default profile.</para>
50 <para>Examples of profile changes are in the next section</para>
52 </sect1>
54 <sect1 id="modem-hangup">
55 <title>Getting the modem to hang up</title>
57 <para>Sometimes you may find that &kppp; has difficulties hanging up the modem.
58 This is likely the result of a mismatch between &kppp; settings and those of the
59 modem.  A standard modem uses two methods to decide to hangup: <link
60 linkend="hangup-command-method">Command</link>, and <link
61 linkend="hangup-dtr-method"><acronym>DTR</acronym></link>.  The Command method involves
62 sending an escape sequence to the modem, which puts it in command mode, then
63 issuing the hangup command (<command>ATH</command>).</para>
65 <para>Outside of &kppp;, when configuring the <application>pppd</application>
66 package manually, it's often helpful to use the command method, so that one can
67 exit a terminal session, and then start <application>pppd</application> without
68 having the modem hangup.  In most other situations, the <acronym>DTR</acronym>
69 method is preferred, as it is simpler.</para>
71 <sect2 id="hangup-dtr-method">
72 <title><acronym>DTR</acronym> (<command>AT&amp;Dn</command>) method</title>
74 <para>The <acronym>DTR</acronym> method will have the modem hangup whenever
75 &kppp; stops using the modem.  If you obtain a modem session, and query the
76 state via <command>AT&amp;V</command>, and you can see among the displayed
77 settings for the active profile a <command>&amp;D0</command>, then the
78 <acronym>DTR</acronym> hangup method is disabled.  To enable the
79 <acronym>DTR</acronym> method, use the <guibutton>Terminal</guibutton> button to
80 get a modem session, then:</para>
82 <screen>
83 <userinput><command>ATZ</command></userinput> <lineannotation># reset to default profile</lineannotation>
84 <userinput><command>AT&amp;D2</command></userinput>  <lineannotation># Set to hang up on DTR drop</lineannotation>
85 <userinput><command>AT&amp;W</command></userinput>  <lineannotation># Write to default profile</lineannotation>
86 </screen>
88 <sect3>
89 <title>How the <acronym>DTR</acronym> method works</title>
91 <para>Whenever the Data Terminal Ready (<acronym>DTR</acronym>) line on the
92 serial line between the host computer and the modem goes high, the modem hangs
93 up. When &kppp; opens the serial port, the <acronym>DTR</acronym> line is pulled
94 low, on an external modem, you can see the <acronym>DTR</acronym> (or
95 <acronym>TR</acronym>) light come on when this happens. When the
96 <acronym>TR</acronym> light goes out (because &kppp; has closed the serial port,
97 or something worse!), the modem will hangup.</para>
98 </sect3>
100 </sect2>
102 <sect2 id="hangup-command-method">
103 <title>Command method</title>
105 <para>The other way to have a modem hang up when connected (used when
106 <command>AT&amp;D<replaceable>n</replaceable></command> where
107 <replaceable>n</replaceable> is not <returnvalue>2</returnvalue>) is to have the
108 modem accept the command when a session is in progress.  To have it hang up
109 properly, get a modem session, and set the guard time to a short interval like
110 so:</para>
112 <screen>
113 <userinput><command>ATZ</command></userinput>
114 <userinput><command>ATS12=5</command></userinput>
115 <userinput><command>AT&amp;W</command></userinput>
116 </screen>
118 <para>Then use the <guilabel>Guard Time</guilabel> slider in the Modem commands
119 section to match the register (<varname>S12</varname> to this value
120 <returnvalue>5</returnvalue>.  The modem should then hangup properly.</para>
122 <sect3>
123 <title>How the Command Method Works</title>
125 <para>When the local modem is connected to a remote modem, it is in the
126 <quote>connect</quote> state, where it passes all characters it receives to the
127 remote modem without interpretation.  To have the modem accept the characters
128 as commands for itself, one must put the modem into the command state.  The
129 escape code does this.</para>
131 <para>The escape code is defined as being three intervals of time whose length
132 is defined by <varname>S12</varname> in fiftieths of a second.</para>
134 <itemizedlist>
135 <listitem>
136 <para>Quiet (must last more than <varname>S12</varname>/50 seconds)</para>
137 </listitem>
138 <listitem>
139 <para>Escape character (defined by the register <varname>S2</varname>, the
140 default is <quote>+</quote>), repeated three times (less than
141 <varname>S12</varname>/50 seconds between each.</para>
142 </listitem>
143 <listitem>
144 <para>Quiet (must last more than <varname>S12</varname>/50 seconds)</para>
145 </listitem>
146 </itemizedlist>
148 <para>Once the modem is in the command state, you can send it commands.  To have
149 it hang up, send the command <command>ATH</command>.  The escape codes and the
150 hangup string used by &kppp; are shown in the <link
151 linkend="modem-commands"><guilabel>Modem Commands</guilabel></link> dialog.
152 These should match your modem.</para>
154 </sect3>
155 </sect2>
156 </sect1>
158 <sect1 id="tone-dialing-speedup">
159 <title>Make Tone dialing faster</title>
161 <para>If you can use tone dialing, the amount of time it takes to dial can be
162 changed using the <varname>S11</varname> register. It gives the duration (in
163 100hundreds of a second) to send each tone while dialing. The default is
164 usually 95 (almost a second.) How fast you can dial depends on the phone
165 company's switching equipment which handles your line. The minimum duration is
166 50, almost twice as fast, and that speed often works. </para>
168 <screen>
169 <userinput><command>ATZ</command></userinput>        <lineannotation># reset to default profile</lineannotation>
170 <userinput><command>ATS11=50</command></userinput>   <lineannotation># fastest possible dialing, use a higher number if it doesn't work</lineannotation>
171 <userinput><command>AT&amp;W</command></userinput>   <lineannotation># write to default profile</lineannotation>
172 </screen>
174 </sect1>
175 </chapter>