5.2 KiB
5.2 KiB
Nmcli.qml Feature Completion Plan
This document outlines the missing features needed in Nmcli.qml to replace Network.qml or rewrite the wireless panel in the control center.
Current Status
Nmcli.qml currently has:
- ✅ Device status queries
- ✅ Wireless/Ethernet interface listing
- ✅ Interface connection status checking
- ✅ Basic wireless connection (SSID + password)
- ✅ Disconnect functionality
- ✅ Device details (basic)
- ✅ Interface up/down
- ✅ WiFi scanning
- ✅ SSID listing with signal/security (sorted)
Missing Features
1. WiFi Radio Control
enableWifi(enabled: bool)- Turn WiFi radio on/offtoggleWifi()- Toggle WiFi radio statewifiEnabledproperty - Current WiFi radio state- Monitor WiFi radio state changes
Implementation Notes:
- Use
nmcli radio wifi on/off - Monitor state with
nmcli radio wifi - Update
wifiEnabledproperty on state changes
2. Network List Management
networksproperty - List of AccessPoint objectsactiveproperty - Currently active network- Real-time network list updates
- Network grouping by SSID with signal prioritization
- AccessPoint component/object with properties:
ssid,bssid,strength,frequency,active,security,isSecure
Implementation Notes:
- Use
nmcli -g ACTIVE,SIGNAL,FREQ,SSID,BSSID,SECURITY d w - Parse and group networks by SSID
- Prioritize active/connected networks
- Update network list on connection changes
3. Connection Management - BSSID Support
- BSSID support in
connectWireless()function - Connection profile creation with BSSID (
createConnectionWithPassword) - Handle BSSID in connection commands
Implementation Notes:
- Use
nmcli connection addwith802-11-wireless.bssidfor BSSID-based connections - Fallback to SSID-only connection if BSSID not available
- Handle existing connection profiles when BSSID is provided
4. Saved Connection Profile Management
savedConnectionsproperty - List of saved connection namessavedConnectionSsidsproperty - List of saved SSIDshasSavedProfile(ssid: string)function - Check if profile existsforgetNetwork(ssid: string)function - Delete connection profile- Load saved connections on startup
- Update saved connections list after connection changes
Implementation Notes:
- Use
nmcli -t -f NAME,TYPE connection showto list connections - Query SSIDs for WiFi connections:
nmcli -t -f 802-11-wireless.ssid connection show <name> - Use
nmcli connection delete <name>to forget networks - Case-insensitive SSID matching
5. Pending Connection Tracking
pendingConnectionproperty - Track connection in progress- Connection state tracking with timers
- Connection success/failure detection
- Automatic retry or callback on failure
Implementation Notes:
- Track pending connection with SSID/BSSID
- Use timers to check connection status
- Monitor network list updates to detect successful connection
- Handle connection failures and trigger callbacks
6. Connection Failure Handling
connectionFailed(ssid: string)signal- Password requirement detection from error messages
- Connection retry logic
- Error message parsing and reporting
Implementation Notes:
- Parse stderr output for password requirements
- Detect specific error patterns (e.g., "Secrets were required")
- Emit signals for UI to handle password dialogs
- Provide meaningful error messages
7. Password Callback Handling
connectToNetworkWithPasswordCheck()function- Try connection without password first (use saved password)
- Callback on password requirement
- Handle both secure and open networks
Implementation Notes:
- Attempt connection without password for secure networks
- If connection fails with password error, trigger callback
- For open networks, connect directly
- Support callback pattern for password dialogs
8. Device Details Parsing
- Full parsing of
device showoutput wirelessDeviceDetailsproperty with:ipAddress,gateway,dns[],subnet,macAddress
ethernetDeviceDetailsproperty with:ipAddress,gateway,dns[],subnet,macAddress,speed
cidrToSubnetMask()helper function- Update device details on connection changes
Implementation Notes:
- Parse
nmcli device show <interface>output - Extract IP4.ADDRESS, IP4.GATEWAY, IP4.DNS, etc.
- Convert CIDR notation to subnet mask
- Handle both wireless and ethernet device details
9. Connection Status Monitoring
- Automatic network list refresh on connection changes
- Monitor connection state changes
- Update active network property
- Refresh device details on connection
Implementation Notes:
- Use Process stdout SplitParser to monitor changes
- Trigger network list refresh on connection events
- Update
activeproperty when connection changes - Refresh device details when connected
10. Ethernet Device Management
ethernetDevicesproperty - List of ethernet devicesactiveEthernetproperty - Currently active ethernet deviceconnectEthernet(connectionName, interfaceName)functiondisconnectEthernet(connectionName)function- Ethernet device details parsing