[Dxspider-support] now to AX25 for D700 - now Expect

Bill Vodall WA7NWP wa7nwp at jnos.org
Fri May 26 17:25:19 BST 2006


There are now even more packets on the local aprs net and we're finding 
it fascinating to watch.  We should have done this a long time ago. 
While I don't have an AX25 connection to the cluster network, I used the 
concepts of the script below and came up with the following first 
'expect' project that appears to be working well.  It's not robust for 
reconnects but that will come.  Also, if there's any Expect/TCL experts 
here that can tell the magic command to replace all the groups of 3 or 
more spaces with 2, to save packet air time, that would be much appreciated.

So a long string like:

DX de K8ROX:     50063.0  KE4SIX/B     EM83>EN80 S9 short skip. 
1616ZM.

Will be transmitted as:

DX de K8ROX: 50063.0  KE4SIX/B  EM83>EN80 S9 short skip.  1616ZM.


This is with the assumption that the D700 and other programs are smart 
enough to deal with the loss of extra spaces.

Thanks again and 73
Bill - WA7NWP

PS.  This may just be the kick I need to get back on HF and 6.

My script is at the bottom...

Thomas Maisl wrote:
> assuming the script will be run on a linux server (including ax25-support)
> and should either be run permanently or during specified time (cronjob)
> 
> <ad> 
> checkout "dxcbcp" (DX-Cluster-Broadcast Proxy - as mentioned before on this
> list)
> http://x-berg.in-berlin.de/cgi-bin/viewcvs.cgi/ampr/dxcbcp/
> </ad> :)
> 
> You will need the/a conversd-package too, because the script uses rawconvers.
> 
> We're running this script for some time now w/o any problems broadcasting
> spots over several user ports. Kenwood users (in the field) are happy with
> this service :)



----- dx2ax25.exp -----

#!/usr/bin/expect

# Usage:  "dx2ax25.exp ".
# Action:  login to dxcluster, set configuration, broadcast
#     DX spots received as ax25 packets
#
#set hostname [lindex $argv 0]
#set username [lindex $argv 1]
#set password [lindex $argv 2]

set prompt_sequence "dxspider >"
set hostname "n7xy DOT net"
set username "DXclusterCalllogin"
set mycall "WA7NWP-15"
set ax25port "APRS"
#set ax25dest "DX WIDE2-1"
set ax25dest "DX"
set port "73 OH OH"

spawn telnet $hostname $port

expect "login: "
send "$username\r"

expect $prompt_sequence
send "set/nobeep\r"

expect $prompt_sequence
send "clear/spot all\r"

expect $prompt_sequence
send "accept/spot 1 by_state WA,OR,ID,CA,BC,CA\r"

expect $prompt_sequence
send "accept/spot 2 by_zone 3,4\r"

expect $prompt_sequence
send "accept/spot 3 on 10m,6m\r"

#expect $prompt_sequence
#send "accept/spot 4 all\r"

# WWV announcements

expect $prompt_sequence
send "accept/wwv 1 by_zone 3,4\r"

set timeout -1

expect "DX *" {
     set dxpkt $expect_out(buffer);
     exec /usr/sbin/beacon -s -c $mycall -d $ax25dest $ax25port $dxpkt
     exp_continue} \
  "WWV *" {
     set dxpkt $expect_out(buffer);
     exec /usr/sbin/beacon -s -c $mycall -d $ax25dest $ax25port $dxpkt
     exp_continue } \
  eof { send_user "all done: EOF" } \
  timeout { send_user "timeout and done: EOF" } \
  exp_continue

#interact



More information about the Dxspider-support mailing list