Feature: Add package readsb-wiedehopf - #29411
billmcilhargey wants to merge 12 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a new OpenWrt package readsb-wiedehopf (wiedehopf fork of readsb) including procd integration, UCI configuration, USB hotplug handling, and a suite of operator-focused helper CLIs for setup, feeder management, UUID handling, and geoip location.
Changes:
- Introduces the
readsb-wiedehopfandviewadsb-wiedehopfpackages with build/install rules and postinst/prerm hooks. - Adds procd init script + USB hotplug logic and ships a default
/etc/config/readsbUCI config. - Adds helper tools (
readsb-setup,readsb-feeder,readsb-uuid,readsb-geoip) plus shared shell helper library and README documentation.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| utils/readsb-wiedehopf/Makefile | Defines the new packages, build flags, dependencies, and install/postinst hooks |
| utils/readsb-wiedehopf/README.md | Documents configuration model, wizard/CLI usage, hotplug behavior, and feeders |
| utils/readsb-wiedehopf/files/readsb.config | Ships default UCI config for the readsb main section |
| utils/readsb-wiedehopf/files/readsb.init | Adds procd init script wiring UCI → daemon flags + boot-time waits/reconciliation |
| utils/readsb-wiedehopf/files/readsb.hotplug | Adds USB hotplug handler to pin/unpin RTL-SDR devices and restart service |
| utils/readsb-wiedehopf/files/readsb.functions.sh | Shared shell library for logging, presets, health/stats parsing, and wizard helpers |
| utils/readsb-wiedehopf/files/readsb.setup | Adds a guided setup wizard plus --status/--health/--stats/--config modes |
| utils/readsb-wiedehopf/files/readsb.feeder | Adds feeder management CLI (add/set/enable/disable/remove/probe/health/url) |
| utils/readsb-wiedehopf/files/readsb.uuid | Adds UUID inspection/generation CLI with interactive and non-interactive modes |
| utils/readsb-wiedehopf/files/readsb.geoip | Adds geoip-based best-effort lat/lon population + self-test |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ADSBexchange.com statistics uploader for OpenWrt. Periodically reads aircraft.json from readsb (via readsb-wiedehopf), aggregates per-aircraft RSSI and counts, and POSTs the result to https://adsbexchange.com identified by the station UUID stored at readsb.main.uuid -- shared with readsb's BEAST connectors so a single `readsb-uuid` configures both. Procd-supervised bash uploader with no compile step. Configuration is UCI-only (/etc/config/adsbexchange-stats); the station UUID is shared with readsb-wiedehopf via readsb.main.uuid so a single identity is used by the BEAST feed connector and this uploader. Logging goes to syslog under the `adsbexchange-stats` tag at user-selectable verbosity. Hard-depends on readsb-wiedehopf (PR openwrt#29411) for the shared UUID, the readsb-uuid CLI, and /usr/lib/readsb/functions.sh. Upstream: https://github.com/ADSBexchange/adsbexchange-stats pinned at commit 11647f27. Upstream license preserved as MIT; OpenWrt packaging files are GPL-2.0-only. Signed-off-by: Dr Bill Mcilhargey <contributor@mcilhargey.com>
ADSBexchange.com statistics uploader for OpenWrt. Periodically reads aircraft.json from readsb (via readsb-wiedehopf), aggregates per-aircraft RSSI and counts, and POSTs the result to https://adsbexchange.com identified by the station UUID stored at readsb.main.uuid -- shared with readsb's BEAST connectors so a single `readsb-uuid` configures both. Procd-supervised bash uploader with no compile step. Configuration is UCI-only (/etc/config/adsbexchange-stats); the station UUID is shared with readsb-wiedehopf via readsb.main.uuid so a single identity is used by the BEAST feed connector and this uploader. Logging goes to syslog under the `adsbexchange-stats` tag at user-selectable verbosity. Hard-depends on readsb-wiedehopf (PR openwrt#29411) for the shared UUID, the readsb-uuid CLI, and /usr/lib/readsb/functions.sh. Upstream: https://github.com/ADSBexchange/adsbexchange-stats pinned at commit 11647f27. Upstream license preserved as MIT; OpenWrt packaging files are GPL-2.0-only. Signed-off-by: Dr Bill Mcilhargey <contributor@mcilhargey.com>
|
Marked the other package as ready for review, I was not sure if it should be left in draft stage or not, so shifted it to Ready for Review stage in case it was holding this package up Appreciate the time too! |
c4c33df to
76e5f22
Compare
|
Implemented recommended change by @Yang-Wei-Ting --update readsb-wiedehopf Makefile to set PKG_FORTIFY_SOURCE and adjust optimization flags Thank you! Ready for continued review |
|
@Yang-Wei-Ting - Just to follow-up this is ready for re-review and let me know if anything else is needed and appreciate it again! Also having copilot run one more review considering the changes I committed to give it one more review in the meantime in case anyone had any concerns Thank you again! |
eddfd11 to
7e78f38
Compare
|
Resolved GitHub Copilot review requests and all ready for any final reviews and approvals! Thank you again FYI @Yang-Wei-Ting |
7e78f38 to
1e99d57
Compare
|
This PR is stale because it has been inactive for 14 days and has the "not following guidelines" label. |
openwrt-ai
left a comment
There was a problem hiding this comment.
Fresh review of the full PR at 1e99d57. The package is written very defensively — input validation/sanitization in the helpers is thorough and error paths are handled well. No commit-message/diff mismatches (the empty commit bodies on 254f386 and 1e99d57 are already flagged by the openwrt formality check). Two inline notes below on packaging and on the automatic third-party geoip lookup.
Generated by Claude Code
|
This PR is stale because it has been inactive for 14 days and has the "not following guidelines" label. |
|
Finally catching up here and let me review the work here requested and work to implement! Thank you! |
7d52735 to
66066b0
Compare
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 2
Open (9)
The wizard passes user-entered values via an unquoted, space-joined string ($extras), which is… · Newreconcile_for_no_usb()unconditionally runsuci commit readsbwhen it makes changes, which will… Ifuci commit readsbfails here, the init script silently continues and then reloads… · Newuci commit readsbis not error-checked here. If the commit fails (e.g., overlay fs issues,… In this reconciler, threeuci setcalls (device_type,device,net_only) do not check for… Theuci setcalls fordevice_type,device, andnet_onlydon’t check return codes, but… For negative timeouts this logs warnings likenot ready within -1s, which is confusing given the… · New The remove-path message usesserial=$event_serialwithout a default, so it can render as… · Newreadsb_wait_until()treats negative timeouts as “immediate timeout” (because0 -ge -1), but…
Reconcile missing SDRs through checked private UCI updates, aborting startup on failed writes or commits without committing operator edits. Quote feeder wizard arguments and preserve successful feeder creation when optional setup fails. Support APK companion discovery and installation alongside opkg. Normalize nonpositive polling timeouts and missing serial diagnostics. Extend focused regressions, document both package backends, and bump the package release. Signed-off-by: Dr Bill Mcilhargey <contributor@mcilhargey.com>
|
Addressed the outstanding review recommendations in signed, signed-off commit b9a4935 on
Validation: 306 checks passed across feeder, runtime, companion, and GeoIP suites on LF-normalized Linux copies. Shell syntax checks passed; ShellCheck introduced no new findings versus the pre-change baseline. The real-UCI integration suite could not run because no UCI executable is available in this environment. No full OpenWrt SDK build or device test was performed. All 11 previously open review threads have been resolved. Thank you for the review. |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 1
Open (2)
Resolved since last review (9)
The wizard passes user-entered values via an unquoted, space-joined string ($extras), which is…reconcile_for_no_usb()unconditionally runsuci commit readsbwhen it makes changes, which will… Ifuci commit readsbfails here, the init script silently continues and then reloads…uci commit readsbis not error-checked here. If the commit fails (e.g., overlay fs issues,… In this reconciler, threeuci setcalls (device_type,device,net_only) do not check for… Theuci setcalls fordevice_type,device, andnet_onlydon’t check return codes, but… The remove-path message usesserial=$event_serialwithout a default, so it can render as… For negative timeouts this logs warnings likenot ready within -1s, which is confusing given the…readsb_wait_until()treats negative timeouts as “immediate timeout” (because0 -ge -1), but…
Disable pathname expansion while splitting extra_args and restore the caller shell state afterward. Cover literal wildcard arguments and the existing first-writer-wins option indirection with regressions. Retain release 1 for the package initial introduction. Signed-off-by: Dr Bill Mcilhargey <contributor@mcilhargey.com>
|
Additional recommendations addressed in signed, signed-off commit 00782e6 on
Validation: all 128 runtime checks passed under Linux sh, shell syntax checks passed, and ShellCheck introduced no new findings versus the previous commit. SDK/device validation was not performed. Both new review conversations are resolved. Local unrelated README formatting edits remain uncommitted. |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 2
Open (2)
Report timeout execution errors as indeterminate instead of treating them as connectivity failures. Preserve the original UCI test status when cleanup encounters missing directories or chmod/removal errors. Extend feeder and runtime regressions for tool-error statuses and the real cleanup handler without requiring a UCI executable. Signed-off-by: Dr Bill Mcilhargey <contributor@mcilhargey.com>
|
Addressed the latest recommendations in signed, signed-off commit f5a238c. Timeout execution errors (125/126/127) now return indeterminate rather than falsely reporting an unreachable feeder. UCI test cleanup preserves the original exit status despite missing directories or cleanup failures. Validation: 103 feeder checks and 143 runtime checks passed under Linux sh, including the extracted UCI cleanup handler; syntax checks pass and ShellCheck has no new findings. Full real-UCI integration and SDK/device testing were not rerun. Both new review threads are resolved. Ready for another review. |
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
- b9a4935 "readsb-wiedehopf: address startup and companion review feedback" bumps
PKG_RELEASEto 2, and 00782e6 "readsb-wiedehopf: keep extra arguments literal at startup" sets it back to 1. That pair cancels out, so squash it away. b9a4935 also adds the wizard'swiz_v_protocolvalidation, which its message does not mention, and its subject describes the process ("review feedback") rather than the change.
Generated by Claude Code
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 4
Open (4)
The package-wide default dependency set and globalTARGET_LDFLAGSforce-link-lncurses, which… · New The package-wide default dependency set and globalTARGET_LDFLAGSforce-link-lncurses, which… · New On thencpath,_probe_tcpreturnsnc’s raw exit code. Callers only treat0and2… · Newreadsb_sdr_serial_presentis called unconditionally even when$devicemay be empty. If… · New
Share probe exit-status mapping between timeout and netcat, keeping execution errors indeterminate instead of reporting unreachable hosts. Avoid checking SDR serial presence when no device is selected during removal, and add focused regressions for both behaviors. Retain the required ncurses dependency for the upstream shared binary. Signed-off-by: Dr Bill Mcilhargey <contributor@mcilhargey.com>
|
Published signed, signed-off commit 5cbce77. Netcat and timeout now share exit-status mapping, so execution errors remain indeterminate rather than false connectivity failures. Hotplug removal skips serial checks for an empty device pin. The ncurses dependency is retained because upstream 3.16.11 builds viewadsb by copying the same fully linked readsb binary; evidence is posted in both duplicate threads. Validation: 106 feeder and 144 runtime checks passed under Linux sh, with no new ShellCheck findings. SDK/device and full real-UCI integration testing were not rerun. All four reviewed threads are resolved. Ready for another review. |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 2
Open (2)
Resolved since last review (4)
readsb_sdr_serial_presentis called unconditionally even when$devicemay be empty. If… On thencpath,_probe_tcpreturnsnc’s raw exit code. Callers only treat0and2… The package-wide default dependency set and globalTARGET_LDFLAGSforce-link-lncurses, which… The package-wide default dependency set and globalTARGET_LDFLAGSforce-link-lncurses, which…
| # --- command: --list ------------------------------------------------------- | ||
| cmd_list() { | ||
| local main_uuid total=0 | ||
| main_uuid=$(uci -q get readsb.main.uuid) |
|
|
||
| # readsb-uuid -- inspect / generate / regenerate the station UUID. | ||
| # | ||
| # Manages the station UUID stored in readsb.@readsb[0].uuid (i.e. |
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 1
Open (4)
In the multi-SDR path,want_serialis derived fromfreq_cfg, but whenoption freqis unset… · New The comment says the USB-settle wait is only honored when a section setsoption hotplug 1, but… · New The header comment claims the UUID is stored inreadsb.@readsb[0].uuid, but the script actually… This (and similar call sites in the same script) hard-codes the main section asreadsb.main.uuid.…
| elif [ "$sdr_count" -gt 1 ]; then | ||
| # Multi-SDR auto-pin by serial-matches-freq convention. | ||
| # Recipe in README.md ("Multi-SDR setup"). | ||
| config_get freq_cfg "$target" freq | ||
| want_serial=$(readsb_freq_to_mhz "$freq_cfg") | ||
| device_freq="" | ||
| [ -z "$device" ] || device_freq=$(readsb_freq_to_mhz "$device") | ||
| match="" | ||
| if [ -n "$want_serial" ] \ | ||
| && readsb_sdr_serial_present "$want_serial"; then | ||
| match=$want_serial | ||
| fi | ||
| if [ -n "$match" ]; then | ||
| pin_device "$match" || exit 1 | ||
| _debug "hotplug: $sdr_count RTL-SDRs attached; selected device='$match' by serial-matches-freq convention (freq=${freq_cfg:-1090})" | ||
| elif [ -n "$device" ] && readsb_sdr_serial_present "$device" \ | ||
| && { [ -z "$device_freq" ] || [ "$device_freq" = "$want_serial" ]; }; then | ||
| _warn "hotplug: no serial matches freq=${freq_cfg:-1090}; keeping attached automatic serial '$device'" | ||
| else | ||
| pin_device "" || exit 1 | ||
| _warn "hotplug: $sdr_count RTL-SDRs attached ($(readsb_list_sdrs | tr '\n' ' ')); no serial matches freq=${freq_cfg:-1090}; staying net-only until a device is selected (tip: 'rtl_eeprom -s 1090' to label by frequency, or set 'option device <serial>')" | ||
| fi |
| } | ||
|
|
||
| # --- USB-settle wait ------------------------------------------------------- | ||
| # Off by default. Honored when at least one section sets `option hotplug 1`. |
openwrt-ai
left a comment
There was a problem hiding this comment.
Commit checks
- 5cbce77 "readsb-wiedehopf: normalize netcat failures and guard empty pins": the paragraph "Retain the required ncurses dependency for the upstream shared binary." describes no change in this commit (the Makefile is untouched). Drop it.
Generated by Claude Code



📦 Package Details
Maintainer: @billmcilhargey
Description:
New package
readsb-wiedehopf— a Mode-S / ADS-B / TIS decoder forRTL-SDR and other SDR devices. This is the wiedehopf fork of
readsb, an actively maintained
alternative to the existing
readsbpackage (which tracks thenow-archived Mictronics upstream).
It adds many features required by modern aggregators:
It is the upstream used by
tar1090,adsb.lol,airplanes.live,adsb.fiand similar projects.The package:
/usr/bin/readsband a companionviewadsb-wiedehopfpackage providing
/usr/bin/viewadsbPROVIDES:=readsb/CONFLICTS:=readsb(and the same forviewadsb) so either fork can satisfy areadsbdependency, butnot both at once
/etc/config/readsb), a procd init script,USB hotplug glue, and an interactive
readsb-setupwizard plusreadsb-uuid/readsb-geoip/readsb-feederhelpers under/usr/sbin/The existing
readsbpackage and its maintainer are not touched.🧪 Run Testing Details
Build verified with
make package/readsb-wiedehopf/{clean,compile} V=sagainst the 23.05 SDK for
ipq60xx/generic.Runtime verified on a GL-AXT1800 (
GL Technologies, Inc. AXT1800,hostname
GL-AXT1800, uptime 1d 0h at time of test): the daemon isenabled and started by procd via
/etc/init.d/readsb, decodes Mode-Sframes from an attached RTL-SDR over USB (hotplug binds correctly),
JSON output is served on the configured port, and
readsb-setupwalks through location / UUID / SDR / feeder configuration without
errors.
viewadsb-wiedehopfconnects to the local daemon and rendersthe live aircraft list.
✅ Formalities
If your PR contains a patch:
git am