[aprssig] PERL code to send objects to server
Jason Winningham
jdw at eng.uah.edu
Fri May 26 21:55:25 EDT 2006
On May 26, 2006, at 3:30 PM, Andrew Rich wrote:
> Anyone got some perl code to connect to an aprs server and send
> objects ?
>
#!/usr/bin/perl
use IO::Socket::INET;
$socket = IO::Socket::INET->new("localhost:2023")
or die "could not connect to server!";
$mycall="KG4WSV-14";
$password="01234";
$dest="APRS";
$object_name="df-test5";
$create_del = "*";
print STDOUT "user $mycall pass $password vers fubar 0.0.0a\n";
print $socket "user $mycall pass $password vers fubar 0.0.0a\n";
for ($i=0; $i<=360; $i += 15)
{
$t = time();
$s = $t % 60;
$t /= 60;
$m = $t % 60;
$t /= 60;
$h = $t % 24;
$format = "%s>%s:;%-9.9s%1.1s%02.2d%02.2d%02.2dz3435.00N/
08711.00W\\000/000/%03d/969 \n";
printf STDOUT $format, $mycall, $dest, $object_name,
$create_del, $h, $m, $s, $i;
printf $socket $format, $mycall, $dest, $object_name,
$create_del, $h, $m, $s, $i;
sleep 10;
}
sleep 20;
$create_del = "_";
printf STDOUT $format, $mycall, $dest, $object_name, $create_del, $h,
$m, $s, $i;
printf $socket $format, $mycall, $dest, $object_name, $create_del,
$h, $m, $s, $i;
close($socket);
-Jason
kg4wsv
More information about the aprssig
mailing list