blob: 57bcbacdfba42b9bc807d208d3a6b1f3ab4f1726 [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 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)