All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add test/reset-pin
@ 2010-11-08 20:28 Pekka.Pessi
  2010-11-09 16:19 ` Denis Kenzior
  0 siblings, 1 reply; 3+ messages in thread
From: Pekka.Pessi @ 2010-11-08 20:28 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

From: Pekka Pessi <Pekka.Pessi@nokia.com>

---
 test/reset-pin |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
 create mode 100755 test/reset-pin

diff --git a/test/reset-pin b/test/reset-pin
new file mode 100755
index 0000000..d0145fe
--- /dev/null
+++ b/test/reset-pin
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+
+import dbus
+import sys
+
+bus = dbus.SystemBus()
+
+if len(sys.argv) == 5:
+	path, puk_type, puk, pin = sys.argv[1:]
+elif len(sys.argv) == 4:
+	manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+					'org.ofono.Manager')
+	modems = manager.GetModems()
+	path = modems[0][0]
+	puk_type, puk, pin = sys.argv[1:]
+else:
+	print "%s [PATH] puk_type puk pin" % (sys.argv[0])
+
+print "Reset pin for modem %s..." % path
+simmanager = dbus.Interface(bus.get_object('org.ofono', path),
+				'org.ofono.SimManager')
+
+simmanager.ResetPin(puk_type, puk, pin)
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-09 22:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-08 20:28 [PATCH] Add test/reset-pin Pekka.Pessi
2010-11-09 16:19 ` Denis Kenzior
2010-11-09 22:51   ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.