eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

get-powered (368B)


      1 #!/usr/bin/python3
      2 
      3 import dbus
      4 import sys
      5 
      6 if len(sys.argv) != 2:
      7 	print("Usage: %s device" % (sys.argv[0]))
      8 	sys.exit(1)
      9 
     10 bus = dbus.SystemBus()
     11 device = dbus.Interface(bus.get_object("net.connman.iwd", sys.argv[1]),
     12                         "org.freedesktop.DBus.Properties")
     13 
     14 powered = device.Get("net.connman.iwd.Device", "Powered")
     15 print("Powered: %d" % powered)