You may call the RequestScan
method on the org.freedesktop.NetworkManager.Device.Wireless
interface. Please note that this will return immediately - before the scanning results are available.
You may subscribe to the completion of the scan request, but I do not remember the exact details. Checking the nmcli
could reveal how it is done there. I think it was the last-scan
property which was introduced in NM 1.12.
Alternatively you may do some heuristic blocking solution that could be easier to implement.