Christopher Wiley | 2f48d95 | 2013-02-22 09:51:47 -0800 | [diff] [blame] | 1 | #!/usr/bin/python |
| 2 | |
| 3 | # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| 4 | # Use of this source code is governed by a BSD-style license that can be |
| 5 | # found in the LICENSE file. |
| 6 | |
| 7 | import mm |
| 8 | import sys |
| 9 | |
| 10 | def Usage(prog): |
| 11 | print ("Usage: %s " |
| 12 | "<device path substring>") % prog |
| 13 | |
| 14 | if len(sys.argv) < 1 or len(sys.argv) > 2: |
| 15 | Usage(sys.argv[0]) |
| 16 | sys.exit(1) |
| 17 | |
| 18 | if len(sys.argv) < 2: |
| 19 | modem_pattern = '' |
| 20 | else: |
| 21 | modem_pattern = sys.argv[1] |
| 22 | |
| 23 | manager, path = mm.PickOneModem(modem_pattern) |
| 24 | gobi_modem = manager.GobiModem(path) |
| 25 | gobi_modem.SoftReset() |