Skip to content

Feature/add cellular network mgmt#2209

Open
goetzvr wants to merge 5 commits intoAvengeMedia:masterfrom
goetzvr:feature/add-cellular-network-mgmt
Open

Feature/add cellular network mgmt#2209
goetzvr wants to merge 5 commits intoAvengeMedia:masterfrom
goetzvr:feature/add-cellular-network-mgmt

Conversation

@goetzvr
Copy link
Copy Markdown

@goetzvr goetzvr commented Apr 12, 2026

Summary

Adds cellular network management to DMS. Users can now view and control cellular connections from both the Control Center and Settings.

What's New

  • Control Center: Cellular section in the network dropdown showing signal strength, operator, and technology type (4G/5G/LTE). Quick connect/disconnect and enable/disable radio.
  • Settings: Full cellular management with device listing, connection profiles, APN settings, autoconnect preferences, and SIM status with PIN entry.
  • Real-time data: Live signal quality, connection state, and IP configuration via ModemManager D-Bus integration.

Backend Support

  • NetworkManager + ModemManager: Full support with D-Bus integration
  • iwd / connman: Stubs added (cellular support pending for these backends)

Goetz and others added 5 commits April 10, 2026 16:13
Implement cellular network management interface for the DMS network
service. This adds full support for cellular connections when using
NetworkManager as the backend.

Features:
- List cellular devices and their connection status
- Enable/disable cellular radio
- Connect/disconnect cellular connections
- View detailed network info (signal, operator, technology, IP)
- Manage cellular profiles (APN, autoconnect settings)
- SIM status and PIN entry support

Technical details:
- Add cellular types and IPC methods to network service
- Implement NetworkManager backend with ModemManager D-Bus calls
- Add unimplemented stubs for iwd and connman backends
- Add cellular UI sections to ControlCenter and Settings
- Expose cellular state through DMSNetworkService QML service
Add distro/arch, quickshell/.qmlls.ini, and quickshell/.qs-build/ to gitignore as temporary exclusions that may be removed later.
Add support for fetching real cellular data from ModemManager via D-Bus:
- Implement getModemManagerCellularDetails() to query signal, technology, operator
- Handle SignalQuality struct type variations (uint32/int32/uint8)
- Update CellularActive struct and ListActiveCellular to populate new fields
- Add D-Bus connection initialization in NetworkManagerBackend.Initialize()
- Update DMSNetworkService.qml to populate individual cellular properties

Fixes type assertion panic when accessing SignalQuality property from ModemManager.
…stration state

Replace interface{} with any type alias and convert if-else chain to switch statement for better readability in ModemManager cellular details handling.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Needs to be removed, git rm core/dms

}

func (b *NetworkManagerBackend) updateCellularState() {
nm := b.nmConn.(gonetworkmanager.NetworkManager)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All of the type assertions should be checked to avoid panics.

nm, ok := b.nmConn.(gonetworkmanager.NetworkManager
if !ok { // handle error

nm := b.nmConn.(gonetworkmanager.NetworkManager)

// Check WWAN enabled
wwanEnabled, _ := nm.GetPropertyWwanEnabled()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd prefer to handle the errors instead of suppressing them, even if its just a log warning/error.


func (b *NetworkManagerBackend) GetSIMPinTriesLeft(device string) (int, error) {
// TODO: Query ModemManager D-Bus for real PIN retry count:
// org.freedesktop.ModemManager1.Sim → RetriesLeft property
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we should either wire this up or remove the indicator all together.

b.state.CellularEnabled = enabled
b.stateMutex.Unlock()
needsUpdate = true
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

May want to watch property changes of ModemManager objects, e.g. AccessTechnologies, RegistrationState, SignalQuality


nm := b.nmConn.(gonetworkmanager.NetworkManager)

s := b.settings
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should initialize b.settings once in Initialize, or guard with a mutex.

}

profiles = append(profiles, profile)
_ = activeUUIDs[connUUID] // Mark as seen
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a no-op, probably not intended behavior given the comment

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.

2 participants