[RFC BlueZ v0 04/13] test: Show human-friendly UUIDs in list-devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mikel Astiz <mikel.astiz@xxxxxxxxxxxx>

Instead of showing the hexadecimal UUID, convert it to a human-friendly
alias as defined in the internal translation table in bluezutils.py.
---
 test/list-devices | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/list-devices b/test/list-devices
index 0aac217..57f9ba1 100755
--- a/test/list-devices
+++ b/test/list-devices
@@ -3,6 +3,7 @@
 from __future__ import absolute_import, print_function, unicode_literals
 
 import dbus
+import bluezutils
 
 bus = dbus.SystemBus()
 
@@ -19,7 +20,10 @@ def extract_objects(object_list):
 def extract_uuids(uuid_list):
 	list = ""
 	for uuid in uuid_list:
-		if (uuid.endswith("-0000-1000-8000-00805f9b34fb")):
+		alias = bluezutils.get_uuid_alias(uuid)
+		if alias:
+			val = alias
+		elif (uuid.endswith("-0000-1000-8000-00805f9b34fb")):
 			if (uuid.startswith("0000")):
 				val = "0x" + uuid[4:8]
 			else:
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux