No description
  • Shell 92%
  • Dockerfile 8%
Find a file
2026-02-16 12:13:35 +01:00
config initial commit 2026-02-16 11:49:27 +01:00
.gitignore initial commit 2026-02-16 11:49:27 +01:00
compose.yml compose and readme update 2026-02-16 12:13:35 +01:00
Dockerfile initial commit 2026-02-16 11:49:27 +01:00
entrypoint.sh initial commit 2026-02-16 11:49:27 +01:00
example.env initial commit 2026-02-16 11:49:27 +01:00
README.md compose and readme update 2026-02-16 12:13:35 +01:00

OGN Docker Receiver

Dockerized OGN (Open Glider Network) / FLARM receiver using official Glidernet binaries.

Prerequisites

  • Docker and Docker Compose installed
  • RTL-SDR dongle for 868 MHz reception
  • Antenna optimized for 868 MHz
  • (Optional) Running alongside SDR-Enthusiasts ADS-B stack

Companion Stack

This OGN receiver is designed to run alongside a companion ADS-B stack:

  • OGN / FLARM receiver (this repository): ~868 MHz, FLARM / OGN protocol
  • ADS-B receiver: LSV-Linkenheim/adsb_docker - 1090 MHz (and optionally 978 MHz), ADS-B Mode-S

Both stacks perform similar roles (receiving and forwarding flight information) but for different radio bands and networks. They can safely share the same host as long as each SDR has a unique, frequency-encoded serial number (e.g., 00868000 for OGN/FLARM and 01090000 for ADS-B).

Quick Start

0. Blacklist Kernel Modules (Required)

IMPORTANT: Before plugging in your RTL-SDR dongle, you must blacklist kernel modules on the host system. Otherwise, the host kernel will claim the device and prevent Docker containers from accessing it.

This step is required and only needs to be done once on the host system.

On the Host System:

  1. Create the blacklist file:

    sudo tee /etc/modprobe.d/exclusions-rtl2832.conf <<EOF
    # Blacklist host from loading modules for RTL-SDRs to ensure they
    # are left available for the Docker guest.
    
    blacklist dvb_core
    blacklist dvb_usb_rtl2832u
    blacklist dvb_usb_rtl28xxu
    blacklist dvb_usb_v2
    blacklist r820t
    blacklist rtl2830
    blacklist rtl2832
    blacklist rtl2832_sdr
    blacklist rtl2838
    
    # Prevent modules from being loaded as dependencies
    install dvb_core /bin/false
    install dvb_usb_rtl2832u /bin/false
    install dvb_usb_rtl28xxu /bin/false
    install dvb_usb_v2 /bin/false
    install r820t /bin/false
    install rtl2830 /bin/false
    install rtl2832 /bin/false
    install rtl2832_sdr /bin/false
    install rtl2838 /bin/false
    EOF
    
  2. Unload any currently loaded modules:

    sudo modprobe -r dvb_core dvb_usb_rtl2832u dvb_usb_rtl28xxu dvb_usb_v2 r820t rtl2830 rtl2832 rtl2832_sdr rtl2838 2>/dev/null || true
    
  3. Rebuild module dependency database:

    sudo depmod -a
    
  4. Update boot image (if supported):

    sudo update-initramfs -u 2>/dev/null || true
    
  5. Reboot your system to ensure modules are blacklisted:

    sudo reboot
    

Note: If you're already running the SDR-Enthusiasts ADS-B stack, you may have already done this step. You can skip it if /etc/modprobe.d/exclusions-rtl2832.conf already exists.

1. Clone and Configure

git clone <repository-url>
cd ogn_docker
cp example.env .env

Edit .env to configure your setup:

  • SDR_SERIAL: OGN SDR serial number (default: 00868000 for 868 MHz)
  • PROGRAM_SDR_SERIAL: Set to true to auto-program SDR serial on startup
  • USE_RPI_GPU: GPU acceleration for Raspberry Pi (auto, yes, or no)

2. Configure Your Receiver

Copy and edit the configuration file:

cp config/example-rtlsdr-ogn.conf config/rtlsdr-ogn.conf

Edit config/rtlsdr-ogn.conf with your settings:

  • APRS Call: Your callsign or station identifier (max 9 characters)
  • Position: Your antenna coordinates (Latitude, Longitude, Altitude)
  • DeviceSerial: Your SDR serial number (default: 00868000)

3. SDR Serial Number Setup

IMPORTANT: When running alongside an ADS-B stack, you must assign unique serial numbers to avoid conflicts.

The container can automatically program your SDR serial number on startup:

  1. IMPORTANT: Only connect your OGN SDR (868 MHz) to the host. Disconnect any ADS-B SDRs (1090 MHz) to avoid accidentally reprogramming them.

  2. Edit .env to enable automatic programming:

    # In .env file
    SDR_SERIAL=00868000
    PROGRAM_SDR_SERIAL=true
    
  3. Note: SDR programming may require privileged: true in compose.yml. If programming fails, try:

    privileged: true
    
  4. Start the container - it will program the SDR automatically on first run.

Option B: Manual Programming

If you prefer to program manually before starting the container:

  1. Identify your SDR devices:

    rtl_eeprom
    
  2. IMPORTANT: Only connect your OGN SDR (868 MHz). Disconnect ADS-B SDRs.

  3. Program your OGN SDR serial number:

    sudo rtl_eeprom -s 00868000
    
  4. Program your ADS-B SDR (1090 MHz) with a different serial:

    sudo rtl_eeprom -s 01090000
    
  5. Update .env to match your programmed serial:

    # In .env file
    SDR_SERIAL=00868000  # Must match your programmed serial
    

4. (Optional) Raspberry Pi GPU Acceleration

For Raspberry Pi hardware, the container auto-detects and uses GPU-accelerated binaries:

  • Auto-detection (default): Automatically uses RPI-GPU version on Raspberry Pi
  • Force GPU: Set USE_RPI_GPU=yes in .env
  • Disable GPU: Set USE_RPI_GPU=no in .env
  • Note: RPI-GPU version may require privileged: true for GPU device access

5. Start the Container

docker compose up -d

View logs:

docker compose logs -f

Configuration

Config File Format

The config file uses a structured format with sections:

  • RF: Frequency correction, device selection, GSM calibration, OGN settings
  • Demodulator: Frequency tolerance and detection thresholds (optional)
  • Position: Antenna coordinates (required)
  • APRS: Callsign/station name (required)

See config/example-rtlsdr-ogn.conf for a complete example.

Frequency Calibration

For accurate reception, you may need to calibrate your SDR's frequency offset:

  1. Connect to the running container:

    docker compose exec ogn bash
    
  2. Run GSM scan to measure frequency correction:

    cd /usr/local/bin/rtlsdr-ogn
    ./gsm_scan --ppm 50 --gain 20
    
  3. Update FreqCorr in your config file with the measured PPM value.

Troubleshooting

Container won't start

  • Check that config/rtlsdr-ogn.conf exists and is properly formatted
  • Verify SDR device is connected: lsusb | grep RTL
  • Check logs: docker compose logs

"Cannot open device" errors

  • Verify kernel modules are blacklisted (see Step 0 above)
  • Check if host kernel claimed the device: lsmod | grep rtl2832
  • Verify SDR serial number matches SDR_SERIAL in .env
  • Ensure only one SDR is connected (or use serial numbers to distinguish)
  • Check USB device permissions
  • Unload modules if loaded: sudo modprobe -r rtl2832 dvb_usb_rtl2832u

Config file errors

  • Ensure config file uses the structured format (see example)
  • Check that all required sections are present (RF, Position, APRS)
  • Verify coordinates and callsign are set

References