1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
# 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
- [x] `enableWifi(enabled: bool)` - Turn WiFi radio on/off
- [x] `toggleWifi()` - Toggle WiFi radio state
- [x] `wifiEnabled` property - Current WiFi radio state
- [x] Monitor WiFi radio state changes
**Implementation Notes:**
- Use `nmcli radio wifi on/off`
- Monitor state with `nmcli radio wifi`
- Update `wifiEnabled` property on state changes
### 2. Network List Management
- [x] `networks` property - List of AccessPoint objects
- [x] `active` property - Currently active network
- [x] Real-time network list updates
- [x] Network grouping by SSID with signal prioritization
- [x] 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
- [x] BSSID support in `connectWireless()` function
- [x] Connection profile creation with BSSID (`createConnectionWithPassword`)
- [x] Handle BSSID in connection commands
**Implementation Notes:**
- Use `nmcli connection add` with `802-11-wireless.bssid` for 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
- [x] `savedConnections` property - List of saved connection names
- [x] `savedConnectionSsids` property - List of saved SSIDs
- [x] `hasSavedProfile(ssid: string)` function - Check if profile exists
- [x] `forgetNetwork(ssid: string)` function - Delete connection profile
- [x] Load saved connections on startup
- [x] Update saved connections list after connection changes
**Implementation Notes:**
- Use `nmcli -t -f NAME,TYPE connection show` to 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
- [x] `pendingConnection` property - Track connection in progress
- [x] Connection state tracking with timers
- [x] Connection success/failure detection
- [x] 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
- [x] `connectionFailed(ssid: string)` signal
- [x] Password requirement detection from error messages
- [x] Connection retry logic
- [x] 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
- [x] `connectToNetworkWithPasswordCheck()` function
- [x] Try connection without password first (use saved password)
- [x] Callback on password requirement
- [x] 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
- [x] Full parsing of `device show` output
- [x] `wirelessDeviceDetails` property with:
- `ipAddress`, `gateway`, `dns[]`, `subnet`, `macAddress`
- [x] `ethernetDeviceDetails` property with:
- `ipAddress`, `gateway`, `dns[]`, `subnet`, `macAddress`, `speed`
- [x] `cidrToSubnetMask()` helper function
- [x] 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
- [x] Automatic network list refresh on connection changes
- [x] Monitor connection state changes
- [x] Update active network property
- [x] Refresh device details on connection
**Implementation Notes:**
- Use Process stdout SplitParser to monitor changes
- Trigger network list refresh on connection events
- Update `active` property when connection changes
- Refresh device details when connected
### 10. Ethernet Device Management
- [x] `ethernetDevices` property - List of ethernet devices
- [x] `activeEthernet` property - Currently active ethernet device
- [x] `connectEthernet(connectionName, interfaceName)` function
- [x] `disconnectEthernet(connectionName)` function
- [x] Ethernet device details parsing
|