¿ªÔÆÌåÓý

Containerized (Docker) APRS tracker with DireWolf


 

Hi all,

I've been building an APRS tracker for Raspberry Pi and other small SBCs, and (mainly because I've been doing this for a whole bunch of ADSB/ACARS/AIS-related software as well), I have created a containerized version of this.
The Docker container includes GPSD (to capture GPS data from a USB-based GPS dongle), Chrony (to set the system time based on the GPS data), and (of course) DireWolf configured as a tracker. The advantage of Docker is that it creates a (sort-of) VM environment that is easy to configure, deploy, and maintain/update.

My idea was to automate the configuration as much as possible. For "normal" deployments:
  • the container figures out the soundcard config
  • you can (in most cases) set the TX and RX audio levels with an environment parameter as simple %full-scale. This takes away the need to do much sleuthing with `alsamixer` and the like.
  • it detects which USB2Serial port the GPS is using
  • it monitors the serial port as I found that my GPS randomly disconnects and reconnects to a different /dev/ttyACMx port
  • it abstracts several of the necessary APRS tracker parameters into the `docker-compose.yml` config file
I've set it up so all data is written to a minimal set of directories that can easily be mapped to `tmpfs` (RAM), so we can lock down the rest of the OS to protect the SD card when the SBC goes down because the car power goes away. I've tested it (a bit) on Raspi3B+, Raspi4B, LePotato, and OrangePi boards, using Raspberry Pi OS (32 and 64 bits), DietPi (arm64), and "pure" minimalist Debian (on the LePotato board). They all work more or less the same.

So far so good and the basics work fine. There are a few things I still want to tackle:
  • I need to figure out what is causing these random disconnects/reconnects of the GPS. Maybe it's just because it's a cheap dongle?
  • My soundcard dongle will only work in RX sampling rate of 48k. The only way I get DireWolf to decode is by adding `-r 48000` to the command line. I have not been able to figure out how to lower the sampling rate of the audio device
  • Right now, only an `armhf`, `arm64`, and `amd64` image is available. Specifically, there's no `armel` image which makes the container incompatible with some of the older/lower-end Raspi's. This has nothing to do with DireWolf, it's related to something else that I simply haven't prioritized to solve (specifically, I use S6 version 3 which doesn't work by default on `armel` or `i386`)
  • I need to pay some attention to my hardware. The Baofeng UV-5R I'm using with APRS-K2 cable and Vox for PTT control is obviously nowhere close to ideal
  • Need to "harden" the OS so it's safe with hard power-downs
If you are interested, feel free to take a look here:??

73,

Ramon KX1T

Join [email protected] to automatically receive all group messages.