ofono_client: Set modem online before connecting to the network
Change-Id: I62ba1bfbdee64b18a443e8ad3974bb035b0be344
diff --git a/src/osmo_gsm_tester/ofono_client.py b/src/osmo_gsm_tester/ofono_client.py
index a10784f..4476fdb 100644
--- a/src/osmo_gsm_tester/ofono_client.py
+++ b/src/osmo_gsm_tester/ofono_client.py
@@ -76,6 +76,11 @@
self.dbus_obj().SetProperty('Powered', Variant('b', on))
test.poll()
+ def set_online(self, on=True):
+ test.poll()
+ self.dbus_obj().SetProperty('Online', Variant('b', on))
+ test.poll()
+
def dbus_obj(self):
if self._dbus_obj is not None:
return self._dbus_obj
@@ -124,6 +129,7 @@
'set the modem up to connect to MCC+MNC from NITB config'
self.log('connect to', nitb)
self.set_powered()
+ self.set_online()
if not self.has_interface(I_NETREG):
self.log('No %r interface, hoping that the modem connects by itself' % I_NETREG)
else: