Utils for over-the-air APRS (Advanced Packet Reporting System) under Node.js
APRS is the Advanced Packet Reporting System, designed by Bob Bruninga, WB4APR.
It uses the Un-numbered Information (UI) packets of the AX.25 protocol to allow for stations to broadcast small information packets and messages to the other stations in the surrounding area (typically the local area covered by a digital repeater, or digipeater).
This module is a set of utilities for dealing with "RF" packets, in other words the part of APRS that involves connecting a computer to a packet modem and then to a radio, in order to monitor and send APRS information over the air in a local area. Currently these utilities don't deal with 'APRS-IS', the internet server part of APRS. That may happen in the future, but right now the focus is on making it possible to deploy a portable station that uses modern techniques to provide an APRS client.
This library is intended as a building block for applications that use APRS, but includes a few utilities as well. Longer term, the utilities that prove useful will be split out into separate projects that include 'utils-for-aprs' as a dependency, but for now, they're here, and they're useful for testing the library's functionality.
Briefly, the library includes a few things:
An Endpoint is an interface between JavaScript in Node and some external device, like a TNC or a DireWolf sound-card interface.
There are three endpoint classes provided:
Each endpoint provides one or more 'KISSConnection' objects to your JavaScript code. Your code can listen for KISS frames coming in to the connection from the outside, device and send KISS frames out the connection to the device.
There is a utility function, 'APRSInfoParser()', that takes KISS frames and decodes both the AX25 and APRS Info portions of them into JavaScript objects. As well, there are a few useful utility functions, for instance to convert an array of callsign objects in a path to a TNC2-style path string for output and display.
The following scripts can be run from the command line. The source code for each of them gives some idea of how to use the 'utils-for-aprs' library.
To experiment with the utilities and work on the library code, do the following:
1 - Install node.js, as per The node website.
2 - Checkout the project folder as follows:
git clone https://github.com/trasukg/utils-for-aprs.git
2 - 'cd' into the 'utils-for-aprs' folder.
3 - Install the required npm packages
npm install
4 - Run the serial interface with
node sharePortToTCP
5 - In a different terminal window, run the monitor:
node monitorTCP-APRS localhost:
Enjoy!
This library and utilities are licensed under the Apache Software License, version 2. In fact, if we can build a community around APRS on Node.js, I'd love to see the project go through incubation at the ASF.
Cheers,
Greg Trasuk, VA3TSK
The phrase APRS is a registered trademark of Bob Bruninga WB4APR.
2.0.0 - Nov 11, 2016 - Endpoints are working as is port sharing and monitoring
2.1.0 - Jan 6, 2017 - AddressBuilder and KISSFrameBuilder let you construct
KISS frames for transmittal.
2.1.1 - Fixed a minor format error in this README file.
2.2.1 - Added support for Browserify and Web Socket endpoints.
2.2.2 - Added required dependency on 'ws'.
2.2.3 - Added required dependency on 'bluebird'.
2.2.4 - Fixed a problem with ServerSocketKISSFrameEndpoint.
2.2.5 - Fixed formatting problem in package.JSON
2.2.6 - Refactored etc to remove bugs flagged by SonarQube.
2.2.7 - Made 'serialport' library optional, and lazy-loaded.
2.2.8 - Updated many dependencies to remove security vulnerabilities exposed
by 'npm audit'. They're not all gone, because one of the updates required is
to serialport, but serialport's move from 4.x to 5.x (7.x is current)
had breaking changes to the
interface that will take some time to adopt.
2.2.9 - Fixed a framing error that caused some transmitted frames to not
be recognized by the receiving device.
2.2.10 - Eliminated usage of 'new Buffer(...)'.
3.0.0 - Updated dependencies, including adoption of the new serialport options format for the SerialKISSFrameEndpoint.