2010-06-07 11:02:31 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
import dbus
|
|
|
|
import sys
|
|
|
|
|
|
|
|
bus = dbus.SystemBus()
|
|
|
|
|
|
|
|
if len(sys.argv) == 2:
|
|
|
|
path = sys.argv[1]
|
|
|
|
else:
|
|
|
|
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
|
|
|
'org.ofono.Manager')
|
2010-09-09 19:37:37 +00:00
|
|
|
modems = manager.GetModems()
|
|
|
|
path = modems[0][0]
|
2010-06-07 11:02:31 +00:00
|
|
|
|
|
|
|
print "Enabling cell broadcast on modem %s..." % path
|
|
|
|
cbs = dbus.Interface(bus.get_object('org.ofono', path),
|
2010-06-10 03:07:11 +00:00
|
|
|
'org.ofono.CellBroadcast')
|
2010-06-07 11:02:31 +00:00
|
|
|
|
|
|
|
cbs.SetProperty("Powered", dbus.Boolean(1))
|