Re: Get all available networks over the d-bus

On Mon, 2017-03-06 at 22:51 +0100, Morten Back Nielsen wrote:

I'm using libnm from python with GObject introspection for
with Network Manager over the d-bus.

And to find the available networks / access points, I call
on each WiFi device
however there is a big variance in the time that these call takes.

Does get_access_points()
force a rescan on all channels and is there another way to find all
available networks?

No, it just asks for the existing access points that NM knows about. 
What are the min/max times that you're seeing?

To force a full rescan, you can call the RequestScan() method on the
Device.Wireless interface.  This will give you most of the networks,
but note that because wireless is unreliable, you won't get every AP
every time.

Note that NM currently does a periodic scan to look for APs, but that
will likely go away in the future.  So if you want to get a fresh view
of available APs, definitely ask NM to rescan from your application.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]