summaryrefslogtreecommitdiffstats
path: root/share/doc/handbook/dialout.sgml
blob: 237b983d5b424d95319a0a1e9e1cdf4ccf89037e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<!-- This is an SGML document in the linuxdoc DTD of the Tutorial for
     Configuring a FreeBSD for Dialout Services.
     $Id: dialout.sgml,v 1.2 1996/11/30 23:51:45 mpp Exp $

     The FreeBSD Documentation Project

<!DOCTYPE linuxdoc PUBLIC "-//FreeBSD//DTD linuxdoc//EN">

<linuxdoc>
  <article>
      <title>Dialout
      <author>FAQ
      <date>24 Nov 1996, (c) 1996

      <abstract> This section contains some basic information on being able to dialout from your FreeBSD box with a modem.  This information is really a stepping stone into PPP.  
      </abstract>
	
    <toc>
-->

<sect><heading>Dialout service<label id="dialout"></heading>

<p><em>Information integrated from FAQ.</em>

The following are tips to getting your host to be able to connect over the modem to another computer.  This is appropriate for establishing a terminal session with a remote host.  
<p>This is useful to log onto a BBS.
<p>This kind of connection can be extremely helpful to get a file on the Internet if you have problems with PPP.  If you need to ftp something and PPP is broken, use the terminal session to ftp it.  Then use zmodem to transfer it to your machine. 
<sect1>
	<heading>Why cannot I run <tt/tip/ or <tt/cu/?</heading>
        <p>
          On your system, the programs <tt/tip/ and <tt/cu/ are probably
          executable only by <tt/uucp/ and group <tt/dialer/.  You can use
          the group <tt/dialer/ to control who has access to your modem or
          remote systems.  Just add yourself to group dialer.

          Alternatively, you can let everyone on your system run <tt/tip/
          and <tt/cu/ by typing:
          <verb>
            chmod 4511 /usr/bin/tip
          </verb>
          You do not have to run this command for <tt/cu/, since <tt/cu/ is
          just a hard link to <tt/tip/.

      <sect1>
	<heading>My stock Hayes modem is not supported, what can I do?</heading>
        <p>
          Actually, the man page for <tt/tip/ is out of date.  There is a
          generic Hayes dialer already built in.  Just use
          ``<tt/at=hayes/'' in your <tt>/etc/remote</tt> file.

          The Hayes driver is not smart enough to recognize some of the
          advanced features of newer modems&mdash;messages like <tt/BUSY/,
          <tt/NO DIALTONE/, or <tt/CONNECT 115200/ will just confuse it.
          You should turn those messages off when you use <tt/tip/ (using
          <tt/ATX0&amp;W/).

          Also, the dial timeout for <tt/tip/ is 60 seconds.  Your modem
          should use something less, or else tip will think there is a
          communication problem.  Try <tt/ATS7=45&amp;W/.

          Actually, as shipped <tt/tip/ does not yet support it fully. The
          solution is to edit the file <tt/tipconf.h/ in the directory
          <tt>/usr/src/usr.bin/tip/tip</tt> Obviously you need the source
          distribution to do this.

          Edit the line ``<tt/#define HAYES 0/'' to ``<tt/#define HAYES
          1/''. Then ``<tt/make/'' and ``<tt/make install/''. Everything
          works nicely after that.

      <sect1>
        <heading>How am I expected to enter these AT commands?<label id="direct-at"></heading>
        <p>
          Make what is called a ``<tt/direct/'' entry in your
          <tt>/etc/remote</tt> file.  For example, if your modem is hooked
          up to the first serial port, <tt>/dev/cuaa0</tt>, then put in the
          following line:
          <verb>
            cuaa0:dv=/dev/cuaa0:br#19200:pa=none
          </verb>
          Use the highest bps rate your modem supports in the br
          capability.  Then, type ``<tt/tip cuaa0/'' and you will be
          connected to your modem.

          If there is no <tt>/dev/cuaa0</tt> on your system, do this:
          <verb>
            cd /dev
            MAKEDEV cuaa0
          </verb>
        <p>
          Or use cu as root with the following command:
          <verb>
            cu -l``line'' -s``speed''
          </verb>
          with line being the serial port (e.g.<tt>/dev/cuaa0</tt>)
          and speed being the speed (e.g.<tt>57600</tt>).
          When you are done entering the AT commands hit <tt>~.</tt> to exit.

      <sect1>
        <heading>The <tt/@/ sign for the pn capability does not work!</heading>
        <p>
          The <tt/@/ sign in the phone number capability tells tip to look in
          <tt>/etc/phones</tt> for a phone number.  But the <tt/@/ sign is
          also a special character in capability files like
          <tt>/etc/remote</tt>.  Escape it with a backslash:
          <verb>
            pn=\@
          </verb>

      <sect1>
	<heading>How can I dial a phone number on the command line?</heading>
        <p>
          Put what is called a ``<tt/generic/'' entry in your
          <tt>/etc/remote</tt> file.  For example:
          <verb>
            tip115200|Dial any phone number at 115200 bps:\
            :dv=/dev/cuaa0:br#115200:at=hayes:pa=none:du:
            tip57600|Dial any phone number at 57600 bps:\
            :dv=/dev/cuaa0:br#57600:at=hayes:pa=none:du:
          </verb>

          Then you can things like ``<tt/tip -115200 5551234/''.  If you
          prefer <tt/cu/ over <tt/tip/, use a generic cu entry:
          <verb>
            cu115200|Use cu to dial any number at 115200bps:\
            :dv=/dev/cuaa1:br#57600:at=hayes:pa=none:du:
          </verb>
          and type ``<tt/cu 5551234 -s 115200/''.

      <sect1>
        <heading>Do I have to type in the bps rate every time I do that?</heading>
        <p>
          Put in an entry for <tt/tip1200/ or <tt/cu1200/, but go ahead and
          use whatever bps rate is appropriate with the br
          capability. <tt/tip/ thinks a good default is 1200 bps which is
          why it looks for a ``<tt/tip1200/'' entry.  You do not have to use
          1200 bps, though.

      <sect1>
        <heading>I access a number of hosts through a terminal server.</heading>
        <p>
          Rather than waiting until you are connected and typing 
          ``<tt/CONNECT &lt;host&gt;/'' each time, use tip's <tt/cm/
          capability. For example, these entries in
          <tt>/etc/remote</tt>:
          <verb>
            pain|pain.deep13.com|Forrester's machine:\
            :cm=CONNECT pain\n:tc=deep13:
            muffin|muffin.deep13.com|Frank's machine:\
            :cm=CONNECT muffin\n:tc=deep13:
            deep13:Gizmonics Institute terminal server:\
            :dv=/dev/cua02:br#38400:at=hayes:du:pa=none:pn=5551234:
          </verb>

          will let you type ``<tt/tip pain/'' or ``<tt/tip muffin/'' to
          connect to the hosts pain or muffin; and ``<tt/tip deep13/'' to
          get to the terminal server.

      <sect1>
        <heading>Can tip try more than one line for each site?</heading>
        <p>
          This is often a problem where a university has several modem lines
          and several thousand students trying to use them...
        <p>
          Make an entry for your university in <tt>/etc/remote</tt>
          and use <tt>@</tt> for the <tt/pn/ capability:
          <verb>
            big-university:\
            :pn=\@:tc=dialout
            dialout:\
            :dv=/dev/cuaa3:br#9600:at=courier:du:pa=none:
          </verb>

          Then, list the phone numbers for the university in
          <tt>/etc/phones</tt>:
          <verb>
            big-university 5551111
            big-university 5551112
            big-university 5551113
            big-university 5551114
          </verb>

          <tt/tip/ will try each one in the listed order, then give up.  If
          you want to keep retrying, run <tt/tip/ in a while loop.

      <sect1>
	<heading>Why do I have to hit CTRL+P twice to send CTRL+P once?</heading>
        <p>
          CTRL+P is the default ``force'' character, used to tell <tt/tip/
          that the next character is literal data.  You can set the force
          character to any other character with the <tt/~s/ escape, which
          means ``set a variable.''

          Type ``<tt/~sforce=&lt;single-char&gt;/'' followed by a newline.
          <tt/&lt;single-char&gt;/ is any single character.  If you leave
          out <tt/&lt;single-char&gt;/, then the force character is the nul
          character, which you can get by typing CTRL+2 or CTRL+SPACE.  A
          pretty good value for <tt/&lt;single-char&gt;/ is SHIFT+CTRL+6,
          which I have seen only used on some terminal servers.

          You can have the force character be whatever you want by
          specifying the following in your <tt>&dollar;HOME/.tiprc</tt>
          file:
          <verb>
            force=<single-char>
          </verb>

      <sect1>
        <heading>Suddenly everything I type is in UPPER CASE??</heading>
        <p>
          You must have pressed CTRL+A, <tt/tip/'s ``raise character,''
          specially designed for people with broken caps-lock keys. Use
          <tt/~s/ as above and set the variable ``raisechar'' to something
          reasonable.  In fact, you can set it to the same as the force
          character, if you never expect to use either of these features.

          Here is a sample .tiprc file perfect for Emacs users who need to
          type CTRL+2 and CTRL+A a lot:
          <verb>
            force=^^
            raisechar=^^
          </verb>
          The ^^ is SHIFT+CTRL+6.

      <sect1>
	<heading>How can I do file transfers with <tt/tip/?</heading>
        <p>
          If you are talking to another UNIX system, you can send and
          receive files with <tt/~p/ (put) and <tt/~t/ (take).  These
          commands run ``<tt/cat/'' and ``<tt/echo/'' on the remote system
          to accept and send files.  The syntax is:
          <verb>
            ~p <local-file> [<remote-file>]
            ~t <remote-file> [<local-file>]
          </verb>

          There is no error checking, so you probably should use another
          protocol, like zmodem.

      <sect1>
	<heading>How can I run zmodem with <tt/tip/?</heading>
        <p>
          To receive files, start the sending program on the remote end.
          Then, type ``<tt/~C rz/'' to begin receiving them locally.

          To send files, start the receiving program on the remote end.
          Then, type ``<tt/~C sz &lt;files&gt;/'' to send them to the
          remote system.

    </sect>
OpenPOWER on IntegriCloud