Skip to main content

A Meshtastic-APRS Gateway

Project description

aprstastic

PyPI - Version PyPI - Python Version


[!WARNING] Legal operation of this software requires an amateur radio license and a valid call sign.

New!

:fire: 2-minute YouTube demo

:fire: Basic position beacons now supported (lat, lon, timestamp)

:fire: Over-the-air discovery and registration now supported. See image below.

:fire: Registrations are now (optionally) beaconed to MESHID-01 to facilitate a global roaming profile.

:fire: Design doc and future plans: DESIGN.md

Introduction

Here is a proof of concept of a Meshtastic to APRS gateway for Meshtastic users with amateur radio licenses. It runs on stock Meshtastic (915MHz, not HAM band or mode), but uses a pre-registered association between Meshtastic device MAC addresses and amateur radio callsign+SSID to keep things properly attributed and compliant with FCC regulations. To this end, operation requires at least two meshtastic devices: one to serve as the gateway, and the others are the clients. The following image demonstrates how operators can register with the gateway:

Example aprstastic registration flow. Start by sending 'aprs?' to any public channel. Wait for a direct message. Reply with !register CALLSIGN-SSID.

In this scenario, once registered, private message to the gateway will be forwarded to APRS with the "from" call sign KK7CMT-8. Likewise, APRS messages addressed to KK7CMT-8 will be routed to operators Meshtastic device via a Meshtastic direct message.

These interactions are demonstrated in the following YouTube video https://www.youtube.com/watch?v=qUvpZUwl-cY

Each gateway mimics an iGate, and can support multiple Meshtastic users, as long as their call signs and devices are pre-registered.

Addressing APRS messages

How does the gateway know the addressee ("to" address) of APRS packets when all Meshtastic messages are addressed to the gateway device?

To address this, we adopt the "CALLSIGN: " convention. Messages should start with the addressee's call sign, followed by a colon. If this is omitted, then the call sign of the addressee is taken to be that of the previous message (i.e., to respond to the previously received message).

As an example, from Meshtastic you could interact with the Winlink gateway (WLNK-1) as follows:

WLNK-1: ?

The reply from Winlink would be:

NOCALL-1: SP, SMS, L, R#, K#, Y#, F#, P, G, A, I, PR, B (? + cmd for more)

You could then simply enter:

L

and it would assume a reply to WLNK-1, producing the following response:

NOCALL-1: 10/11/2024 23:52:30 No messages.

Compliance

aprstastic only allows messages to transit if they are found in the client device-to-callsign mapping, and are thus attributable to a licensed operator. Random messages published on channels like LongFast, or from other devices do not qualify. All messages are unencrypted before they leave Meshtastic, so all APRS traffic is clear text.

Future Plans

The clear weakness of this gateway is the need to register devices in order for the call sign mapping to work. If every node administrator needs to manage this list, then the system will not scale (and maybe this is fine to control traffic). However, one compelling possibility is to create a central registry where, call signs can be registered to nodes, and the gateways could then subscribe to this list. This would allow a degree of roaming without much need for coordination. To support this, all dynamic registrations (!register command) are optionally beaconed to APRS-IS, to facilitate discovery. Such beacons are expected to be rare -- at most once per device.

For more details, and other upcoming features, see DESIGN.md

Installation

pip install aprstastic

Configuration

Copy sample_config.yml to config.yml and edit appropriately. Here is a sample:

gateway:
  call_sign: N0CALL # Radio call sign of the gateway itself (analogy, iGate's call sign)
  aprsis_passcode: 12345 # APRS-IS passcode. Search Google for how to get this
  meshtastic_interface: # Only serial devices are supported right now
    type: serial
    device: /dev/ttyACM1 # Name of the serial device if more than one

licensed_operators: # Mapping of Meshtastic device IDs to call signs
  "!12345678": NOCALL-1
  "!87654321": NOCALL-2
  "!12121212": NOCALL-3

Running

Execute the following command at the console.

python -m aprstastic

License

aprstastic is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aprstastic-0.0.1a7.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

aprstastic-0.0.1a7-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file aprstastic-0.0.1a7.tar.gz.

File metadata

  • Download URL: aprstastic-0.0.1a7.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.26.0

File hashes

Hashes for aprstastic-0.0.1a7.tar.gz
Algorithm Hash digest
SHA256 6f98ca707787a9861ce34f43340b7012835c20e5f092a8b2d3e300a8ec3d96d6
MD5 bf15d7289328c51a94dbf7a94ee00497
BLAKE2b-256 5dcd27ad116ed4e22adf4ea2c17e82faff8cfe7b3eb507a6ff7c4491ee6f675e

See more details on using hashes here.

File details

Details for the file aprstastic-0.0.1a7-py3-none-any.whl.

File metadata

File hashes

Hashes for aprstastic-0.0.1a7-py3-none-any.whl
Algorithm Hash digest
SHA256 7273418137444ef0dce9266bbe3e277e32666eb3f5e90c13ded743a9494bc7f2
MD5 761bcf360063dce7c83127acce6f8703
BLAKE2b-256 99ca6fbb68b52eec7bbe7c10a5a6695376554f1fad928eaf5f6dbd7ab2192745

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page