Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

MC-APRS

An APRS to MeshCore Bridge.

PyPI - Version PyPI - Python Version


New!

🔥 Change the gateway's APRS map icon. See APRS_SYMBOLS.md for details.

🔥 Call sign registrations are now (optionally) beaconed to MESHID-01 to facilitate a global roaming profile.

The bundled registration database updates from the MC-APRS repository. Local and APRS-beaconed registrations are also supported.

Introduction

MC-APRS is a bidirectional MeshCore APRS gateway for operators with amateur radio licenses. It connects to a MeshCore Companion over its serial interface and uses direct messages plus pre-registered MeshCore public-key prefixes to associate operators with amateur radio call signs. Operation requires a Companion gateway and MeshCore client nodes.

Direct messages to the gateway are forwarded to APRS-IS using the registered call sign. APRS messages addressed to that call sign are sent as MeshCore direct messages to the registered contact. If registration beaconing is enabled, the public-key-prefix-to-call-sign association is also announced to MESHID-01 so other compatible gateways can learn it.

The original Meshtastic edition is demonstrated in this YouTube video; it does not demonstrate the MeshCore serial interface.

Each gateway mimics an iGate and can support multiple MeshCore users, provided their call signs are registered. MeshCore contacts must be available to the Companion for the gateway to send them messages.

aprs? Advert Demo
Public_aprs? Advert Demo

Special Commands

Various special commands can be issued by sending direct MeshCore messages to the gateway. The following commands are currently supported.

Register a device:

Use the following command to register the sending MeshCore public-key prefix to a call sign, replacing <YOUR_CALLSIGN> appropriately:

!register <YOUR_CALLSIGN>

e.g.,

!register N0CALL-1

Unregister a device:

Use the following command to unregister the sending MeshCore contact and its call sign.

!unregister

Print version information:

Use the following command to print the gateway's info and version.

!version

Check whether the gateway is online:

Send aprs? as a direct message for a private online reply, or send it on Public/channel 0 for a public response. The command is case-insensitive and does not require registration. Channel 0 messages may include a sender prefix (for example, N0CALL-1: aprs?); the gateway recognizes the command after that prefix. For each channel request, it sends a Flood Advert after its reply so nearby nodes can discover it and start a direct conversation, regardless of the periodic auto-advert setting or when the previous advert was sent.

Installation, Configuration, and Running

On Debian-based systems, install and run the edited copy from a local clone in a virtual environment. This avoids trying to modify the OS-managed Python installation (PEP 668):

git clone https://github.com/Mambo430/MC-APRS.git
cd MC-APRS
python3 -m venv .venv
.venv/bin/python -m pip install -e .
.venv/bin/python -m mc_aprs

The editable install uses the code in this checkout, so changes you make are available without reinstalling. Always use .venv/bin/python to run this checkout; /usr/bin/python is separate and will not see the package installed in the virtual environment. pip install mc-aprs installs the published PyPI release and will not include unpublished local changes.

Install the published release instead:

python3 -m venv .venv
.venv/bin/python -m pip install mc-aprs
.venv/bin/python -m mc_aprs

The installation name is mc-aprs; the Python module name is mc_aprs.

The first time MC-APRS runs, it will create a sample mc-aprs.yaml file. Edit the sample, then run it again.

nano ~/.config/mc-aprs/mc-aprs.yaml
.venv/bin/python -m mc_aprs

By default, MC-APRS connects to the Companion over serial. Set meshcore_interface.device to the serial port (for example, /dev/ttyACM0) and ensure the account running MC-APRS has permission to access it. The serial baud rate defaults to 115200.

To connect over TCP instead, configure the host and port exposed by the MeshCore node:

meshcore_interface:
  type: tcp
  host: 192.168.1.50
  port: 5000

Replace the example address and port with the values for your node. The TCP port must be explicitly configured; MC-APRS does not assume a default. Use a trusted network or VPN and restrict access to the node's TCP port to trusted clients.

To enable periodic MeshCore Flood Advertisements from the Companion, set meshcore_interface.flood_advert: true. MC-APRS sends one when it connects, then every 12 hours. It is disabled by default.

Gateway APRS beacon coordinates are entered manually under gateway_beacon.latitude and gateway_beacon.longitude. MeshCore client position reports are not forwarded by this gateway.

Run MC-APRS as a systemd service

On Linux systems that use systemd, configure MC-APRS to start automatically at boot. This example assumes the package is installed in /home/YOUR_USER/.venv. Replace YOUR_USER with the Linux account that will run MC-APRS and adjust the paths if your virtual environment is elsewhere.

Install the published package in that account's virtual environment, then run MC-APRS once as that account to create the sample configuration. Edit the configuration before starting the service:

python3 -m venv /home/YOUR_USER/.venv
/home/YOUR_USER/.venv/bin/python -m pip install mc-aprs
/home/YOUR_USER/.venv/bin/python -m mc_aprs
nano /home/YOUR_USER/.config/mc-aprs/mc-aprs.yaml

For a serial connection, set meshcore_interface.device to the Companion's serial device. Ensure the service account has permission to access it; on Debian-based systems this commonly means adding the account to the dialout group:

sudo usermod -aG dialout YOUR_USER

For a TCP connection, configure meshcore_interface with type: tcp, host, and port as described above; serial-device permissions are not needed.

Create /etc/systemd/system/mc-aprs.service:

[Unit]
Description=MC-APRS MeshCore APRS gateway
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
User=YOUR_USER
Environment=HOME=/home/YOUR_USER
WorkingDirectory=/home/YOUR_USER
ExecStart=/home/YOUR_USER/.venv/bin/python -m mc_aprs
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Enable the service to start at boot and start it now:

sudo systemctl daemon-reload
sudo systemctl enable --now mc-aprs.service

Check the service status and view its logs with:

sudo systemctl status mc-aprs.service
sudo journalctl -u mc-aprs.service -f

After editing the service file, run sudo systemctl daemon-reload and restart the service. Restart the service after changing the configuration or adding the account to the serial device group.

Addressing APRS messages

Prefix a MeshCore message with the APRS destination callsign and a colon:

DEST-CALL: your message

After the first addressed message, replies can omit the destination prefix and will go to the last APRS station contacted by that MeshCore device. Text replies from APRS stations, including service error messages, are forwarded to the registered MeshCore device.

Compliance

MC-APRS only forwards messages from registered MeshCore contacts, attributing each forwarded message to a call sign. Channel messages are not forwarded. Messages sent from the gateway to APRS-IS are clear text, as is APRS traffic generally.

A Note for APRS-IS Admins

MC-APRS identifies itself to APRS-IS level 2 servers with the software version number APZMCG. In accordance with the Protocol Reference, APZ designates an experimental application in development; MCG identifies the MeshCore gateway.

License

MC-APRS is distributed under the terms of the MIT license.

Metadata

Release files for mc-aprs 0.0.1a29

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mc-aprs 0.0.1a29
File Size Uploaded Provenance Actions
mc_aprs-0.0.1a29.tar.gz 24.8 kB Without provenance Details for mc_aprs-0.0.1a29.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mc-aprs 0.0.1a29
File Interpreter ABI Platform Actions
mc_aprs-0.0.1a29-py3-none-any.whl Python 3 none any Details for mc_aprs-0.0.1a29-py3-none-any.whl

Total release size: 51.8 kB

Release files / mc_aprs-0.0.1a29.tar.gz

Download URL mc_aprs-0.0.1a29.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ae74f16dbe6afc2a49eb3f25d4c508a0d16e68e9250ac0525c52b7fef5f1e812
BLAKE2b-256 checksum
How to use checksums
eab86f56d56a6c6119925059d71e83cece5819f72c94e8e17770df677aec5a95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / mc_aprs-0.0.1a29-py3-none-any.whl

Download URL mc_aprs-0.0.1a29-py3-none-any.whl
Size 27.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4cb09c73b7c15fd8f7a8d065c3cdab25eb909c7327b0fabfe6acd101fd112361
BLAKE2b-256 checksum
How to use checksums
aacc7b447f6ff14e1fa5821ba82aad8c7d9779ce359b9d53a58ca54565df3b78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for mc-aprs 0.0.1a29

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page