Hi Wu,

On 23.04.2012 12:13, Zheng, Wu wrote:
Hi Daniel,

I try to test your patches.

Thanks for giving them a try.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Daniel Wagner
Sent: Tuesday, April 03, 2012 12:20 AM
To: [email protected]
Cc: Daniel Wagner
Subject: [PATCH v6 03/16] dundee: Add test scripts

From: Daniel Wagner<[email protected]>

---
  test/dundee-connect    |   20 +++++++++
  test/dundee-disconnect |   20 +++++++++
  test/monitor-dundee    |  109
++++++++++++++++++++++++++++++++++++++++++++++++
  3 files changed, 149 insertions(+)
  create mode 100755 test/dundee-connect
  create mode 100755 test/dundee-disconnect  create mode 100755
test/monitor-dundee

diff --git a/test/dundee-connect b/test/dundee-connect new file mode 100755
index 0000000..6cbc629
--- /dev/null
+++ b/test/dundee-connect
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+
+import dbus
+import sys
+
+bus = dbus.SystemBus()
+
+if len(sys.argv) == 2:
+       path = sys.argv[1]
+else:
+       manager = dbus.Interface(bus.get_object('org.ofono.dundee', '/'),
+                       'org.ofono.dundee.Manager')
+       devices = manager.GetDevices()
+       path = devices[0][0]
+
+print "Connect device %s..." % path
+device = dbus.Interface(bus.get_object('org.ofono.dundee', path),
+                                               'org.ofono.dundee.Device')
+
+device.Connect()

The dbus method connect() does not exist on org.ofono.dundee.Device, it cannot 
be found in device.c and doc/dundee-api.txt.
Why?

Best regards

diff --git a/test/dundee-disconnect b/test/dundee-disconnect new file mode
100755 index 0000000..e67d8cd
--- /dev/null
+++ b/test/dundee-disconnect
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+
+import dbus
+import sys
+
+bus = dbus.SystemBus()
+
+if len(sys.argv) == 2:
+       path = sys.argv[1]
+else:
+       manager = dbus.Interface(bus.get_object('org.ofono.dundee', '/'),
+                       'org.ofono.dundee.Manager')
+       devices = manager.GetDevices()
+       path = devices[0][0]
+
+print "Disonnect device %s..." % path
+device = dbus.Interface(bus.get_object('org.ofono.dundee', path),
+                                               'org.ofono.dundee.Device')
+
+device.Disconnect()

Change this line to

device.SetProperty("Active", True)

That should do the trick.

The dbus method Disconnect() does not exist on org.ofono.dundee.Device, it 
cannot be found in device.c and doc/dundee-api.txt.
Why?

The documentation and the script are not in sync with the implementation. I'll fix that.

Documentation change:

Methods
        SetProperty()

Test script change:

        device.SetProperty("Active", True)

cheers,
daniel
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to