diff --git a/test/test-device b/test/test-device
index 2be5394..1e4597d 100755
--- a/test/test-device
+++ b/test/test-device
device.Disconnect()
sys.exit(0)
-if (args[0] == "discover"):
- if (len(args) < 2):
- print("Need address parameter")
- else:
- device = bluezutils.find_device(args[1], options.dev_id)
- if (len(args) < 3):
- pattern = ""
- else:
- pattern = args[2]
- services = device.DiscoverServices(pattern);
- for key in services.keys():
- p = re.compile(">.*?<")
- xml = p.sub("><", services[key].replace("\n", ""))
- print("[ 0x%5x ]" % (key))
- print(xml)
- print()
- sys.exit(0)
-
if (args[0] == "class"):
if (len(args) < 2):
print("Need address parameter")
props.Set("org.bluez.Device1", "Blocked", value)
sys.exit(0)
-if (args[0] == "services"):
- if (len(args) < 2):
- print("Need address parameter")
- else:
- device = bluezutils.find_device(args[1], options.dev_id)
- path = device.object_path
- props = dbus.Interface(bus.get_object("org.bluez", path),
- "org.freedesktop.DBus.Properties")
- services = props.Get("org.bluez.Device1", "Services")
- for path in services:
- print(path)
- sys.exit(0)
-
print("Unknown command")
sys.exit(1)