a2d

a2d - APRS to DAPNET portal

a2d is an application for transmitting APRS messages to DAPNET pagers, dedicated to the HAM radio community usage.

Description

a2d utilizes the APRS API to retrieve APRS messages for a callsign and relays them to DAPNET for delivery to your pager device. It supports multiple SSIDs.

Prerequisites and Installation

  1. Ham Radio License: Ensure you hold a valid HAM radio license with a callsign. Transmitting signals complies with license regulations and local laws.

  2. APRS API Key: Register on aprs.fi with your callsign to generate a confidential API Key for downloading APRS messages. Keep this key private.

  3. DAPNET User and Password: Create a secure account on hampager.de for DAPNET. Additional steps may be required if you don’t have an approved DAPNET pager or transmitter.

  4. Debian System with Internet Connection: For optimal performance and convenience in HAM Radio applications, especially if you prefer a compact, standalone setup with internet access, we recommend using a Raspberry Pi. The Raspberry Pi offers a cost-effective solution that’s well-suited for these purposes.

Compatibility

  1. Python 3 and Other Dependencies: Ensure that Python 3 is available in your system to run a2d. All the required dependencies will be automatically installed during the a2d installation process. However, if you encounter any errors related to dependencies during the a2d installation, please make sure the following packages are available on your system in addition to Python 3:

    1. python3-cryptography
    2. python3-requests
    3. python3-flask
    4. python3-gunicorn
    5. nginx
    6. certbot
    7. python3-psutil
    8. python3-yaml

    Gunicorn serves as the WSGI server that powers the a2d user interface, while Nginx is used as a reverse proxy server. Certbot is essential for creating and maintaining the required SSL certificates.

    If you prefer to install dependencies manually, you can use the following commands to install from the apt repository:

    sudo apt update
    sudo apt install <package>
    sudo apt upgrade

    If you encounter any issues during installation, you can try running:

    sudo apt --fix-broken install

    This will help resolve any broken dependencies and ensure that a2d operates smoothly on your system.

Configuration and Usage

a2d is designed with a web UI.

Accessing a2d UI

Once a2d is installed, open a web browser on a computer connected to the local network and visit http://localhost:9331 or http://ipaddress:9331. The default a2d communication port is 9331 over http. Alternatively, you can access the a2d portal directly from the application list on your Linux GUI desktop after installing a2d.

Register PIN and Passphrase

Security is paramount in the a2d portal. Here’s how to safeguard your access:

PIN Registration: Choose a personalized six-digit PIN. If this is your first time, select “Register” on the login page to set your 6-digit PIN and Passphrase.

Logging In: After registration, use your assigned PIN to log in. The login session will automatically expire after 20 minutes of inactivity, ensuring the security of your data.

PIN Recovery: If you forget your PIN, use your Passphrase to create a new one. Click “Forgot PIN!” on the login page, verify with your Passphrase, and proceed to set a new PIN.

Note: There’s no Passphrase reset option. Removing and Reinstalling the a2d portal is the only recourse to reset your Passphrase (Warning: You will loose all your a2d data). After uninstalling a2d, please use the following command to remove any existing user configuration files before proceeding with the reinstallation.

sudo rm -r /etc/a2d

Dashboard Overview

a2d app offers three screen modes with Bootstrap v5.3 support: Light, Dark, and Auto.

Choose the mode that suits your preferences and enhances your interaction with the a2d app.

Setup Configuration

If it’s your first time, the dashboard will show ‘Setup Configuration’ instead of your Callsign. Click “Configuration” listed in options in the navigation bar to begin.

To complete setup:

  1. Enter your HAM radio callsign in ALL CAPS without any SSID for Callsign (no ssid).
  2. Input your APRS API Key from aprs.fi.
  3. Provide your DAPNET account username and password.
  4. Include your DAPNET transmitter group code. Each DAPNET transmitter belongs to a specific group. Find your code during transmitter configuration. You can find your transmitter group code when setting up your transmitter at hampager.de.
  5. Click “Set Config” to save.

Note: Your data is securely encrypted. In case of security concerns, regenerate keys on respective websites and change passwords.

Start/Stop Relay

Important: Setup Configuration before pressing ‘Start Relay’ button.

Advanced Options

Note: APRS servers block requests under 2 min. Please set intervals > 5 min for optimal performance.

If needed, modify in “Advanced Options” via “Options” in the navigation bar and selecting “Advanced.”

Backup/Restore Configuration

Once you’ve set up your a2d configuration, you can use the Backup/Restore in the navigation bar to safeguard your settings. Both actions—backup and restore—require Passphrase verification.

Backup: Create a backup of your a2d configuration files. The backup file’s name will be “a2d_config_backup.bin.” This file is encoded binary and holds your API credentials. Store it securely.

Restore: If you want to revert to a previous configuration, use the backup file to restore. However, be cautious. If the bin file has been tampered with, the restore won’t work, and using a modified bin file is strongly discouraged.

Note: Safeguard your settings with backups and restorations, but secure your bin file from unauthorized access and exercise caution to maintain the integrity of your a2d configuration.

Errors while Backup/Restore:

Message Structure

DAPNET paging messages are limited to 80 characters per message. To conserve space, a2d messages follow the structure given below and will be delivered to your pager:

SourceCall (DestinationSSID): Message

Example: NY3W-5(7): Hello OM!

Here, NY3W is the sender’s callsign, 7 is the SSID of the receiver’s (your) callsign (e.g., NY3W-7), and Hello OM! is the message. If the DestinationSSID displays 0, it means the message is targeted for your callsign without any SSID.

Server Settings

a2d offers server settings and advanced options for users who want to customize their server. Make changes cautiously. You can use a2d with its default settings for local access. If you want to access a2d from outside your network, you can do so by making careful adjustments to your router’s firewall settings.

Server Page Overview

Server Configuration

The server configuration allows you to modify a2d’s default server settings. a2d’s default settings include Listen Port: 9331, Server Name: _, and SSL disabled.

These settings have the potential to override your existing NGINX configuration, particularly if NGINX is configured for another application. If you are using NGINX for another application, it is strongly recommended to manually configure NGINX for a2d.

Desired Listen Port: You can choose the port number for a2d access. For standard HTTP, it’s port 80, and for HTTPS, it’s 443. Alternatively, you can select any other open port on your system. After changing the port, you’ll need to access a2d using the specified port.

Desired Server Name: You can set the server name to match your desired domain name. Ensure that the server name corresponds to your domain name, especially if you’ve enabled SSL, as it should match the Common Name (CN) in the SSL certificate.

Choosing SSL Certificates: a2d offers the option to create and use either Self-Signed SSL or Certificate Authority (CA) SSL certificates for your convenience. The difference between them is the appearance of a green lock symbol in the browser when you access them. Ensure that your server name matches the CN in your certificate before making a choice. Before selecting an SSL option, you need to create the certificates.

Creating Self-Signed SSL Certificate: In a2d, you can create and store one self-signed SSL certificate. There’s no limit to how many times you can create it. You can generate it through the “Self Signed SSL” link in the navigation bar or by clicking the green “Self Signed SSL” button inside Server Configuration. Self-Signed SSL certificates are not verified, so you’ll encounter an SSL security warning when accessing a2d in a web browser. You’ll need to bypass this warning to access a2d once Self-Signed SSL is enabled. Once you enabled SSL certificate access a2d through HTTPS.

Creating CA SSL Certificate: a2d offers the option to create CA SSL certificates directly through certbot and Let’s Encrypt within the a2d portal. You can create them via the “CA Signed SSL” link in the navigation bar or by clicking the green “CA Signed SSL” button inside Server Configuration. You can generate as many CA Signed SSL certificates as needed. Ensure that the Common Name (CN) matches your domain name. Once you’ve created your desired SSL certificate, you can return to Server Configuration to set it for a2d. After certificate creation, a2d uses certbot for auto-renewal. If you no longer need CA SSL certificates, a2d provides an option to delete them by clicking “Delete CA SSL” in the CA Signed SSL and selecting the certificate to remove.

Please note that Let’s Encrypt has a limit on duplicate certificates. For more details, refer to Let’s Encrypt’s documentation.

Firewall Settings: Understanding your firewall settings is crucial. Carefully open the necessary ports on your router to achieve the following:

  1. Access a2d from outside your network.
  2. Generate CA SSL certificates. Let’s Encrypt will use ports 80 and 443 to validate your server before issuing the certificate. If you have both IPv4 and IPv6, it’s strongly recommended to open required ports for both IPv4 and IPv6. After generating certificates you can safely close them and leave 443 open if you want remove access to a2d outside of your network.

In case you are unable to open the ports for some reason and cannot generate Let’s Encrypt certificates using the a2d portal, you can perform these tasks via the command line and adjust your DNS settings on your provider’s website. For certbot user guide, visit the Certbot user guide.

Resetting a2d portal

a2d provides a Reset Portal option that allows you to reset the portal and delete SSL certificates, if desired. You need to enter correct passphrase to reset the portal. You can choose to retain the SSL certificates during the factory reset. The Reset Portal option is available in the server page’s options. This action will delete all user files, configurations, and data. If you are accessing a2d via SSL during the reset, the server settings will revert to the default a2d settings, and you will need to access a2d through HTTP port 9331 after the reset.

Error Messages

Error messages play a crucial role in guiding you through issues. They appear in two places:

1. Service Status Container in the Dashboard

If you encounter any of these errors, you’ll see them next to “Status” in the Service Status container. To resolve, ensure accurate information in your configuration and restart the service.

DAPNET-related errors appear only when a new APRS message is received and a2d attempts to transmit it to DAPNET.

2. Error Messages Triggered by Click on the Dashboard

For these errors, you’ll see messages upon clicking. Solutions are provided below:

3. Error Messages during Server Settings and SSL Certificates

Other Unknown Errors and Troubleshooting:

If new messages aren’t reaching your DAPNET pager:

Potential Causes: Too frequent APRS requests, or issues with APRS or DAPNET servers.

Resolution: Confirm server functionality and your Configuration setup. If the problem persists, wait for a couple of runs, as a2d self-heals the database. If the issue continues, reinstall a2d to fix message database corruption. Database corruption may occur during message read/write interruptions, such as power outages, memory loss, or system failures.