Skip to content

Conversation

@TheObliterator
Copy link

In some circumstances not all available access points in range were being listed, or only the connected AP was being found - #39.

The problem seems to affect Win10 (maybe adapter specific) and is exacerbated by the passage of time since the connection was established and also by frequent polling of the APs (with APs slowly disappearing over time from the list) - #36
To remedy this, its necessary to tell Windows to scan for APs prior to enumerating the APs (opening the Win10 WiFi connection list would actually resolve the problem temporarily).

This fix performs a scan during initialisation and optionally rescans automatically when retrieving the list of APs (if more than 60s have elapsed since the last scan).
Strictly speaking you should wait for a notification the scan completed before retrieving the APs - but this implementation works well enough in a polling situation. #

In some circumstances not all available access points in range were being listed, or only the connected AP was being found.

The problem seems to affect Win10 (maybe adapter specific) and is exacerbated by the passage of time since the connection was established and also by frequent polling of the APs (with APs slowly disappearing over time from the list).
To remedy this, its necessary to tell Windows to scan for APs prior to enumerating the APs (opening the Win10 WiFi connection list would actually resolve the problem temporarily).

This fix performs a scan during initialisation and optionally rescans automatically when retrieving the list of APs (if more than 60s have elapsed since the last scan).
Strictly speaking you should wait for a notification the scan completed before retrieving the APs - but this implementation works well enough in a polling situation.
@CrazyOrange
Copy link

From the MS docs:
The WlanScan function returns immediately and does not provide a notification when the scan is complete on Windows XP with SP3 or the Wireless LAN API for Windows XP with SP2.

So I guess there is no way to find out when the scan has finished?

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