* [PATCH] Add the possibility to specify the modem to use
@ 2011-06-08 14:18 Bertrand Aygon
2011-06-06 20:10 ` Denis Kenzior
0 siblings, 1 reply; 6+ messages in thread
From: Bertrand Aygon @ 2011-06-08 14:18 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]
---
test/initiate-ussd | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/test/initiate-ussd b/test/initiate-ussd
index b6a2d86..098ec87 100755
--- a/test/initiate-ussd
+++ b/test/initiate-ussd
@@ -4,7 +4,7 @@ import sys
import dbus
if (len(sys.argv) < 2):
- print "Usage: %s <ussd-string>" % (sys.argv[0])
+ print "Usage: %s [modem] <ussd-string>" % (sys.argv[0])
sys.exit(1)
bus = dbus.SystemBus()
@@ -13,7 +13,13 @@ manager = dbus.Interface(bus.get_object('org.ofono', '/'),
'org.ofono.Manager')
modems = manager.GetModems()
-path = modems[0][0]
+
+if (len(sys.argv) == 2):
+ path = modems[0][0]
+ ussdstring = sys.argv[1]
+else:
+ path = sys.argv[1]
+ ussdstring = sys.argv[2]
ussd = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.SupplementaryServices')
@@ -26,7 +32,7 @@ print "State: %s" % (state)
if state != "idle":
sys.exit(1);
-result = ussd.Initiate(sys.argv[1], timeout=100)
+result = ussd.Initiate(ussdstring, timeout=100)
properties = ussd.GetProperties()
state = properties["State"]
--
1.7.4.1
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH] Add the possibility to specify the modem to use
@ 2011-06-08 13:56 Bertrand Aygon
2011-06-06 20:10 ` Denis Kenzior
0 siblings, 1 reply; 6+ messages in thread
From: Bertrand Aygon @ 2011-06-08 13:56 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1134 bytes --]
---
test/cancel-ussd | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/test/cancel-ussd b/test/cancel-ussd
index 7379622..5246591 100755
--- a/test/cancel-ussd
+++ b/test/cancel-ussd
@@ -10,7 +10,10 @@ manager = dbus.Interface(bus.get_object('org.ofono', '/'),
modems = manager.GetModems()
-path, properties = modems[0]
+if (len(sys.argv) == 2):
+ path = sys.argv[1]
+else:
+ path = modems[0][0]
ussd = dbus.Interface(bus.get_object('org.ofono', path),
'org.ofono.SupplementaryServices')
--
1.7.4.1
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH] Add the possibility to specify the modem to use
@ 2011-06-08 13:50 Bertrand Aygon
2011-06-06 20:11 ` Denis Kenzior
0 siblings, 1 reply; 6+ messages in thread
From: Bertrand Aygon @ 2011-06-08 13:50 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1956 bytes --]
---
test/test-ussd | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/test/test-ussd b/test/test-ussd
index d4c1e27..c21f5e3 100755
--- a/test/test-ussd
+++ b/test/test-ussd
@@ -37,7 +37,7 @@ def stdin_handler(fd, condition):
if __name__ == "__main__":
if (len(sys.argv) < 2):
- print "Usage: %s <ussd-string>" % (sys.argv[0])
+ print "Usage: %s [modem] <ussd-string>" % (sys.argv[0])
sys.exit(1)
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
@@ -48,8 +48,16 @@ if __name__ == "__main__":
'org.ofono.Manager')
modems = manager.GetModems()
- ss = dbus.Interface(bus.get_object('org.ofono', modems[0][0]),
- 'org.ofono.SupplementaryServices')
+ modem = modems[0][0]
+
+ if (len(sys.argv) == 2):
+ ussd = sys.argv[1]
+ else:
+ modem = sys.argv[1]
+ ussd = sys.argv[2]
+
+ ss = dbus.Interface(bus.get_object('org.ofono', modem),
+ 'org.ofono.SupplementaryServices')
props = ss.GetProperties()
for p in props:
@@ -59,7 +67,7 @@ if __name__ == "__main__":
ss.connect_to_signal("RequestReceived", ussd_request_received)
ss.connect_to_signal("PropertyChanged", ussd_property_changed)
- print ss.Initiate(sys.argv[1], timeout=100)
+ print ss.Initiate(ussd, timeout=100)
gobject.io_add_watch(sys.stdin, gobject.IO_IN, stdin_handler)
--
1.7.4.1
---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number: 302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-06-08 14:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-08 14:18 [PATCH] Add the possibility to specify the modem to use Bertrand Aygon
2011-06-06 20:10 ` Denis Kenzior
-- strict thread matches above, loose matches on Subject: below --
2011-06-08 13:56 Bertrand Aygon
2011-06-06 20:10 ` Denis Kenzior
2011-06-08 13:50 Bertrand Aygon
2011-06-06 20:11 ` 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.