Feature/add cellular network mgmt#2209
Conversation
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.
There was a problem hiding this comment.
Needs to be removed, git rm core/dms
| } | ||
|
|
||
| func (b *NetworkManagerBackend) updateCellularState() { | ||
| nm := b.nmConn.(gonetworkmanager.NetworkManager) |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
I think we should either wire this up or remove the indicator all together.
| b.state.CellularEnabled = enabled | ||
| b.stateMutex.Unlock() | ||
| needsUpdate = true | ||
| } |
There was a problem hiding this comment.
May want to watch property changes of ModemManager objects, e.g. AccessTechnologies, RegistrationState, SignalQuality
|
|
||
| nm := b.nmConn.(gonetworkmanager.NetworkManager) | ||
|
|
||
| s := b.settings |
There was a problem hiding this comment.
Should initialize b.settings once in Initialize, or guard with a mutex.
| } | ||
|
|
||
| profiles = append(profiles, profile) | ||
| _ = activeUUIDs[connUUID] // Mark as seen |
There was a problem hiding this comment.
This is a no-op, probably not intended behavior given the comment
|
While working on your comments, I encountered some problems in the state logic in the network module. I will work on this and change back from draft, once I'm ready. |
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
Backend Support