Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update Wifi networks programmatically

I'm trying to create program that connects to certain wifi network when it's in range, even if already connected to another wifi.

I'm using SimpleWifi, and basically it works great. Except that it does not see new wifi networks before I clicked wifi icon in Windows 10 taskbar to show list of networks.

How can I force c# program to update wifi network list?

Currently using IEnumerable<AccessPoint> accessPoints = wifi.GetAccessPoints().OrderByDescending(ap => ap.SignalStrength); to update wifi networks, but as I said, it does not see new networks before refreshed manually from Windows.

like image 985
darx Avatar asked Sep 13 '25 21:09

darx


1 Answers

It's almost 3 years ago but here is my take on this issue anyways.

In that library you can call: SimpleWifi.Wifi.Disconnect()

Which I do before re-connect and get the list of access points again. This works sort of, new networks introduced after windows discovery does actually show up, but are way slower than if you click "wifi" button in Windows, which will bring up newly discovered networks right away.

If someone knows a solution to "trigger" Windows/Managed wifi connections to update it's list, just like you do in Windows, I would appreciate that

like image 195
Rasmus Pedersen Avatar answered Sep 16 '25 13:09

Rasmus Pedersen