Windows script (Perl) for APRS Beacon via TCP / IP 🚩
Send beacons on Aprs.fi with windows, when any PC is turned on, without any RTX, only with a script in PERL language. Let's start ...
- Download and install Strawberry Perl for Windows (32bit or 64 bit MSI edition) from here;
- In a text file on your desktop paste this code replacing your personal information and save the file with .pl extension;
#! /usr/bin/perl
use IO::Socket;
# -------------- start part to be modified -----------------------
$aprsServer = "italy1.aprs2.net"; # server aprs
$port = 14580; # port server
$callsign = "CALL"; # your call
$pass = "XXXXX"; # passcode
$coord = "xxxx.xxN/0xxxx.xxE-"; # coordinates
$altInFeet = 0;
$comment = "xxxxxxx"; # as you like
# ------------- end part to be modified --------------------------
my $sock = new IO::Socket::INET (
PeerAddr => $aprsServer,
PeerPort => $port,
Proto => 'tcp'
);
die( "Could not create socket: $!n" ) unless $sock;
$sock->recv( $recv_data,1024 );
print $sock "user $callsign pass $pass ver\n";
$sock->recv( $recv_data,1024 );
if( $recv_data !~ /^# logresp $callsign verified.*/ )
{
die( "Error: invalid response from server: $recv_data\n" );
}
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime();
$message = sprintf( "%s>APRS,TCPIP*:@%02d%02d%02dz%s/A=%06d %s\n",
$callsign,$hour,$min,$sec,$coord,$altInFeet,$comment );
print $sock $message;
close( $sock );
print "beacon sent.\n"
3. Try running the script manually and check if Aprs.fi you see the icon with your call;
4. I am here;
5. Now let's automate the Perl APRS script when starting the windows PC and schedule it to be sent every TOT minutes: Right button on Computer, go to Computer Management > Scheduler > New.
Comments