+
+ <p>I have coloured the commands in an attempt to make it clear as
+ to what goes on, where and why. Lines that are <span
+ class=cmd>coloured thus</span> are miscellaneous setup
+ commands. Lines that are <span class=connect>this colour</span>
+ are lines that make the initial <span
+ class=connect>connection</span> to the first hop. The things that
+ are <span class=expect>this colour</span> are the strings I am
+ looking for (what I am <span class=expect>"expecting"</span>) and
+ the things that are <span class=send>this colour</span> are the
+ commands I am going to <span class=send>send</span> when I see the
+ "expect" strings in the input.</p>
+
+ <p>The script starts by setting the timeout to 15 seconds, then starts
+ the connection. It is <b>important</b> to note that, in the case of
+ an ax25 connection (usually) this will be the callsign of the <i>first hop</i> along the
+ route that you are going to take to the destination, so this will be typically the callsign
+ of your local node.</p>
+
+ <p>You will notice that the script <span class=expect>waits</span>
+ until it sees the left hand string of the pair and <b>only
+ then</b> does it <span class=send>send</span> the string on the
+ right hand side. This is called a <i>State Machine</i>.</p>
+
+ <p>A <i>state machine</i> "walks" through a conversation (in this
+ case) looking for "<span class=expect>states</span>" (in this case
+ particular strings) and then performs some "<span
+ class=send>action</span>" (usually some kind of connect command
+ for the type of system you are trying to navigate). When one
+ "<span class=expect>state</span>" "fires"
+ (detects the string are looking for), it <span class=send>sends the command</span>
+ associated with that state and then moves onto the next "<span
+ class=expect>state</span>", in our case: the next line.</p>
+
+ <p><b>PLEASE NOTE</b>: the colouration in the above example is for illustrative purposes
+ only, the debug output is all one colour.</p>
+