Ham::APRS::DeviceID - APRS device identifier
use Ham::APRS::FAP qw(parseaprs); use Ham::APRS::DeviceID; use Data::Dumper; my $aprspacket = 'OH2RDP>APZMDR,OH2RDG*,WIDE:!6028.51N/02505.68E#PHG7220/RELAY,WIDE, OH2AP Jarvenpaa'; my %packet; my $retval = parseaprs($aprspacket, \%packet); if ($retval == 1) { Ham::APRS::DeviceID::identify(\%packet); if (defined $packet{'deviceid'}) { print Dumper($packet{'deviceid'}); } }
This module attempts to identify the manufacturer, model and software version of an APRS transmitter. It looks at details found in the parsed APRS packet (as provided by Ham::APRS::FAP) and updates the hash with the identification information, if possible.
Unless a debugging mode is enabled, all errors and warnings are reported through the API (as opposed to printing on STDERR or STDOUT), so that they can be reported nicely on the user interface of an application.
This module requires a reasonably recent Ham::APRS::FAP module.
None by default.
Enables (debug(1)) or disables (debug(0)) debugging.
When debugging is enabled, warnings and errors are emitted using the warn() function, which will normally result in them being printed on STDERR. Succesfully printed packets will be also printed on STDOUT in a human-readable format.
When debugging is disabled, nothing will be printed on STDOUT or STDERR - all errors and parsing results need to be collected from the returned hash reference.
Tries to identify the device.
APRS tocalls list, http://aprs.org/aprs11/tocalls.txt
APRS specification 1.0.1, http://www.tapr.org/aprs_working_group.html
APRS addendums, e.g. http://web.usna.navy.mil/~bruninga/aprs/aprs11.html
The source code of this module - there are some undocumented features.
Heikki Hannikainen, OH7LZB <hessu@hes.iki.fi>
Copyright 2010 by Heikki Hannikainen
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Ham::APRS::DeviceID, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Ham::APRS::DeviceID
CPAN shell
perl -MCPAN -e shell install Ham::APRS::DeviceID
For more information on module installation, please visit the detailed CPAN module installation guide.