start:
# initialize modem
send at Z\r
wait 5 OK
# if we get an error here it means the link is up so we will goto done
error done
# dial the number
send at dt5551212\r
# wait for CONNECT
wait 60 CONNECT
# check the baud
wait 5 19200
# didn't connect at 19200 so lets try again
error wrongbaud
# connection okay lets goto okay
goto okay
# We connected at the wrong baud
wrongbaud:
wait 2
# get the modems attention, HEY MODEM!
send +++
wait 10 OK
# hang up the line
send at H\r
wait 10 OK
# and start all over
goto start
okay:
# So far so good
wait 6
# lets get the request prompt
send \r
wait 6 Request>
# got it so lets ask for slip
send slip\r
# We are in
done:
# this cleans up anything left in buffer
wait 5
