feat(network): initial WiFi hotspot support#2825
Open
ronharel02 wants to merge 8 commits into
Open
Conversation
Establish the interface and manager plumbing for hotspot support so backends can opt in without expanding the core Backend contract. Only backends that implement HotspotBackend get hotspot state propagated; others are forced to unsupported regardless of what they self-report.
Wire up configure/ start/ stop hotspot through the request router so the QML service layer can drive hotspot operations. Bump API version to 27 and document the capability-gating contract clients should follow.
6794f64 to
ab965cf
Compare
Implement HotspotBackend on NetworkManagerBackend with DMS-owned profile management, AP capability detection, and band validation. Device resolution is deferred to StartHotspot when no device is specified, so profiles survive hardware changes.
Filter AP-mode profiles and access points out of all client Wi-Fi paths so the DMS hotspot (and user-created APs) never appear as saved networks, visible networks, or connected state. This protects existing client behavior before hotspot controls are exposed in the UI.
Expose hotspot state and actions through DMSNetworkService, NetworkService, and LegacyNetworkService. Capability is gated on API version and backend-reported support, not backend name checks, and stays stable when Wi-Fi radio is disabled.
Settings shows a hotspot setup card as a sibling in the Wi-Fi tab with SSID, password, device, band, save, and start/ stop controls. Control Center shows a compact row that toggles a configured hotspot or routes to Settings for initial setup. Both stay visible when Wi-Fi is disabled, explaining the requirement instead of hiding.
ab965cf to
9825cf9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds WiFi hotspot support to DMS through an optional backend capability, with NetworkManager as the first implementation. Unsupported backends and older servers (gated behind IPC API v28) hide the feature automatically.
UI
Settings
The WiFi settings tab now includes a dedicated hotspot card for configuring the SSID, password, device, and band. Users can save, start, stop, and edit the DMS-managed hotspot profile. An empty password creates an open network, and editing prefills the stored password so re-saving never silently changes security. Starting on a connected radio prompts for confirmation before disconnecting the current WiFi connection.
Control Center
Control Center now shows a compact hotspot row alongside the WiFi controls. Configured hotspots can be started or stopped directly. When setup is required, the row links to the WiFi settings tab.
Backend
DMS manages a dedicated NetworkManager profile identified by its
stable-id, leaving user-created hotspots untouched. Activation is asynchronous and follows NetworkManager state signals so the UI can show progress and report failures.Automatic device selection prefers the radio already hosting the hotspot, followed by idle AP-capable radios. A connected radio is used only as a last resort.
AP-mode connections are isolated from normal client WiFi state and operations, including network lists, saved-profile actions, QR and autoconnect handling, and connection-priority rewrites.
Requirements
dnsmasqfor NetworkManager's shared IPv4 method.Future work
Some adapters support simultaneous client and access-point operation through STA+AP concurrency. Supporting this requires creating a virtual AP interface and coordinating its channel with the client connection, which NetworkManager does not handle automatically. Until then, sharing an active WiFi connection requires a second adapter.
Testing
Tested with hermetic NetworkManager mocks and manually on an MT7921 using 2.4 and 5 GHz bands, open and WPA2 networks, and a phone client connected through an Ethernet uplink.