npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

share-tnc

v1.0.8

Published

Share a Serial TNC to KISS over TCP/IP

Downloads

29

Readme

share-tnc

Share a serial TNC using KISS over TCP/IP

This is a command-line utility that lets you share a serial (typically USB-serial) KISS TNC to a TCP/IP port. The port can be used by any program (e.g. aprx, APRSIS32, etc) that can use the KISS-over-TCP protocol.

Hardware/Software Environment

share-tnc uses 'node.js' and the 'serialport' npm module. It has been tested most heavily on a Raspberry Pi running Raspbian Jessie, but has been casually tested on Windows 10, Linux Mint and MacOS Sierra, and appears to work fine. Please file a report if you experience difficulties.

share-tnc does not attempt to put the TNC into KISS mode. You should have your TNC configured to go into KISS mode automatically on bootup and stay there.

Installation

Note: 'serialport' doesn't like to installed in the usual way with 'sudo' (see here for more information). If you need to use 'sudo' to install globally, use the following:

sudo npm install -g --unsafe-perm share-tnc  

If you don't need 'sudo', then

npm install -g share-tnc  

Side-note: Installing Node.js on the Raspberry Pi

The version of Node that you'll get with 'apt-get install node' is unfortunately very old. Your best bet is to install from the 'nodejs.org' binary downloads.

  • Go to https://nodejs.org/en/download/ and download the ARMv6 package
  • Unpack it, and then copy all the directories in the package to /usr/local

Example:
curl -O https://nodejs.org/dist/v6.9.5/node-v6.9.5-linux-armv6l.tar.xz
tar xf node-v6.9.5-linux-armv6l.tar.xz
cp -r node-v6.9.5-linux-armv6l/bin /usr/local
cp -r node-v6.9.5-linux-armv6l/include /usr/local
cp -r node-v6.9.5-linux-armv6l/share /usr/local
cp -r node-v6.9.5-linux-armv6l/lib /usr/local

Usage

Command Line - Sharing the TNC

share-tnc <device> <port> [--baud <baudrate>]  

e.g.

share-tnc /dev/ttyUSB0 8001 --baud 1200  

You can also share out a KISS-over-TCP connection like DireWolf (since DireWolf only supports one connection at a time):

share-tnc <host>:<port> <port>  

e.g.  

share-tnc localhost:8001 8002

Multiple Connections

If more than one client connects to share-tnc's server port, the system simulates what would happen if each client had a radio and TNC to itself, but could hear the other clients. When a client sends a packet, that packet is not echoed back to the client (because you wouldn't hear while you're transmitting), but it is sent to every other client. Packets received on the physical radio/tnc are relayed to every client that's connected to share-tnc.

Note that this behaviour may confuse clients that are trying to use the same callsign-ssid combo, and may give undesired on-air results. For instance if you had two APRS clients configured to use VA3ZZZ-1, they would both acknowledge a message packet that was received. So, don't do that. If you have more than one APRS client hooked up, they should generally have different callsigns or ssids.

Command Line - Monitoring the On-Air APRS Traffic

watch-aprs <host>:<port>

e.g.

watch-aprs raspberrypi:8001

'watch-aprs' isn't specific to the 'share-tnc' package. It will work with any KISS-over-TCP server (e.g. DireWolf).

Installing as a 'systemd' Service

There is a sample 'module definition' in the module library as 'share-tnc.service'. Typical usage would be something like:

  • Ensure you have a directory called /usr/local/lib/systemd/system
  • Copy 'share-tnc.service' into /usr/local/lib/systemd/system
  • Edit /usr/local/lib/systemd/system/share-tnc.service to reflect the device port, baud rate and KISS-TCP port that you want to use.
  • sudo systemctl enable share-tnc
  • sudo systemctl start share-tnc

Logging

share-tnc doesn't attempt to manage its own logging. It simply outputs to the console. When started by 'systemd', this output will be logged to systemd's journal. You can view the log output with:

sudo journalctl -u share-tnc  

Contributing

To contribute, please fork https://github.com/trasukg/share-tnc and then submit pull requests, or open an issue.

See also https://github.com/trasukg/utils-for-aprs for the underlying components used in this utility.

License

This software is licensed under the Apache Software License 2.0

The phrase APRS is a registered trademark of Bob Bruninga WB4APR.

Release Notes

1.0.0 - February 8, 2017 - First Release
1.0.1 - March 10, 2017 - Fixed a bug where the only baud rate actually used was 1200
1.0.2 - April 3, 2017 - Updated to require the latest utils-for-aprs, which should now include the 'ws' dependency properly.
1.0.3 - April 3, 2017 - Updated utils-for-aprs to call out the 'bluebird' dependency. 1.0.4 - April 3, 2017 - Updated to latest utils-for-aprs
1.0.5 - January 11, 2018 - Added capability to share a KISS-over-TCP port.
1.0.6 - February 17, 2019 - Updated to latest utils-for-aprs to fix a framing issue.
1.0.7 - August 9, 2020 - Update to latest serialport, so it compiles under the latest nodejs on raspbian.