Skip to content

Latest commit

 

History

History
321 lines (215 loc) · 13.1 KB

readme.md

File metadata and controls

321 lines (215 loc) · 13.1 KB

Ground Station

A simple and hackable python and linux based APRS IGate for receiving your balloons' tracking data via HAM.

For the balloon tracker, check the balloon-tracker page.

For tracking chase vehicles that aren't running this receiver or don't need to be, check vehicle-tracker.

For tracking the balloon once it has landed and triggering the cut-down burn wire, setup a handheld-locator

Table of Contents

1. Hardware

This is designed to be run with ARM-based linux machines and software-defined radios, although it can be hacked to work on other OSes and with hardware TNCs. Check EricAndrechek/aprs-receiver for a similar project but for the Kenwood TNC.

1.1. Computing Device

Normally a Raspberry Pi would be the suggested hardware for this, although they have gotten rather expensive lately, so something like the Libre Computer Board could be used instead. This is what it was tested and built on.

1.2. Software-Define Radio (SDR)

Check out this buying guide to determine exactly what you are looking for. For most APRS purposes (in the US), you want things that can receive at the 144.390MHz range. I have found much success with receivers with an RTL2832U chip.

Additionally you will need a good antenna for receiving from longer distances. Do note, that the antenna should not be any further from the USB than absolutely necessary, so if you need the USB receiver/antenna to be further from the computer, add a longer USB cable (or active USB cable if it is above 5m).

1.3. Internet Uplink

There are several different methods one could use to upload APRS and GPS data to the internet. This tools assumes all of that setup is done by the user and does not handle any of it. Everything should work fine so long as your device has an internet connection and has port 14580 open in the firewall.

1.3.1. SIM Card Hat

AT COMMANDS:

AT*MCGDEFCONT="IP","hologram" AT+CGDCONT=1,"IP","hologram"

1.4. Display

This program has an optional ability to start a web-server to show live stats about any call-signs you want it to track. This web interface can be viewed on other devices on the same network, can be shown on a display for the computer and optionally automatically launched in kiosk mode on-boot, or can be accessed over the internet by using a service like Cloudflare Tunnels.

While buying a display is not strictly necessary, it can make the initial setup process easier until SSH and tunnelling are all working, and can make debugging and reading in the field easier where cellular availability may not always exist.

1.5. GPS

This software can optionally integrate the same functionality as the vehicle-tracker. In order to track your receiver vehicle/device without separate vehicle-tracker hardware, you will need a USB-enabled GPS device. Ideally find one that says it supports linux so that you don't run into driver issues. Alternatively, if you are using a SIM hat, you can use the GPS on that.

1.6. Power

"Le Potato" board lists its power draw as:

  • 4W Full Load
  • 2.5W Typical Load
  • < 1W Idle
  • < 0.1 Wake Ready

2. Setup

2.1. Install Operating System

Download Raspberry Pi Imager from here.

Download the latest Raspberry Pi OS Full image from here if using Le Potato, or just directly from the imager if using a Raspberry Pi.

Plug a microSD of at least 8GB into your computer and open the imager.

Note: If you are using a Libre Computer Board, you will need to use the "Custom" option in the imager and select the correct image. The popup prompt asking if you would like to apply custom settings (such as hostname, wifi, etc.) can be skipped, as the Le Potato does not support these settings.

Once the image is written, plug the microSD into the device and boot it up.

2.2. Download & Install Dependencies

  1. Connect your device to the internet! For fellow people at the University of Michigan, you can connect following this article to register at netreg.engin.umich.edu. If using ethernet you may need to contact ITS.

  2. Install the necessary libraries and begin the setup process. You can either clone this repository and run the setup script, or follow the manual steps below.

2.2.1. Automatic Setup

git clone --no-checkout --depth=1 --filter=tree:0 https://github.com/EricAndrechek/trackuino-v2.git
cd trackuino-v2
git sparse-checkout set --no-cone ground-station
git checkout
cd ground-station
chmod +x setup.sh
./setup.sh

2.2.2. Manual Setup

  1. Update the OS and kernel to the newest version. This may take a while.
sudo apt update
sudo apt upgrade -y
sudo apt autoremove -y
  1. Install the necessary tools and libraries.
sudo apt install rtl-sdr multimon-ng sox -y
  1. Setup rtl udev rules to give proper access to the USB device.
wget https://github.com/osmocom/rtl-sdr/raw/master/rtl-sdr.rules
sudo mv rtl-sdr.rules /etc/udev/rules.d/
  1. Restart udev for the rule policy changes to take effect
sudo udevadm control --reload-rules
sudo udevadm trigger
  1. Now, we need to clone this repository (specifically the ground station functionality), and begin the setup.
git clone --no-checkout --depth=1 --filter=tree:0 https://github.com/EricAndrechek/trackuino-v2.git
cd trackuino-v2
git sparse-checkout set --no-cone ground-station
git checkout
cd ground-station

Your file structure should now look something like ~/trackuino-v2/ground-station/.

  1. Install the python dependencies
pip3 install -r requirements.txt
  1. Update the hostname and DNS by modifying /boot/efi/user-data and /boot/efi/network-config.

Hostname:

sudo nano /boot/efi/user-data

And it should include this line:

hostname: gs-1

DNS Servers:

sudo nano /boot/efi/network-config

Which should look something like:

version: 2
ethernets:
  eth0:
    dhcp4: true
    optional: true
    nameservers: 
      addresses: [1.1.1.1, 8.8.8.8]
  1. Edit the config.yml file to suit your needs. See this section for more information.

  2. Reboot! (sudo reboot)

2.3. (Optional) Setup Cloudflare Tunnel

Note: While not strictly necessary, this is strongly recommended as it enables troubleshooting and fixing devices while in the field remotely. It also makes managing a larger fleet of devices significantly easier.

For the purposes of this tutorial, we will be using Cloudflare, although none of the functionality baked into the code is Cloudflare-specific, so building your own tunnelling system with NGinx on a self-hosted server, or using a service like Tailscale is also an option.

Instead of following my steps, feel free to follow along with Cloudflare's official guide

The setup script will automatically prompt you and offer to install cloudflared for you, but if you want to do it manually, follow the instructions below.

Manual Cloudflare Tunnel Setup Create a new cloudflare tunnel and copy the install and run connectors commands
curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-arm64.deb

sudo dpkg -i cloudflared.deb

2.3.1. After installing cloudflared

  1. Create a new cloudflare tunnel and copy the install and run connectors commands, which should look something like this:
sudo cloudflared service install <long_id>
  1. Create a cloudflare zero-trust access policy for the tunnel

  2. Create a cloudflare zero-trust application for the tunnel (select self-hosted) and add the policy to it.

  3. (SSH only, not Web Interface) Go to the application's settings and turn on browser-rendering.

  4. Visit the application's URL in a browser and login with your access policy.

  5. (Optional) Create a new public hostname for the same tunnel for the web interface and repeat steps 2-5.

You should now be able to access your device via SSH with the cloudeflared proxy or SSH in the browser. If you are using the web interface, you should also be able to access it via the browser.

3. Additional Walk-Throughs

3.1. Config.yml Settings

Edit the config.yml file to suit your needs. The below (hidden) section documents in more detail what each section of the config outlines should the config file's comments not be sufficient.

config.yml settings TODO: config stuff here

3.2. Web-Interface Setup & Forwarding

4. Appendix

4.1. Direwolf Debugging

When multiple modems are configured per channel, a simple spectrum display reveals which decoders picked up the signal properly. | means a frame was received with no error. : means a frame was received with a single bit error. (FIX_BITS 1 or higher configured.) . means a frame was received with multiple errors. (FIX_BITS 2 or higher configured.) _ means nothing was received on this decoder.

Here are some samples and what they mean. | Only the center decoder (e.g. 1600/1800 Hz) was successful. |||__ 3 different lower frequency modems received it properly. Assuming USB operation, the transmitting station is probably a little low in frequency. ___|||: 3 different higher frequency modems received it with no error. The highest one received it with a single bit error.

Check out the resources below for additional information and readings:

4.2. Libraries

4.3. References

4.4. SDR Software

Ultimately, just follow this website list and use what works best for you: rtl-sdr.com/big-list-rtl-sdr-supported-software/

The applications I found the easiest and most useful were:

4.5. Related Works