Updates and Maintenance
The Basic Settings section of Network → Bandix → Settings contains the maintenance tools: version display, the built-in updater, clearing stored traffic data, restarting the service, and a feedback link. This page explains what each one does on the router.
Version
The Version field shows the installed versions of luci-app-bandix and bandix, read by getVersion from the package database:
- with opkg:
/usr/lib/opkg/info/<package>.control, falling back toopkg list-installed; - with apk: the installed-packages database, falling back to
apk list --installed --manifest.
The backend version additionally falls back to the backend's /api/version endpoint. A value of Unknown means none of these worked; see Troubleshooting.
Check for Updates
Check for Updates runs checkUpdate on the router. It:
- Detects the package manager:
apkif theapkcommand exists, otherwiseopkg. - Detects the architecture from
OPENWRT_ARCHin/etc/os-release, falling back touname -m. - Reads the installed versions.
- Queries the GitHub API for the latest release of
timsaya/luci-app-bandixandtimsaya/openwrt-bandix(10-second connect timeout, 30 seconds overall each). - Compares versions with
sort -V, after stripping a leadingvfrom the release tag. An update is reported when the installed version sorts lower than the latest. - Picks the download asset matching the package manager:
- LuCI app: first an architecture-independent package whose name matches
luci-app-bandix…_all.ipk/luci-app-bandix-…-all.apk, otherwise one containing_<arch>.; - backend: a package starting with
bandix-orbandix_, containing_<arch>.and ending in.ipkor.apk.
- LuCI app: first an architecture-independent package whose name matches
The result dialog shows, for each package, either "… is up to date: version" or "… has update: current → latest", the release notes rendered from Markdown, a Download and Install button when a matching asset was found, and a Manual Download link to the release page. It also lists Detected Architecture, Package Manager and the number of assets found (LuCI Assets, Bandix Assets), which helps when no matching package is found ("No ipk package found for bandix" and similar).
Note: The Status page runs the same check automatically each time it loads, to decide whether to show the Update available badge.
Download and Install
Download and Install calls installUpdate with the asset URL. On the router this:
- Downloads the file to
/tmp/<file name>withwget(10-second timeout). - Runs
opkg updateorapk update(failures ignored). - Installs it with
opkg install <file>orapk add --allow-untrusted <file>. - Deletes the downloaded file.
The response reports the step reached (downloading, updating_repo, installing, completed, or download_failed / install_failed) and the package manager's output.
The two packages are handled differently by the page:
| Package | Behavior |
|---|---|
| luci-app-bandix | Installing it restarts parts of the web stack, which usually cuts the RPC connection. The page does not wait for an answer: it shows "Starting installation... The page will refresh automatically in 30 seconds." and reloads after 30 seconds. |
| bandix | The page waits for the result. On success it shows "Bandix updated successfully!" and "Please restart the service.", then reloads after 3 seconds. On failure it shows the failing step and up to 500 characters of the installer output. |
After updating:
- Restart the Bandix service after a backend update; the installer does not do it.
- Clear your browser cache after a LuCI app update, so the new JavaScript views load ("Please clear your browser cache manually after updating.").
- Update language packs by hand. The updater only installs the main
luci-app-bandixpackage, neverluci-i18n-bandix-*. - Keep the two packages on the same minor version. Updating only one of them can break the pages.
Clear Traffic Data
Clear Traffic Data asks "Are you sure you want to clear all traffic data? This action cannot be undone." and then calls clearData, which deletes everything in <data_dir>/metrics (data_dir defaults to /usr/share/bandix).
Points to know:
- Only the persisted metrics directory is cleared. Data held in the backend's memory is not touched, so restart the service afterwards if you want a clean slate everywhere.
- If the directory does not exist (for example because persistence was never enabled), the call fails with "Metrics directory does not exist".
- DNS records, hostname bindings, rules and quotas are not affected.
Restart Service
Restart Service asks "Are you sure you want to restart the Bandix service?" and runs /etc/init.d/bandix restart through restartService. The same can be done from a shell:
/etc/init.d/bandix restart
Without persistence, a restart discards all statistics held in memory.
Feedback
The Feedback link opens the author's GitHub profile in a new tab. Bug reports and feature requests go to the repository's issue tracker, which has templates for both.
Backups
The Bandix configuration lives in /etc/config/bandix, which is included in OpenWrt's standard configuration backup. Persisted data in data_dir and GeoIP databases in geoip_dir are not included unless you add those directories to System → Backup / Flash Firmware → Configuration.