'Initializes the modem. Must be called after init and connect,
but before doing anything that expects the modem to be ready.'

def boot(self, reboot=False):

    self._log('Booting')
    if reboot:
        self.connect(reconnect=True)
        self.command('AT+CFUN=1')
    else:
        self.connect()
    self.set_modem_config()
    try:
        self._fetch_stored_messages()
    except errors.GsmError:
        pass
