preparing for 1.23 release
[spider.git] / html / connect.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3   <head>
4     <title>Connecting to other Clusters</title>
5         <meta name="Keywords" content="DX Cluster, DXSpider, Spider, Packet Cluster, DXCluster, Pavillion Software, AK1A, AX25, AX.25, WWV, Packet Radio, Amateur Radio, Propagation, DX, DXing, G1TLH, GB7TLH, Dirk Koopman, Mailing list, Linux, RedHat, PERL">
6         <meta name="Description" content="Software and systems for realtime digital communications between amateur radio stations for the provision of information on propagation conditions and stations operating">
7         <meta name="Author" content="Dirk Koopman G1TLH">
8   </head>
9
10   <body TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#FFFFFF">
11         <FONT COLOR="#606060"> 
12           <hr>
13           <h2>Connecting to other Clusters</h2>
14           <hr>
15         </font>
16         
17         
18         <address><a href="mailto:djk@tobit.co.uk">Dirk Koopman G1TLH</a></address>
19         <p>
20           <!-- Created: Sun Dec 13 20:25:14 GMT 1998 -->
21           <!-- hhmts start -->
22 Last modified: Fri Jan  8 14:27:18 GMT 1999
23 <!-- hhmts end -->
24         <p>At the moment, anybody can connect inwards at any time from outside, either by ax25 or by
25           telnet (assuming you have followed the instructions in <a href="install.html">installation</a>
26           instructions. However, in order to connect outwards, you will need to create <em>connect</em> scripts.
27           
28         <p><em>Connect</em> scripts live in the <tt>/spider/connect</tt> directory and are simple ascii scripts
29           that are written using a normal editor. There are a couple of examples in the issue directory.
30           
31         <p>Here are a few of basic types, first a telnet connection where the 
32            client is set up in the passwd file thus:-
33         <pre>
34     gb7djk:x:1372:1291::/home/gb7djk:/usr/bin/perl /spider/perl/client.pl gb7djk telnet
35         </pre>
36         and the connect script would be:-
37         <pre>
38     timeout 15
39     # this is a comment
40     connect telnet dirkl.tobit.co.uk
41     'login' 'gb7djk'
42     'word' 'gb7djk'
43     client gb7djk telnet
44         </pre>
45         <p>For a connect that requires a login and execution of the programs
46           from a normal shell, do:-
47
48         <pre>
49     timeout 15
50     connect telnet dirkl.tobit.co.uk
51     'login' 'gb7djk'
52     'word' 'gb7djk'
53     '\$' 'cd /spider/perl'
54     # set the line to prevent echoing, leaving this out will
55     # confuse whole networks for hours!
56     '\$' 'stty -echo raw'
57     # tell GB7DJK that you are GB7DJK-1
58     '\$' 'client.pl gb7djk-1 telnet'
59     # tell GB7DJK-1 that it is connected to GB7DJK
60     # you can leave this out if you call this script 'gb7djk'
61     client gb7djk telnet
62         </pre>
63
64         <p>and finally an ax25 example:-
65         <pre>
66     timeout 60
67     abort (Busy|Sorry|Fail)
68     # don't forget to chmod 4775 netrom_call!
69     connect ax25 /usr/sbin/netrom_call bbs gb7djk g1tlh
70     'Connect' ''
71     'Connect' 'c np7'
72     'Connect' 'c gb7dxm'
73     'Connect' ''
74     # you can leave this out if you call the script 'gb7dxm'
75     client gb7dxm ax25
76         </pre>
77         
78         <p>A connection is started manually by typing in <tt>connect <scriptname></tt> on a sysop enabled
79           <tt>client.pl</tt> session. For example:-
80         <pre>
81     G1TLH de GB7DJK 13-Dec-1998 2041Z > connect gb7djk-1
82     connection to GB7DJK-1 started
83     G1TLH de GB7DJK 13-Dec-1998 2043Z > 
84         </pre>
85         
86     <p>You can watch the progress of the connection (if you have the standard debugging enabled) on the
87           <tt>cluster.pl</tt> screen and you should see something like this:-
88         <pre>
89     &lt;- D G1TLH connect gb7djk-1
90     -> D G1TLH connection to GB7DJK-1 started
91     -> D G1TLH G1TLH de GB7DJK 13-Dec-1998 2046Z >
92     timeout set to 15
93     CONNECT sort: telnet command: dirkl.tobit.co.uk
94     CHAT "login" -> "gb7djk"
95     received "
96     Red Hat Linux release 5.1 (Manhattan)
97     Kernel 2.0.35 on an i586
98     "
99     received "login: "
100     sent "gb7djk"
101     CHAT "word" -> "gb7djk"
102     received "gb7djk
103  
104     "
105     received "Password: "
106     sent "gb7djk"
107     Connected to GB7DJK-1, starting normal protocol
108     &lt;- O GB7DJK-1 telnet
109     -> B GB7DJK-1 0
110     GB7DJK-1 channel func  state 0 -> init
111     &lt;- D GB7DJK-1 
112     &lt;- D GB7DJK-1 Last login: Sun Dec 13 17:59:56 from dirk1
113     &lt;- D GB7DJK-1 PC38^GB7DJK-1^~
114     &lt;- D GB7DJK-1 PC18^ 1 nodes, 0 local / 1 total users  Max users 0  Uptime 0 00:00^5447^~
115     etc
116         </pre>
117         
118         <p>The connect scripts consist of lines which start with the
119         following keywords or symbols:-
120
121         <ul>
122
123                 <p><li><b>#</b> All lines starting with a <b>#</b> are
124                 ignored, as are wholly blank lines.
125
126                 <p><li><b>timeout</b> followed by a number is the number of
127                 seconds to wait for a command to complete. If there is no
128                 <b>timeout</b> specified in the script then the default is 60
129                 seconds.
130
131                 <P><li><b>abort</b> is a regular expression containing one or
132                 more strings to look for to abort a connection. This is a perl
133                 regular expression and is executed ignoring case.
134
135                 <p><li><b>connect</b> followed by <b>ax25</b> or <b>telnet</b>
136                 and some type dependent information. In the case of a
137                 <b>telnet</b> connection, there can be up to two parameters,
138                 the first is the ip address or hostname of the computer you
139                 wish to connect to and the second is the port number you want
140                 to use (this can be left out if it is a normal telnet
141                 session).
142
143                 <p>In the case of an <b>ax25</b> session then this would
144                 normally be a call to <tt>ax25_call</tt> or
145                 <tt>netrom_call</tt> as in the example above. It is your
146                 responsibility to get your node and other ax25 parameters to
147                 work before going down this route!
148
149                 <p><li><b>'</b> is the delimiting character for a word or
150                 phrase of an expect/send line in a <tt>chat</tt> type
151                 script. The words/phrases normally come in pairs, either can
152                 be empty. Each line reads input from the connection until it
153                 sees the string (or perl regular expression) contained in the
154                 left hand string. If the left hand string is empty then it
155                 doesn't read or wait for anything. The comparison is done
156                 ignoring case.
157
158                 <p>When the left hand string has found what it is looking (if
159                 it is) then the right hand string is sent to the connection.
160
161                 <p>This process is repeated for every line of <tt>chat</tt> script. 
162
163                 <p><li><b>client</b> starts the connection, put the arguments
164                 you would want here if you were starting the client program
165                 manually. You only need this if the script has a different
166                 name to the callsign you are trying to connect to (i.e. you
167                 have a script called <tt>other</tt> which actually connects to
168                 <tt>GB7DJK-1</tt> [instead of a script called
169                 <tt>gb7djk-1</tt>]).
170
171         </ul>
172
173 <!-- Standard Footer!! -->
174         <p>&nbsp;</p>
175         <p>
176           <FONT COLOR="#606060"><hr></font>
177         <font color="#FF0000" size=-2>
178           Copyright &copy; 1998 by Dirk Koopman G1TLH. All Rights Reserved<br>
179         </font>
180         <font color="#000000" size=-2>$Id$</font>
181   </body>
182 </html>