#!/usr/bin/python import dbus bus = dbus.SystemBus() manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"), 'org.moblin.connman.Manager') elements = manager.ListElements() for path in elements: element = dbus.Interface(bus.get_object('org.moblin.connman', path), 'org.moblin.connman.Element') properties = element.GetProperties() if (properties["Type"] != "device"): continue print "[ %s ]" % (path) if (properties["Subtype"] == "wifi"): print " Started WiFi scanning" element.Update() elif (properties["Subtype"] == "wimax"): print " Started WiMAX scanning" element.Update() else: print " No scanning" print