Duplicate networks when using wlanIface.GetAvailableNetworkList(0)

Nov 2, 2013 at 11:48 PM
When I use wlanIface.GetAvailableNetworkList(0), it get a duplicate of the connected network but the Windows (7 and 8) list of available networks only shows the connected network and the other available network.

wlanIface.GetAvailableNetworkList(0)
Name                 Auth             Signal   Flags                    Security         BSSType          Connectable 
linksys              RSNA_PSK         62       Connected, HasProfile    True             Infrastructure   True           
linksys              RSNA_PSK         72       0                        True             Infrastructure   True           
linksys-guest        IEEE80211_Open   60       0                        False            Infrastructure   True           
Windows only show the connected "linksys" and "linksys-guest" networks.

How can I eliminate the duplicate "linksys" network.

Regards,
Jim
May 21, 2014 at 4:15 PM
You need to create a collection and if network already added you can skip duplicate.
Feb 16, 2015 at 9:45 PM
Edited Feb 17, 2015 at 12:11 AM
fabcal, that is not a good solution. There could be multiple SSIDs named the same but from different APs with different security.

EDIT: Figured it out.
Feb 17, 2015 at 12:12 AM
Edited Feb 17, 2015 at 1:12 AM
What I found is that you need to check against the Flags variable.
Flags=0 are SSIDs that are available.
Flags=2 means there is a profile on your PC but you are not connected to it.
Flags=3 means there is a profile on your PC and you are connected to it.

So what you are seeing is that you are connected to linksys, so the profile is on your PC and is listed (flags = 3)

You are also seeing that linksys and linksys-guest are available networks (flags=0)

KyferEz