removed
[ikiwiki.git] / docs / handbook / handbook-dialout.mdwn
1 \r
2 \r
3 ## 17.5 Dial-out Service \r
4 \r
5 The following are tips for 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.\r
6 \r
7 This is useful to log onto a BBS.\r
8 \r
9 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.\r
10 \r
11 ### 17.5.1 My Stock Hayes Modem Is Not Supported, What Can I Do? \r
12 \r
13 Actually, the manual page for `tip` is out of date. There is a generic Hayes dialer already built in. Just use `at=hayes` in your `/etc/remote` file.\r
14 \r
15 The Hayes driver is not smart enough to recognize some of the advanced features of newer modems--messages like `BUSY`, `NO DIALTONE`, or `CONNECT 115200` will just confuse it. You should turn those messages off when you use `tip` (using `ATX0&W`).\r
16 \r
17 Also, the dial timeout for `tip` is 60 seconds. Your modem should use something less, or else tip will think there is a communication problem. Try `ATS7=45&W`.\r
18 \r
19  **Note:** As shipped, `tip` does not yet support Hayes modems fully. The solution is to edit the file `tipconf.h` in the directory `/usr/src/usr.bin/tip/tip`. Obviously you need the source distribution to do this.\r
20 \r
21 Edit the line `#define HAYES 0` to `#define HAYES 1`. Then `make` and `make install`. Everything works nicely after that.\r
22 \r
23 ### 17.5.2 How Am I Expected to Enter These AT Commands? \r
24 \r
25 Make what is called a ***direct*** entry in your `/etc/remote` file. For example, if your modem is hooked up to the first serial port, `/dev/cuaa0`, then put in the following line:\r
26 \r
27     \r
28     cuaa0:dv#/dev/cuaa0:br#19200:panone\r
29 \r
30 \r
31 Use the highest bps rate your modem supports in the br capability. Then, type `tip cuaa0` and you will be connected to your modem.\r
32 \r
33 If there is no `/dev/cuaa0` on your system, do this:\r
34 \r
35     \r
36     # cd /dev\r
37     # sh MAKEDEV cuaa0\r
38 \r
39 \r
40 Or use `cu` as `root` with the following command:\r
41 \r
42     \r
43     # cu -l`***line***` -s`***speed***`\r
44 \r
45 \r
46 `***line***` is the serial port (e.g.`/dev/cuaa0`) and `***speed***` is the speed (e.g.`57600`). When you are done entering the AT commands hit  **~.**  to exit.\r
47 \r
48 ### 17.5.3 The `@` Sign for the pn Capability Does Not Work! \r
49 \r
50 The `@` sign in the phone number capability tells tip to look in `/etc/phones` for a phone number. But the `@` sign is also a special character in capability files like `/etc/remote`. Escape it with a backslash:\r
51 \r
52     \r
53     pn=\@\r
54 \r
55 \r
56 ### 17.5.4 How Can I Dial a Phone Number on the Command Line? \r
57 \r
58 Put what is called a ***generic*** entry in your `/etc/remote` file. For example:\r
59 \r
60     \r
61     tip115200|Dial any phone number at 115200 bps:\\r
62             :dv#/dev/cuaa0:br#115200:athayes:pa=none:du:\r
63     tip57600|Dial any phone number at 57600 bps:\\r
64             :dv#/dev/cuaa0:br#57600:athayes:pa=none:du:\r
65 \r
66 \r
67 Then you can do things like:\r
68 \r
69     \r
70     # tip -115200 5551234\r
71 \r
72 \r
73 If you prefer `cu` over `tip`, use a generic `cu` entry:\r
74 \r
75     \r
76     cu115200|Use cu to dial any number at 115200bps:\\r
77             :dv#/dev/cuaa1:br#57600:athayes:pa=none:du:\r
78 \r
79 \r
80 and type:\r
81 \r
82     \r
83     # cu 5551234 -s 115200\r
84 \r
85 \r
86 ### 17.5.5 Do I Have to Type in the bps Rate Every Time I Do That? \r
87 \r
88 Put in an entry for `tip1200` or `cu1200`, but go ahead and use whatever bps rate is appropriate with the br capability. `tip` thinks a good default is 1200 bps which is why it looks for a `tip1200` entry. You do not have to use 1200 bps, though.\r
89 \r
90 ### 17.5.6 I Access a Number of Hosts Through a Terminal Server \r
91 \r
92 Rather than waiting until you are connected and typing `CONNECT <host>` each time, use tip's `cm` capability. For example, these entries in `/etc/remote`:\r
93 \r
94     \r
95     pain|pain.deep13.com|Forrester's machine:\\r
96             :cm#CONNECT pain\n:tcdeep13:\r
97     muffin|muffin.deep13.com|Frank's machine:\\r
98             :cm#CONNECT muffin\n:tcdeep13:\r
99     deep13:Gizmonics Institute terminal server:\\r
100             :dv#/dev/cuaa2:br#38400:athayes:du:pa=none:pn=5551234:\r
101 \r
102 \r
103 will let you type `tip pain` or `tip muffin` to connect to the hosts pain or muffin, and `tip deep13` to get to the terminal server.\r
104 \r
105 ### 17.5.7 Can Tip Try More Than One Line for Each Site? \r
106 \r
107 This is often a problem where a university has several modem lines and several thousand students trying to use them.\r
108 \r
109 Make an entry for your university in `/etc/remote` and use `@` for the `pn` capability:\r
110 \r
111     \r
112     big-university:\\r
113             :pn#\@:tcdialout\r
114     dialout:\\r
115             :dv#/dev/cuaa3:br#9600:atcourier:du:pa=none:\r
116 \r
117 \r
118 Then, list the phone numbers for the university in `/etc/phones`:\r
119 \r
120     \r
121     big-university 5551111\r
122     big-university 5551112\r
123     big-university 5551113\r
124     big-university 5551114\r
125 \r
126 \r
127 `tip` will try each one in the listed order, then give up. If you want to keep retrying, run `tip` in a while loop.\r
128 \r
129 ### 17.5.8 Why Do I Have to Hit  **Ctrl** + **P**  Twice to Send  **Ctrl** + **P**  Once? \r
130 \r
131  **Ctrl** + **P**  is the default ***force*** character, used to tell `tip` that the next character is literal data. You can set the force character to any other character with the `~s` escape, which means ***set a variable.***\r
132 \r
133 Type `~sforce=`***single-char****** followed by a newline. `***single-char***` is any single character. If you leave out `***single-char***`, then the force character is the nul character, which you can get by typing  **Ctrl** + **2**  or  **Ctrl** + **Space** . A pretty good value for `***single-char***` is  **Shift** + **Ctrl** + **6** , which is only used on some terminal servers.\r
134 \r
135 You can have the force character be whatever you want by specifying the following in your `$HOME/.tiprc` file:\r
136 \r
137     \r
138     force=<single-char>\r
139 \r
140 \r
141 ### 17.5.9 Suddenly Everything I Type Is in Upper Case?? \r
142 \r
143 You must have pressed  **Ctrl** + **A** , `tip`'s ***raise character,*** specially designed for people with broken caps-lock keys. Use `~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.\r
144 \r
145 Here is a sample .tiprc file perfect for  **Emacs**  users who need to type  **Ctrl** + **2**  and  **Ctrl** + **A**  a lot:\r
146 \r
147     \r
148     force=^^\r
149     raisechar=^^\r
150 \r
151 \r
152 The ^^ is  **Shift** + **Ctrl** + **6** .\r
153 \r
154 ### 17.5.10 How Can I Do File Transfers with `tip`? \r
155 \r
156 If you are talking to another UNIX® system, you can send and receive files with `~p` (put) and `~t` (take). These commands run `cat` and `echo` on the remote system to accept and send files. The syntax is:\r
157 \r
158 `~p` local-file [remote-file]\r
159 \r
160 `~t` remote-file [local-file]\r
161 \r
162 There is no error checking, so you probably should use another protocol, like zmodem.\r
163 \r
164 ### 17.5.11 How Can I Run zmodem with `tip`? \r
165 \r
166 To receive files, start the sending program on the remote end. Then, type `~C rz` to begin receiving them locally.\r
167 \r
168 To send files, start the receiving program on the remote end. Then, type `~C sz `***files****** to send them to the remote system.\r
169 \r
170 \r
171 \r
172 CategoryHandbook\r
173 CategoryHandbook-serial\r