Skip to content

feat(network): initial WiFi hotspot support - #2825

Merged
bbedward merged 8 commits into
duxlabs-dev:masterfrom
ronharel02:hotspot-controls
Jul 20, 2026
Merged

bbedward merged 8 commits into
duxlabs-dev:masterfrom
ronharel02:hotspot-controls

Conversation

@ronharel02

@ronharel02 ronharel02 commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

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.

image image

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.

image 1783790292279588912

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

  • An AP-capable WiFi adapter.
  • NetworkManager and dnsmasq for 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.

@ronharel02
ronharel02 force-pushed the hotspot-controls branch 2 times, most recently from ab965cf to 9825cf9 Compare July 11, 2026 17:44
@ronharel02 ronharel02 changed the title feat(network): WiFi hotspot support feat(network): initial WiFi hotspot support Jul 11, 2026

@bbedward bbedward left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The work looks great, thanksa lot for the contribution. Just some small changes on the map access mainly which is better to guard with mutexes

@knuxyl

knuxyl commented Jul 17, 2026

Copy link
Copy Markdown

What advantage does this have over hostapd? Why choose NetworkManager over hostapd?

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.
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.
@ronharel02

ronharel02 commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor Author

What advantage does this have over hostapd? Why choose NetworkManager over hostapd?

@knuxyl Hotspot support here is backend-agnostic, I implemented it as an optional capability. NetworkManager is simply the first implementation because it already manages the device, connection sharing, and state. A hostapd implementation could be added later, but it would also require coordinating DHCP/DNS, forwarding, NAT, device ownership, and lifecycle management separately...

@ronharel02

Copy link
Copy Markdown
Contributor Author

@bbedward Thanks for the review, I fixed the mutex issue :)

@ronharel02
ronharel02 requested a review from bbedward July 20, 2026 07:26
@bbedward
bbedward merged commit dc75f1f into duxlabs-dev:master Jul 20, 2026
3 checks passed
marcusramberg pushed a commit to marcusramberg/DankMaterialShell that referenced this pull request Sep 2, 2026
* Add hotspot contract layer with capability-gated dispatch.

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.

* Add IPC handlers and API docs for hotspot actions.

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.

* Implement NetworkManager hotspot backend.

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.

* Isolate client Wi-Fi state from AP-mode connections.

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.

* Prefer idle radios for automatic hotspot device selection.

* Add hotspot properties and methods to QML service layer.

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.

* Add hotspot controls to Settings and Control Center.

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.

* Add translator context to hotspot strings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants