summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtest/list-devices38
-rw-r--r--tools/sdptool.c5
2 files changed, 38 insertions, 5 deletions
diff --git a/test/list-devices b/test/list-devices
index ec6c580a..511d0cfa 100755
--- a/test/list-devices
+++ b/test/list-devices
@@ -7,6 +7,13 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object("org.bluez", "/"),
"org.bluez.Manager")
+def extract_objects(object_list):
+ list = ""
+ for object in object_list:
+ val = str(object)
+ list = list + val[val.rfind("/") + 1:] + " "
+ return list
+
def extract_uuids(uuid_list):
list = ""
for uuid in uuid_list:
@@ -29,9 +36,17 @@ for i in adapter_list:
properties = adapter.GetProperties()
for key in properties.keys():
- print " %s = %s" % (key, properties[key])
+ value = properties[key]
+ if (key == "Devices"):
+ list = extract_objects(value)
+ print " %s = %s" % (key, list)
+ else:
+ print " %s = %s" % (key, value)
- device_list = adapter.ListDevices()
+ try:
+ device_list = properties["Devices"]
+ except:
+ device_list = []
for n in device_list:
device = dbus.Interface(bus.get_object("org.bluez", n),
@@ -41,7 +56,10 @@ for i in adapter_list:
properties = device.GetProperties()
for key in properties.keys():
value = properties[key]
- if (key == "UUIDs"):
+ if (key == "Nodes"):
+ list = extract_objects(value)
+ print " %s = %s" % (key, list)
+ elif (key == "UUIDs"):
list = extract_uuids(value)
print " %s = %s" % (key, list)
elif (key == "Class"):
@@ -49,4 +67,18 @@ for i in adapter_list:
else:
print " %s = %s" % (key, value)
+ try:
+ node_list = properties["Nodes"]
+ except:
+ node_list = []
+
+ for x in node_list:
+ node = dbus.Interface(bus.get_object("org.bluez", x),
+ "org.bluez.Node")
+ print " [ " + x + " ]"
+
+ properties = node.GetProperties()
+ for key in properties.keys():
+ print " %s = %s" % (key, properties[key])
+
print
diff --git a/tools/sdptool.c b/tools/sdptool.c
index db88bf3d..e2f2a29d 100644
--- a/tools/sdptool.c
+++ b/tools/sdptool.c
@@ -3935,8 +3935,9 @@ static int cmd_records(int argc, char **argv)
{
struct search_context context;
uint32_t base[] = { 0x10000, 0x10300, 0x10500,
- 0x1002e, 0x110b, 0x90000, 0x2008000,
- 0x4000000, 0x100000, 0x1000000, 0x4f491100 };
+ 0x1002e, 0x110b, 0x90000, 0x2008000,
+ 0x4000000, 0x100000, 0x1000000,
+ 0x4f491100, 0x4f491200 };
bdaddr_t bdaddr;
int i, n, opt, err = 0, num = 32;