Repository navigation
Feature: WiFi review & improvements - #3695
Merged
Merged
Conversation
…dapter (B1) The auto refresh timer is only created if the WiFi API is available and the access is allowed. OnViewHide / OnViewVisible called it anyway, so switching from WiFi to another tool threw a NullReferenceException when the location access was denied. Regression of #3685 (not released). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The auto refresh and F5 scanned the selected adapter also if no adapter was found: ScanAsync(null) threw a NullReferenceException, which ended the application when it came from the auto refresh timer (async void). Both require a selected adapter now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ReloadAdapter_CanExecute was false while the auto refresh was enabled. Without an adapter the auto refresh toggle is hidden, so the Refresh button below "No WiFi adapters found" stayed disabled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The connect callbacks of the dialog repeated the status message, the result message, the hide timer and the rescan. Both use ConnectAsync with the actual connect call as delegate now. No behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The connect callbacks run as async void: an exception of WiFiAdapter.ConnectAsync ended the application and IsConnecting stayed set, which blocked the refresh and the auto refresh. ConnectAsync catches the error now, shows it in the connection status and resets IsConnecting in finally. Disconnect (async void) catches its error the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a network (B11) Both commands had no CanExecute: a second connection could be started while one was made, and Connect read SelectedNetwork without a check (null after the networks were scanned again while the menu was open). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UseCredentials of the connect dialog was never read: the (empty) username and password were always sent. They are only set if Use credentials is enabled now; otherwise an empty credential is passed like for open networks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CheckWpsAsync lost its caller when the dialog was migrated to a child window (#3271), so IsWpsAvailable stayed false. It is called when the dialog is loaded again. An error of the check is logged and leaves WPS unavailable instead of keeping "Checking WPS..." visible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both branches focused the pre-shared key box (lost in the migration to a child window, #3271), which is hidden for a hidden network (SSID) and for EAP (username). The first visible input is focused again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GetConnectMode only knew WPA / WPA2 Enterprise: WPA3 Enterprise (also 192-bit) got the pre-shared key dialog, and OWE (Enhanced Open, encrypted without a password) too, with Connect disabled until a key was typed. GetConnectMode has an overload for the authentication / encryption type now, with unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ChannelCenterFrequencyInKilohertz of WiFiAvailableNetwork is the frequency of the primary 20 MHz channel, where the beacons are sent. The channel chart centered each network on it, so every 40 / 80 / 160 MHz network was drawn shifted (80 MHz on channel 36 over 28 - 44 instead of 36 - 48). WlanApi returns the center of the whole channel with the width now, from the same information elements: HT secondary channel offset, VHT CCFS0 / CCFS1 (new and deprecated 160 MHz encoding), HE 6 GHz Operation CCFS0 / CCFS1. VHT / HE are parsed after the element loop, so the HT fallback no longer depends on the order of the elements. The chart uses the new ChannelBandwidthCenterFrequencyInGigahertz; the Channel / Frequency columns stay the primary channel. Unit tests for the parsing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The EHT Operation element (802.11be, extension id 106) was not parsed, so 320 MHz channels got the 160 MHz of the HE element. Its channel width and center (CCFS0 / CCFS1) are read now, with unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
If the channel width can't be read from the BSS list, it is estimated from the band and the PHY kind, but it looked like a measured value. WiFiNetworkInfo.IsChannelBandwidthEstimated marks it; the grid, the copy menu and the chart tooltip show "~80 MHz", the grid cell has a tooltip with the reason. The estimate for 2.4 GHz is 20 MHz (also for 802.11n, 40 MHz is rarely used on 2.4 GHz). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BuildChannelSet(100, 165, 4) produced 148, 152 ... 164, but the UNII-3 channels are 149, 153 ... 165. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 5 GHz range ended at 5825 MHz (channel 165): channels 169 - 177 (UNII-4) and 32 got the radio Unknown and channel -1, so they ignored the band filter and were not drawn. 6 GHz channel 2 (5935 MHz, below channel 1) got -1 as well and was drawn outside the axis. The ranges cover 5160 - 5885 MHz and channel 2 now, the 5 / 6 GHz chart axes include them. GetChannelFromChannelFrequency and GetWiFiRadioFromChannelFrequency are public for unit tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SortMemberPath of the icon column pointed to a property that doesn't exist on WiFiNetworkInfo (ChannelCenterFrequencyInKilohertz), the one of Encryption missed SecuritySettings. The icon column sorts by the signal bars it shows now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Selecting another adapter during a scan started a second scan; the one that finished last won, possibly the one of the previous adapter. The adapter selection is disabled while scanning or connecting (CanChangeAdapter). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A failed scan cleared the networks and charts until the next scan, also for a refresh (manual, auto refresh, the rescan after connecting, which can fail while the adapter is busy). A refresh keeps the networks of the last scan now and only shows the error, like a failed repeated scan of the IP Scanner. A failed first scan of an adapter still clears them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The disconnect message used the empty SSID of a hidden network, and the search compared with the empty SSID instead of "Hidden Network" shown in the grid. GetDisplaySsid is used for both and for the chart series and legend (same logic before). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The up / down icon of the adapter selection was bound to NetworkInterfaceInfo.IsOperational, read once when the adapters were loaded, so it still showed "up" after a disconnect. WiFiAdapterInfo has a notifying IsOperational now, updated after each scan from the operational status of the network interfaces (cheap, without the PowerShell query of GetNetworkInterfaces). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
F5, the adapter reload and the auto refresh didn't check for an open dialog (like the Connections or the IP Scanner do), so the list was replaced behind the connect or export dialog. They wait until it is closed now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The access was only requested in the constructor: after it was allowed in the Windows settings, the application had to be restarted. The constructor always sets up the list and the timers now; the adapters are loaded (and the auto refresh enabled) once the access is allowed, which is checked again by a Refresh button next to Open settings and when the view is shown again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The BSSID was shown in the format of the WinRT API (lowercase), the IP Scanner and the other tools use MACAddressHelper.GetDefaultFormat (uppercase). WiFiNetworkInfo.Bssid has the formatted value; grid, copy, search, chart legend / tooltip and the export use it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reloading the adapters selects a new instance of the same adapter, which started a scan with the full loading indicator in place of the grid. A scan of the same adapter is a background refresh now (like the auto refresh), only a different adapter shows the loading indicator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GetHumanReadableNetworkAuthenticationType / GetHumanReadablePhyKind returned the hard-coded English text "Unknown". The model has no access to the strings, so the placeholder for no value is used, like for an unknown vendor and the authentication type None. The technical terms (Open, WEP, WPA2 Personal (PSK), 802.11ax) stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CSV header, the CSV row, the XML elements and the JSON object each listed the same 12 values. One list of fields (name + value) drives all three formats now, like the export of the IP Scanner. Same columns, order and values per format (CSV / JSON text in the current culture, XML values as before). No unit test: WiFiAvailableNetwork (WinRT) can't be created outside of a scan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rity (M1) The export lacked the values the grid shows next to the ones of the WinRT API: IsConnected, Security (human-readable authentication), Channel, ChannelWidth, ChannelWidthEstimated and Vendor. They are appended at the end, the existing columns keep their position. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The CSV values were not quoted, so an SSID with a comma or a quote shifted the columns of its row. The text values (SSID, security, vendor) are quoted with CsvHelper.QuoteString, like in the other exports. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Export all wrote every scanned network (also the bands hidden by the filter and the networks hidden by the search) in scan order, selected networks in click order, on the UI thread. Like the IP Scanner, the filtered view is exported in its order (selected ones too) and the file is written in Task.Run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…12, B15) Every scan ran "netsh wlan show interfaces" in a new PowerShell instance synchronously on the UI thread (after await ScanAsync), and parsed its (localized) text: the window froze briefly every scan, an exception of PowerShell ended the whole scan (B15), and with several adapters the lines of the next adapter were read if the scanned one was not connected (B12). WlanApi.GetConnectedBssid reads the BSSID with WlanQueryInterface (wlan_intf_opcode_current_connection); null if not connected or on an error. Everything after adapter.ScanAsync (native calls, OUI lookups, now synchronous) runs in Task.Run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WlanApi.ChannelToFrequency had its own copy of the band rules (2.4 GHz channel 14, 6 GHz channel 2, band boundaries), which drifted from WiFi.GetChannelFromChannelFrequency (B25). The inverse mapping is WiFi.GetFrequencyFromChannel now, next to the forward one, and a test checks every channel of each band back and forth. The chart position (FrequencyToChannelAxis) stays separate: it is an axis position, not a channel number (6 GHz channel 2 at -3). No behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The connect callback called WiFi.ConnectAsync in two branches with the same arguments (with / without the SSID of a hidden network), although ConnectAsync already decides by the SSID. ConnectAsync and ConnectWpsAsync repeated the disconnect after a timeout, which is one helper now. No behavior change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SSID as shown ("Hidden Network" for a hidden network) was built in
the view model (grid search, chart legend, notification, disconnect
message) and again in the chart tooltip. Both use
WiFiNetworkToSsidStringConverter.GetSsid now, so they can't differ. No
behavior change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Channels tab repeated the same chart attributes and the same legend (panel + item template) for each of the 4 charts, and the view model had 5 properties per chart (series, legend, X / Y axes, sections). The chart attributes and the legend are two styles (WiFiChannelChart, WiFiChannelLegend) now; the grid layout of the tabs is unchanged (no template around a chart, so the row heights stay the same). Each chart is a WiFiChannelChart (axes and sections fixed, series and legend replaced on every scan), which also shortens building and clearing them in ScanAsync. No behavior change - to be checked visually on Windows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts (T1) The mapping from a frequency to the X axis of the channel charts (5 GHz gap, 6 GHz split, axis labels) moves from private methods of the view model to WiFiChannelAxis, so it can be tested (B9, B19, B32 had no tests). No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A network drawn in both 6 GHz charts (e.g. 320 MHz around channel 127, B32) got its color from its position in each chart, so the two halves and their legend entries could have different colors. The two 6 GHz charts count the colors together now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…(B35) The selected network was scrolled into view on every change of the selection (P2), also when the user changed it, e.g. Ctrl+click on the first selected row while scrolled away: the grid jumped to the next selected row. It is only scrolled into view after the networks were replaced by a scan now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Missing tests (area 10, T1, ...) were reported under "Other" and could get lost. They get their own table with the bugs they would have caught and the proposed move to NETworkManager.Models. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed a second scan (B36) Connect... / Disconnect were not blocked while the adapters were reloaded (the networks stay visible when the same adapter is reloaded). Disconnect scanned the old adapter while the reload scanned the reloaded one: two scans at the same time, and the changes since the last scan could be counted twice or lost. Both wait until the reload is finished now, like the other actions. Changelog entry of B31 extended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…alogOpen) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the copied check (main window, MahApps dialog, child window) in 21 view models; no behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…entions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
See commits
Related issue
#3609
Type of change