AvioADSB
All posts

acars_router: Feed ACARS, VDL2 and HFDL to Several Sites

One acars_router container takes acarsdec, dumpvdl2 and dumphfdl and forwards to airframes.io and AvioADSB. Full compose file, port table and fixes.

acars_router is a small container that sits between your datalink decoders and the sites you feed. The decoders send to it once, and it forwards each message to as many aggregators as you list. This guide sets up one acars_router that receives from acarsdec (VHF ACARS), dumpvdl2 (VDL Mode 2) and dumphfdl (HFDL) and sends to airframes.io and AvioADSB side by side.

What acars_router does

The acars_router README describes three jobs: receive messages from decoders, optionally drop duplicates, and send them on to other hosts. For you the useful part is the last one. Your decoders keep one output, and adding or removing an aggregator later is one line in one file.

Three things to know before the compose file:

  • A single AR_SEND_* variable carries one transport (UDP or TCP) for one message type. Several targets of the same transport go in the same variable, separated by a semicolon (;). The README says "Each destination should be separated by a ;."
  • By default acars_router listens on port 5550 for ACARS, 5555 for VDLM2 and 5556 for HFDL, on both UDP and TCP. The ZeroMQ serve ports are 45550, 45555 and 45556. All ports are configurable.
  • AR_ENABLE_DEDUPE defaults to false. Turn it on if more than one decoder can hear the same transmission (for example two dongles on the same channel).

Receiving and sharing these transmissions is regulated differently from country to country. Check the rules where you live; this is not legal advice.

Where each site listens

SiteACARSVDL Mode 2HFDL
airframes.io (feed.airframes.io)UDP 5550UDP 5552 or TCP 5553TCP 5556
AvioADSB (feed.avioadsb.org)TCP 31005TCP 31006TCP 31007

Sources: the airframes.io aggregator page and the AvioADSB ACARS, VDL Mode 2 and HFDL pages. AvioADSB accepts TCP only. UDP does not reach it.

That gives these acars_router lines:

Message typeLines to add to the acars_router environment
ACARSAR_SEND_UDP_ACARS=feed.airframes.io:5550 and AR_SEND_TCP_ACARS=feed.avioadsb.org:31005
VDL Mode 2AR_SEND_TCP_VDLM2=feed.airframes.io:5553;feed.avioadsb.org:31006
HFDLAR_SEND_TCP_HFDL=feed.airframes.io:5556;feed.avioadsb.org:31007

ACARS needs two lines because airframes.io takes it over UDP and AvioADSB over TCP. VDL Mode 2 and HFDL are TCP at both, so one line each is enough.

A complete docker-compose.yml

This file runs acarsdec on one RTL-SDR, dumpvdl2 on a second, and acars_router. The dumphfdl block is optional: it needs an SDR that tunes HF and an HF antenna, so delete the block if you do not have one. The images support amd64 and arm64 only, so on a Raspberry Pi you need a 64-bit OS.

Replace the values in angle brackets. Give each RTL-SDR its own serial number (set with rtl_eeprom -s) so the containers do not fight over the same dongle. Use frequencies that are active in your area.

services:
  acarsdec:
    image: ghcr.io/sdr-enthusiasts/docker-acarsdec:latest
    container_name: acarsdec
    restart: always
    device_cgroup_rules:
      - "c 189:* rwm"
    volumes:
      - /dev/bus/usb:/dev/bus/usb:ro
    environment:
      - TZ=Etc/UTC
      - RTL_SERIAL=<acars-dongle-serial>
      - FEED_ID=<station-name>
      - FREQUENCIES=130.025 130.450 131.125 131.550
      - OUTPUT_SERVER=acars_router
      - OUTPUT_SERVER_PORT=5550
      - OUTPUT_SERVER_MODE=tcp
    tmpfs:
      - /run:exec,size=64M
      - /var/log

  dumpvdl2:
    image: ghcr.io/sdr-enthusiasts/docker-dumpvdl2:latest
    container_name: dumpvdl2
    restart: always
    device_cgroup_rules:
      - "c 189:* rwm"
    volumes:
      - /dev/bus/usb:/dev/bus/usb:ro
    environment:
      - TZ=Etc/UTC
      - RTL_SERIAL=<vdl2-dongle-serial>
      - FEED_ID=<station-name>
      - FREQUENCIES=136.725 136.975 136.875
      - ZMQ_MODE=server
      - ZMQ_ENDPOINT=tcp://0.0.0.0:45555
    tmpfs:
      - /run:exec,size=64M
      - /var/log

  # OPTIONAL: HFDL. Delete this whole block if you have no HF receiver.
  dumphfdl:
    image: ghcr.io/sdr-enthusiasts/docker-dumphfdl:latest
    container_name: dumphfdl
    restart: always
    device_cgroup_rules:
      - "c 189:* rwm"
    volumes:
      - /dev:/dev:ro
    environment:
      - TZ=Etc/UTC
      - SOAPYSDRDRIVER=driver=airspyhf
      - GAIN_TYPE=--gain
      - GAIN=<gain-for-your-sdr>
      - SOAPYSAMPLERATE=768000
      - FEED_ID=<station-name>
      - ZMQ_MODE=server
      - ZMQ_ENDPOINT=tcp://0.0.0.0:45556
    tmpfs:
      - /run:exec,size=64M
      - /var/log

  acars_router:
    image: ghcr.io/sdr-enthusiasts/acars_router:latest
    container_name: acars_router
    restart: always
    environment:
      - TZ=Etc/UTC
      - AR_ENABLE_DEDUPE=true
      # ACARS arrives from acarsdec over TCP on 5550 (the default listen port).
      # airframes.io takes ACARS over UDP, AvioADSB over TCP: two lines.
      - AR_SEND_UDP_ACARS=feed.airframes.io:5550
      - AR_SEND_TCP_ACARS=feed.avioadsb.org:31005
      # VDL Mode 2: read dumpvdl2's ZeroMQ output, send TCP to both.
      - AR_RECV_ZMQ_VDLM2=dumpvdl2:45555
      - AR_SEND_TCP_VDLM2=feed.airframes.io:5553;feed.avioadsb.org:31006
      # OPTIONAL: HFDL. Delete these two lines together with the dumphfdl block.
      - AR_RECV_ZMQ_HFDL=dumphfdl:45556
      - AR_SEND_TCP_HFDL=feed.airframes.io:5556;feed.avioadsb.org:31007
    tmpfs:
      - /run:exec,size=64M
      - /var/log

Start it with docker compose up -d.

The decoders reach acars_router in two ways. docker-acarsdec can send to it directly: OUTPUT_SERVER, OUTPUT_SERVER_PORT and OUTPUT_SERVER_MODE (udp, tcp or zmq) are documented in the docker-acarsdec README. The dumpvdl2 and dumphfdl containers publish ZeroMQ, and acars_router connects to them with AR_RECV_ZMQ_VDLM2 and AR_RECV_ZMQ_HFDL. The ZMQ port number is your choice as long as both sides use the same one.

If you also want a local web view of the messages, ACARS Hub can read from the same router over ZeroMQ: see ACARS Hub on a Raspberry Pi.

Station names

FEED_ID is written into every message, and it is the name you will use to claim the station on AvioADSB. Use one name, such as <station-name>, for all three decoders if they belong to one site. Two router options affect names:

  • AR_OVERRIDE_STATION_NAME replaces the station name in every message that passes through, whatever the decoder wrote. Set it if you want one fixed name everywhere.
  • AR_ADD_PROXY_ID (default true) marks each message as having passed through acars_router. Leave it at the default.

Using acars_router with native decoders

Decoders installed without Docker can still use the router. The constraint is on the decoder side: acarsdec 4.x and dumpvdl2 cannot send TCP, so they send UDP to a router on the same machine (127.0.0.1), and the router forwards TCP. dumphfdl can send TCP itself.

Run the router on the host network so it can listen on the default ports:

services:
  acars_router:
    image: ghcr.io/sdr-enthusiasts/acars_router:latest
    container_name: acars_router
    restart: always
    network_mode: host
    environment:
      - AR_ENABLE_DEDUPE=true
      - AR_SEND_UDP_ACARS=feed.airframes.io:5550
      - AR_SEND_TCP_ACARS=feed.avioadsb.org:31005
      - AR_SEND_TCP_VDLM2=feed.airframes.io:5553;feed.avioadsb.org:31006

Then point each decoder at it:

# VHF ACARS (acarsdec 4.x): UDP to the local router, port 5550
acarsdec -i <station-name> --output json:udp:host=127.0.0.1,port=5550 --rtlsdr 0 130.025 130.450 131.125 131.550

# VDL Mode 2 (dumpvdl2): UDP to the local router, port 5555
dumpvdl2 --rtlsdr 1 --gain 40 --station-id <station-name> \
  --output decoded:json:udp:address=127.0.0.1,port=5555 \
  136725000 136975000 136875000

# HFDL (dumphfdl): TCP straight to both sites, no router needed
dumphfdl --soapysdr driver=airspyhf --sample-rate 384000 \
  --station-id <station-name> \
  --output decoded:json:tcp:address=feed.airframes.io,port=5556 \
  --output decoded:json:tcp:address=feed.avioadsb.org,port=31007 \
  8927 8912 8894 8843 8834

The UDP hop to 127.0.0.1 stays on your machine. Only TCP leaves it for AvioADSB. The flags come from the acarsdec, dumpvdl2 and dumphfdl READMEs and the airframes.io decoder guides; check --help on your build.

Add or remove a target later

Edit the AR_SEND_* line and run docker compose up -d again. The decoders keep running. To drop AvioADSB, delete its entry from the line (and the whole line for ACARS). To add a third destination of the same transport, append it after a semicolon, for example AR_SEND_TCP_VDLM2=feed.airframes.io:5553;feed.avioadsb.org:31006;<host>:<port>.

adsb.im does not send datalink to AvioADSB. For ACARS, VDL Mode 2 and HFDL you set up the stack above.

Check that it works

  1. Run docker logs -f acars_router. You should see messages arriving from the decoders and no repeated connection errors to the targets. For more detail, raise AR_VERBOSITY as described in the README.
  2. Open your station on app.airframes.io/stations.
  3. Open avioadsb.org/feed-status from the same network (same public IP) as the receiver. It shows the link and how many messages arrived in the last hour. VHF can be sparse and HFDL slow, so allow a few minutes, up to an hour for HF.
  4. Watch the live datalink page for messages from your area.

Claim the station

Create an account, open the dashboard from the same network while the station is sending, and add it by its station name (the FEED_ID, or AR_OVERRIDE_STATION_NAME if you set it). Details are on the ACARS page.

Troubleshooting

  • Nothing reaches AvioADSB, but airframes.io works. Check the transport. AvioADSB takes TCP only, so AR_SEND_UDP_ACARS=feed.avioadsb.org:31005 sends into the void. Use AR_SEND_TCP_ACARS.
  • Nothing reaches airframes.io for ACARS. Port 5550 there is UDP. AR_SEND_TCP_ACARS=feed.airframes.io:5550 will not work. Use AR_SEND_UDP_ACARS.
  • Only one of two targets works. The separator must be a semicolon, not a comma or a space. Also check that both targets in one variable use the same transport.
  • Fewer messages than expected. With AR_ENABLE_DEDUPE=true the router drops a message it has already seen within the dedupe window (2 seconds by default). That is intended when two receivers overlap. If you run only one decoder per band, turning dedupe off changes little.
  • The station cannot be found on the dashboard. The name must match FEED_ID (or the override), and you must open the dashboard from the same public IP while the feed is sending.
  • Connection refused or timeouts. Check that your firewall allows outbound TCP to feed.avioadsb.org on 31005, 31006 and 31007, and to feed.airframes.io on the ports above (UDP 5550 for ACARS).
  • A container exits at start on a Raspberry Pi. The images are amd64 and arm64 only. A 32-bit Raspberry Pi OS cannot run them.

Next

The feed hub at getting-started lists every protocol AvioADSB accepts. When the router is running, check the result at avioadsb.org/feed-status, then add the station to your account on the dashboard as described above.