On Tue, 2017-08-08 at 09:24 -0600, Matthew Stanger wrote: > Hello, > > I'm having trouble getting a reasonable speed for scan results using > DBus and I'm wondering if I'm fundamentally missing the design > intent. > As I understand it, I should be using the > 'fi.w1.wpa_supplicant1.Interface' with 'BSSs' property to get a list > of BSS and then use 'GetAll' on each of the BSS's to build the scan > results. This takes about 5-7 sec's when having 50-60 SSID's visible, > with each DBus call taking 50-100mS per DBus call to 'BSSs' (230Mhz > ARM). Now if I just link against wpa_sup like wpa_cli does then I can > use the 'scan_results' method and get the list in milliseconds. Typically you'd listen to the D-Bus property change signals rather than a GetAll(), so that you can get each AP as it gets added to the list. But if you've got a 230MHz machine, I can see how things would be a bit slower. One improvement would be to implement the ObjectManager interface for the supplicant, which allows you to retrieve *all* the objects at once rather than getting each AP individually. > 1) Is the DBus approach correct for getting scan_results? Is there a > better way? There's also the supplicant's socket-based interface which wpa_cli uses. I don't think you can categorize any method as "better" overall, just that for some applications the socket interface is better, and for some the D-Bus interface is better. > 2) If it is, are there any other way to get the scan_results without > linking/socket against wpa_sup? Take a look at wpa_cli perhaps. You'd need to write some socket read/write code, but if your program's license is compatible, you might be able to lift some of the wpa_cli code and repurpose. Dan _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap