blob: cc230a7fc27857b914f424b72750e914854007ea [file] [log] [blame]
#!/usr/bin/python
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import dbus
import mm
import sys
devices = mm.EnumerateDevices()
network = ""
if len(sys.argv) > 1:
network = sys.argv[1]
for manager, path in devices:
props = manager.Properties(path)
if props['Type'] == mm.ModemManager.GSM_MODEM:
print 'Path: %s' % path
print ''
gsm_network = manager.GsmNetwork(path)
gsm_network.Register(network, timeout=90)