ofono_client: Set modem online before connecting to the network

Change-Id: I62ba1bfbdee64b18a443e8ad3974bb035b0be344
This commit is contained in:
Pau Espin 2017-05-02 09:39:27 +02:00 committed by Neels Hofmeyr
parent 6830a0493a
commit b995576e40
1 changed files with 6 additions and 0 deletions

View File

@ -76,6 +76,11 @@ class Modem(log.Origin):
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 @@ class Modem(log.Origin):
'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: