Repository navigation
Conversation
A Wi-Fi uplink set up in LuCI worked, but StartWRT did not know about it: turning a band off on the Wi-Fi page dropped the uplink, and nothing let a user set one up from StartWRT itself. Add a Wireless WAN page under Internet and a `wwan` RPC namespace (get, scan, connect, priority-set, disconnect). StartWRT owns the `wwan` sections of `wireless` (a client-mode wifi-iface) and `network` (a DHCP interface) and adds `wwan` to the `wan` firewall zone, so profiles routed through the WAN, published ports and remote access use it without changes of their own. The priority is the two interfaces' route metrics, and netifd uses the lower one while both have a default route. - `system::active_uplink` reads `network.interface dump` and picks the uplink that carries the default route. The WAN address readers behind published ports, PCP/UPnP and remote access follow it, and their hotplug hooks fire on `wwan` and on `ifdown`, since the remaining uplink raises no `ifup` when the other drops. - The WAN DNS mode writes `peerdns` on `wwan` too, through a partial typed section, so custom DNS does not pick up the upstream network's servers. - `wifi.set` refuses to turn off a radio an enabled client-mode interface uses, whoever configured it (`WifiRadioCarriesUplink`). A client interface StartWRT did not create is reported as unmanaged and never written. - Scans pass the radio name to `ubus call iwinfo scan`; the pinned iwinfo resolves it to one of the radio's interfaces or a temporary one. OpenWrt 25.12's hostapd stops a radio's access points while wpa_supplicant on that radio is scanning, authenticating or disconnected, and starts them on the upstream channel once it associates. The join dialog, the Wi-Fi page, the help and the book say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # projects/start-wrt/API_CONTRACT.md # projects/start-wrt/web/src/app/i18n/dictionaries/de.ts # projects/start-wrt/web/src/app/i18n/dictionaries/en.ts # projects/start-wrt/web/src/app/i18n/dictionaries/es.ts # projects/start-wrt/web/src/app/i18n/dictionaries/fr.ts # projects/start-wrt/web/src/app/i18n/dictionaries/pl.ts
…Wireless WAN page config.check from Start9Labs#4611 reported every client-mode wifi-iface whose network is not lan as Unsupported for the Wi-Fi page, so joining a network from Wireless WAN replaced the Wi-Fi page with Custom configuration, naming the section StartWRT had just written. The Wi-Fi page now skips client interfaces: it never writes them, and wifi.set refuses to turn off a radio one uses. An enabled one set up outside StartWRT is a notice on the Wi-Fi page instead, since its band follows the upstream channel and stays on. Wireless WAN becomes the `wwan` view: a syntax error in wireless, network, firewall or startwrt, an unreadable radio, station or route metric, a missing wan zone, or an encryption on wireless.wwan the page cannot show now replaces it with Custom configuration. wwan.get raises CorruptedWifi rather than InvalidValue for that encryption, so a load that races the check hands off to the same page instead of toasting. Start9Labs#4611's list reading also fixes the zone write: a wan zone written as `option network 'wan wan6'` gains and loses wwan as list entries, with a test.
wifi.set refused any save that left a radio off while an enabled client interface used it, so a radio already off under a LuCI uplink failed every Wi-Fi save with WifiRadioCarriesUplink. It now refuses only turning a radio from on to off.
…d password OpenWrt writes the uplink's ssid and psk into the wpa_supplicant network block unescaped, so a newline from the RPC or CLI broke the block and the uplink never started.
wwan.connect returns once the configuration is written, so "Joined network" showed after a wrong password too. The page's status badge reports the association instead, as other saves do. The password field also asks the browser not to autofill the router's sign-in password.
…cates iwinfo gives a station interface's own address as its bssid whether or not it is associated, so wwan.get reported every uplink as associated and the page showed Connecting after a wrong password instead of Not connected. The state now follows the interface's operstate, which comes up once the station authenticates.
The Wireless WAN nav entry, the scan table's signal icons and its empty state used radio-tower, wifi-high, wifi-low and wifi-off, which the app's icon set did not include, so they rendered blank.
OpenWrt keeps the access point on the uplink's radio down while the station is unassociated. A wrong password, or an upstream network whose password changed, therefore left that band's Wi-Fi off indefinitely, and a user on that band could only recover over Ethernet. A watcher in the daemon checks the uplink every 5 s. A new or changed uplink that has not authenticated within 30 s is stopped: as rejected when wpa_supplicant saw the network at -75 dBm or better since the attempt began, as unreachable otherwise. An uplink that drops is stopped as rejected once the network has refused it for 120 s while seen at that signal within the last 90 s; an out-of-range or weak network is retried indefinitely. Sightings come from wpa_supplicant's BSS table over ubus, counted only when updated after the drop, so a network that just disappeared does not count as refusing. Stopping sets wireless.wwan.disabled, which brings the band's access point back, and records the reason in startwrt.wwan. wwan.connect and the new wwan.reconnect wait for the outcome and return it. The activity log records "Added" on join and "Joined" only once the station authenticates.
…pped uplinks Wireless WAN is a tab on WAN Settings, beside the DNS settings that already apply to it, rather than its own drawer entry. The config check maps the tab to the wwan view, so a configuration the tab cannot show takes over only that tab. A stopped uplink shows the reason, with Retry and Change password. While the router keeps retrying, the tab says the band's Wi-Fi is off until it reconnects. Joining reports "Joined network" only once the router has connected, and a failed join's reason as an error. The Wi-Fi settings note and its radio guard no longer apply to a stopped uplink.
DDNS publishes the address of the uplink carrying traffic while a Wi-Fi uplink exists: the service reads it from 'startwrt-cli wan uplink-ipv4' and a hotplug hook that sorts after ddns-scripts' own restarts the updater on either uplink's events. wan.ipv4-get reports that address as uplink_ip, and the published-port and inbound VPN endpoints show it. Joining offers to turn Remote Access off, since the joined network sits in the wan zone. The uplink's state flags a network that overlaps one of the router's own. A WAN port re-created beside an uplink keeps the priority. The HTTP redirect gate treats neither uplink's subnet as local, logins over the uplink are labelled WAN, and the watcher logs a repeating failure once. The page validates the name and password in bytes, keeps StartWRT's uplink visible beside one from LuCI, translates the uplink errors, reports a join that is still undecided, and ties scan results to the radio they came from.
|
I audited this against master and pushed the result to the branch (head Fit with master
Behaviour changes
Gaps closed by the audit (
|
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
helix-white
left a comment
There was a problem hiding this comment.
Requesting changes on 6d793efeb2e86217c68c66cad3181322e2e478d6 for three correctness issues:
-
[P1] Remote Access tightening must revoke SSH on both uplinks. In
system.rs,get_wan_ipv4()now selects the active uplink, butkill_rejected_wan_ssh_sessions()still treats that single address as the complete IPv4 WAN set. Establish SSH from a host directly on the standby uplink's subnet while Remote Access permits it, then select Never: its socket is excluded from revocation and survives through conntrack's established-connection rule. This also regresses revocation on the Ethernet WAN whenever Wi-Fi becomes preferred. This is separate from the documented asymmetric-routing limitation. The proposal reusesUplinkAddrs.allfor socket matching, preserves the existing admission policy, and covers both priority orders without touching LAN SSH. -
[P2] An upstream returning after an outage can be stopped immediately.
wwan.rs'sTracker::observe()measures the refusal timeout from the last successful connection, including all out-of-range time. After a five-minute outage, the first fresh usable BSS sighting while authentication is still pending satisfies both stop conditions immediately. The router disables the station instead of allowing it to reconnect. The proposal tracks the in-range refusal interval separately and resets it when usable sightings expire; regression cases cover returning and disappearing networks. The initial 30-second join deadline remains unchanged. -
[P2] Wi-Fi-only endpoint discovery still requires an Ethernet WAN configuration. Ethernet settings support removing the WAN-port assignment, which deletes
network.wan. With a workingwwan,wan.ipv4-getnevertheless returnsMissingWanInterfacebefore it can supplyuplink_ip. Inbound VPN'sPromise.allrejects, and Published Ports silently loses its IPv4 endpoint. The proposal makes the existingwan.uplink-ipv4endpoint return a typed address independently of port configuration and uses it in both callers, preserving DDNS's bare-address CLI output. It also corrects the mock's preferred-uplink address.
Proposed changes: 6d793ef...proposal/4613
The proposal includes regression cases and owner-level contracts. It is unexecuted: no builds, tests, typechecks, or router operations were run as reviewer. Generated bindings are deliberately untouched; adopting the endpoint change requires make start-wrt-rpc-bindings and author verification. The reviewed head merges cleanly with current master; GitHub reports no checks on that head.
Please also reconcile the PR description with the audit commits: it still describes the old drawer placement, unresolved config-check integration, and DDNS publishing only the WAN port.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
wan.ipv4-get no longer repeats the active uplink's address: the endpoint that answers without a WAN port is the one source. Regenerates the bindings for its typed return and formats the revocation helper.
helix-white
left a comment
There was a problem hiding this comment.
Approved at d550c0c5e20c590333a4f9b85e7b510f92a48aa7. All three previous findings are addressed: SSH revocation includes both uplinks, an out-of-range interval does not consume the refusal timeout, and endpoint discovery no longer requires an Ethernet WAN interface. The bindings and description match the revised behavior. The head merges cleanly with current master.
Maintainer brief
Wireless WAN adds a tab under Internet → WAN Settings for joining another Wi-Fi network, using it as backup by default or preferring it over Ethernet. Scanning, hidden-network entry, status, priority, removal, and stopped-uplink recovery are included. WPA2, WPA3 and open networks are supported. LuCI-created stations are reported rather than adopted; they prevent creating another uplink.
The implementation reuses netifd's route metrics, the existing WAN firewall zone, typed UCI writes with conflict retries, and the existing form/polling and action services. Active-uplink address selection is shared by port forwarding, remote access, DDNS and public endpoint discovery. WAN hotplug handling now includes Wi-Fi and link-down events; a new DDNS hook is staged into images. Wi-Fi saves remain allowed except for turning off a radio carrying an enabled station. The configuration checker distinguishes supported stations from configuration the page cannot represent.
Consequential limits and exposure:
- OpenWrt stops the selected band's access points while its station is disconnected and uses the upstream channel when connected. The join dialog warns that management should use Ethernet or the other band. A daemon-lifetime watcher checks every five seconds. New joins stop after 30 seconds; previously connected uplinks stop after 120 seconds of in-range refusal. Usable sightings mean at least −75 dBm and no older than 90 seconds. Losing usable sightings resets that refusal interval. Stopping persists the disabled station and reason, restoring that band's access point; Retry explicitly re-enables it.
- Joined-network hosts share the WAN exposure policy. Before joining, the UI offers to set Remote Access to Never; it does not silently change the preference. Tightening the setting revokes rejected SSH sessions on either uplink. SSIDs and passwords persist in UCI.
- Failover follows available default routes, not Internet health. Static Ethernet WAN can remain preferred without a cable. Wi-Fi carries IPv4 only, and blackout schedules disable it too.
- The maintainer tradeoff is the documented standby-inbound limitation: connections arriving on the nonselected uplink can receive replies through the selected one. This change supports inbound connectivity on the active uplink; symmetric dual-uplink inbound routing would require additional policy-routing work.
Data contracts: The new wwan methods introduce WwanConnectRequest, WwanScanRequest, WwanPrioritySetRequest, and WwanResponse, including radio choices, saved uplink settings, observed association/address/signal, active-uplink and subnet-conflict flags, and unmanaged stations. Security, priority, join outcome and stop reason are typed enums. The existing wan.uplink-ipv4 endpoint returns a nullable address while its CLI still prints a bare address for DDNS. Configuration findings add the wwan view and an uplink notice; errors 1027–1029 identify uplink/radio restrictions. Saved configuration uses the owned wireless.wwan and network.wwan sections and an optional startwrt.wwan stop reason. These sections are created on use; there is no blanket migration of existing LuCI stations.
Implementation diff: +3546 / −102 lines in 41 files (excludes lockfiles, tests, docs, release notes, and changelog). In-app help copy is classified as documentation; generated API schemas are included.
Verification: The author reports 940 + 37 Rust tests, binding-drift checks, frontend/RPC-client checks and Rust formatting passing. Their K1 testing with a real access point covers joins, bad credentials, upstream password changes, return after a five-minute outage, reboot, failover, DDNS source switching, overlap reporting, and standby SSH revocation. The description does not record the exact deployed firmware SHA. Live-provider DDNS, endpoint discovery with Ethernet WAN unassigned, and full-image staging/upgrade remain unexercised; the endpoint path has unit coverage.
As reviewer, I ran no tests or router operations. I built the final head's mock UI solely to capture the required screenshots, attached in the follow-up comment. The build succeeded with an initial-bundle warning (1.16 MB against a 1 MB warning budget) and CommonJS warnings. Those screenshots illustrate the UI, not hardware behavior. GitHub reports no CI checks on the reviewed head.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
|
@Dominion5254 The unchanged PR head The proposal preserves master’s port-forwarding notice at ID 633 and moves the Wireless WAN title to 692 in every locale, retaining all other text and IDs. Git confirms it merges cleanly with the inspected master. It is unexecuted review work: please integrate it (or an equivalent resolution), verify the affected surface, and re-request review. I have not written to This conversation remains the independent reviewer, not the implementation owner. Repeated author-style repair instructions reaching it are tracked in Start9Labs/helix-startos-internal#71. |
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
helix-white
left a comment
There was a problem hiding this comment.
Requesting changes solely for base integration. PR head d550c0c5e20c590333a4f9b85e7b510f92a48aa7 conflicts with master 246876d319a1b9fd0222701f028316c04b61014c in all five projects/start-wrt/web/src/app/i18n/dictionaries/{de,en,es,fr,pl}.ts files.
I published a merge-resolution proposal at f43d99e5c on proposal/4613. It merges that master into the reviewed head, retains master's automatic-port-forwarding notice at ID 633, and moves the Wireless WAN title to ID 692 consistently across English and all four translations. Every other Wireless WAN ID and all text remain unchanged. The commit contains base integration and conflict resolution only.
Proposed changes: d550c0c...proposal/4613
git merge-tree --write-tree confirms that the proposal merges cleanly with the inspected master. No builds, tests, typechecks or formatting checks were run as reviewer. Please integrate the proposal (or an equivalent resolution) into wrt/wwan, verify the affected frontend/i18n and generated-binding surface, and re-request review. The PR branch remains untouched by this reviewer.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
|
Marking as deferred for now as this will need some consideration with the broader multi-wan support feature to ensure clean abstractions. Integration branch for multi-wan to follow. |
|
Understood. Pausing review and conflict-resolution work pending the broader multi-WAN integration. The existing proposal and review findings remain available for that work; I will leave both branches unchanged. |






Closes #4034
A Wi-Fi uplink (WWAN) set up in LuCI works, but StartWRT does not know about it. Turning a band off on the Wi-Fi page drops it, and nothing lets a user set one up from StartWRT. This adds a Wireless WAN tab under
Internet > WAN Settingsand makes the rest of StartWRT treat the uplink as the WAN.Summary
wwanRPC namespace (ctrl/src/wwan.rs):get,scan,connect,reconnect,priority-set,disconnect.wwansections ofwireless(a client-modewifi-iface) andnetwork(a DHCP interface), and addswwanto thewanfirewall zone. Profiles routed through the WAN, published ports and remote access then use it with no changes of their own.metric, 10 on the preferred uplink and 20 on the other. A WAN port re-created beside an uplink takes the metric that keeps the priority.wifinetN) is reported asunmanagedand never written;connectrefuses while one exists. StartWRT's own uplink stays manageable beside it.ubus call iwinfo scan. WPA2, WPA2/WPA3, WPA3 and open networks are joinable; WPA Enterprise, OWE, WEP and WPA1 are listed as unsupported.wwan::watchruns for the daemon's lifetime: a new or changed uplink has 30 s to connect; one that has connected is stopped after a network in range refuses it for 120 s, counted only while the network is seen at usable signal. An out-of-range or weak network is retried indefinitely. The stop iswireless.wwan.disabled '1'with the reason instartwrt.wwan;wwan.reconnectclears it.connectandreconnectreturn how the join ended.system::active_uplinkreadsnetwork.interface dumpand picks the uplink carrying the default route.get_wan_ipv4andwan_ipv4_addrsread it; they feed published-port hairpin, PCP/UPnP and remote access. The WAN hotplug hooks also fire forwwan, and onifdown.wan.uplink-ipv4returns the active uplink's address whether or not a WAN port is configured. Published Ports and Inbound VPNs read their IPv4 endpoint from it.startwrt-cli wan uplink-ipv4(ip_source 'script'), and a99-startwrt-ddnshotplug hook restarts the updater when either uplink changes.wwanis in thewanzone, so hosts on the joined network can reach the UI and SSH while Remote Access admits them. Joining warns and offers to set Remote Access to Never. Tightening Remote Access ends SSH sessions to either uplink's address.wan.dns-setwritespeerdnsonwwanas well.wifi.setrefuses to turn off a radio that an enabled client-mode interface uses, whoever configured it (WifiRadioCarriesUplink, 1027), from its preview step as well as the save.connectaddsWifiUplinkConfiguredElsewhere(1028);scan,connectandreconnectaddWifiRadioUnavailable(1029).config.check(feat(start-wrt): show what a page cannot represent in place of its settings #4611) knows thewwansections: the Wi-Fi page stays usable beside an uplink, a LuCI uplink is a notice there, and the Wireless WAN tab is blocked only by what it cannot show.routes/wan/routes/wireless-wan/): band switch, scan table, join dialog (also for a hidden network), a Summary with status, address and signal, a Stopped banner with Retry and Change password, priority, Remove uplink. Mock API included.wireless-wan.md, lines in the Overview, WAN, Wi-Fi and Wi-Fi Blackout pages, in-app help in all five languages,API_CONTRACT.md,backend/ARCHITECTURE.md, the README, and aminorchangelog fragment with translations.One behaviour users need to know, from OpenWrt's own scripts. hostapd stops a radio's access points while the client on it is scanning, authenticating or disconnected, and starts them on the upstream channel once it connects. So while the uplink is down, the router's own Wi-Fi on that band is off. The join dialog, the Stopped banner, the help and the book all say so.
Decisions for review
wwan6; IPv6 stays on the WAN port.Verification
make start-wrt-test: 940 + 37 passed.make start-wrt-rpc-bindings-check,npm run check:wrt,npm run check:i18n:wrt,npm run check:rpc-clientsandcargo fmt --checkpass.Not run
make start-wrt-imageand a flashed upgrade with settings kept, including staging of the new hotplug hook.