Heikki Hannikainen
and 1 contributors

NAME

Ham::APRS::DeviceID - APRS device identifier

SYNOPSIS

  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'});
        }
  }

ABSTRACT

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.

The module comes with a device identification database, which is simply a copy of the YAML master file maintained separately at: https://github.com/hessu/aprs-deviceid

DESCRIPTION

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, YAML::Tiny to load the device identification database and File::ShareDir for finding it.

EXPORT

None by default.

FUNCTION REFERENCE

debug($enable)

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.

identify($hashref)

Tries to identify the device.

SEE ALSO

APRS tocalls list, http://aprs.org/aprs11/tocalls.txt

APRS mic-e type codes, http://aprs.org/aprs12/mic-e-types.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.

AUTHORS

Heikki Hannikainen, OH7LZB <hessu@hes.iki.fi>

COPYRIGHT AND LICENSE

Copyright 2010-2015 by Heikki Hannikainen

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.