mirror of git://git.sysmocom.de/ofono
Enable passing of modem name via command line
This commit is contained in:
parent
4c6497e317
commit
0391f0a9bf
|
@ -1,15 +1,17 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
import dbus
|
import dbus
|
||||||
|
import sys
|
||||||
|
|
||||||
bus = dbus.SystemBus()
|
bus = dbus.SystemBus()
|
||||||
|
|
||||||
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
if len(sys.argv) == 2:
|
||||||
'org.ofono.Manager')
|
path = sys.argv[1]
|
||||||
|
else:
|
||||||
properties = manager.GetProperties()
|
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||||
|
'org.ofono.Manager')
|
||||||
path = properties["Modems"][0]
|
properties = manager.GetProperties()
|
||||||
|
path = properties["Modems"][0]
|
||||||
|
|
||||||
modem = dbus.Interface(bus.get_object('org.ofono', path),
|
modem = dbus.Interface(bus.get_object('org.ofono', path),
|
||||||
'org.ofono.Modem')
|
'org.ofono.Modem')
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
import dbus
|
import dbus
|
||||||
|
import sys
|
||||||
|
|
||||||
bus = dbus.SystemBus()
|
bus = dbus.SystemBus()
|
||||||
|
|
||||||
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
if len(sys.argv) == 2:
|
||||||
'org.ofono.Manager')
|
path = sys.argv[1]
|
||||||
|
else:
|
||||||
properties = manager.GetProperties()
|
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||||
|
'org.ofono.Manager')
|
||||||
path = properties["Modems"][0]
|
properties = manager.GetProperties()
|
||||||
|
path = properties["Modems"][0]
|
||||||
|
|
||||||
modem = dbus.Interface(bus.get_object('org.ofono', path),
|
modem = dbus.Interface(bus.get_object('org.ofono', path),
|
||||||
'org.ofono.Modem')
|
'org.ofono.Modem')
|
||||||
|
|
Loading…
Reference in New Issue