Systemd services and scripts for an ADS-B receiver running on a Hyper-V virtual machine (Debian), with an RTL-SDR attached over USB/IP from the host.
- Hypervisor: Hyper-V (Windows host)
- Guest OS: Debian
- SDR: RTL-SDR connected to host, shared into VM via usbip
- Software: readsb, tar1090, graphs1090, fr24feed, adsbexchange
Attaches the RTL-SDR from the host into the VM via usbip on boot. Runs scripts/usbip-attach-rtlsdr, which looks up the bus ID dynamically so a host reboot that re-enumerates the dongle doesn't break the attach.
Queries usbip list -r $HOST for the device matching VID:PID 0bda:2832 and attaches whatever bus ID it's currently exported at. Edit HOST and VENDOR at the top to match your setup. Used by both usbip-rtlsdr.service and scripts/usbip-watchdog.
Daemon that checks the usbip connection every 10 seconds. If the connection is stale or lost (e.g. after host reboot while VM was suspended), it detaches any dead ports, reattaches the device via usbip-attach-rtlsdr, and restarts readsb.
Deploy:
cp scripts/usbip-attach-rtlsdr /usr/local/sbin/usbip-attach-rtlsdr
cp scripts/usbip-watchdog /usr/local/sbin/usbip-watchdog
chmod 755 /usr/local/sbin/usbip-attach-rtlsdr /usr/local/sbin/usbip-watchdog
cp systemd/usbip-rtlsdr.service systemd/usbip-watchdog.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable --now usbip-rtlsdr.service usbip-watchdog.service
Logs: journalctl -t usbip-watchdog -f
Maintains a persistent SSH tunnel to a remote aggregation host, with reverse port forwards for the web UI and a local forward for BEAST data ingestion. ssh-forward.service pipes BEAST frames through adsb_batcher.py and into the tunnel.
Edit ssh-master.service — replace USER, REMOTE_HOST, REMOTE_PORT, and VPN_IP with your values.
Installed by the Flightradar24 package. Included here for reference.
Installed by the adsbexchange package. Included here for reference.
Reads a BEAST-format stream from stdin, parses frames, filters by ICAO address (populate IGNORE with any addresses you want dropped), and writes batched output to stdout.
Pipes the local BEAST TCP stream through adsb_batcher.py and into the SSH tunnel via netcat.