* [PATCH] Add script for entering pin
@ 2010-04-20 12:06 Daniel Wagner
2010-04-20 17:18 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Wagner @ 2010-04-20 12:06 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]
---
I found this script helpful during debugging. Feel free to add.
test/enter-pin | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
create mode 100755 test/enter-pin
diff --git a/test/enter-pin b/test/enter-pin
new file mode 100755
index 0000000..792b6b2
--- /dev/null
+++ b/test/enter-pin
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+
+import dbus
+import sys
+
+bus = dbus.SystemBus()
+
+if len(sys.argv) == 4:
+ path = sys.argv[1]
+ pin_type = sys.argv[2]
+ pin = sys.argv[3]
+elif len(sys.argv) == 3:
+ manager = dbus.Interface(bus.get_object('org.ofono', '/'),
+ 'org.ofono.Manager')
+ properties = manager.GetProperties()
+ path = properties["Modems"][0]
+ pin_type = sys.argv[1]
+ pin = sys.argv[2]
+else:
+ print "%s [PATH] pin_type pin" % (sys.argv[0])
+
+print "Enter Pin for modem %s..." % path
+simmanager = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.SimManager')
+
+simmanager.EnterPin(pin_type, pin)
--
1.6.6.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Add script for entering pin
2010-04-20 12:06 [PATCH] Add script for entering pin Daniel Wagner
@ 2010-04-20 17:18 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2010-04-20 17:18 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 298 bytes --]
Hi Daniel,
> ---
> I found this script helpful during debugging. Feel free to add.
>
> test/enter-pin | 26 ++++++++++++++++++++++++++
> 1 files changed, 26 insertions(+), 0 deletions(-)
> create mode 100755 test/enter-pin
This patch has been applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-20 17:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-20 12:06 [PATCH] Add script for entering pin Daniel Wagner
2010-04-20 17:18 ` Denis Kenzior
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.