[PATCH BlueZ v2 3/4] test/test-mesh: Generate correct value for Device UUID

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

 



This ensures that the value of Device UUID when invoking
Join method is compliant with RFC 4122.
---
 test/test-mesh | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/test/test-mesh b/test/test-mesh
index 9e4783734..fbf2476bf 100755
--- a/test/test-mesh
+++ b/test/test-mesh
@@ -887,12 +887,11 @@ class MainMenu(Menu):
 			print(set_error('Provisioning agent not found'))
 			return
 
-		uuid = bytearray.fromhex("0a0102030405060708090A0B0C0D0E0F")
-		random.shuffle(uuid)
-		uuid_str = array_to_string(uuid)
+		uuid_bytes = uuid.uuid4().bytes
+		uuid_str = array_to_string(uuid_bytes)
 
 		print(set_yellow('Joining with UUID ') + set_green(uuid_str))
-		mesh_net.Join(app.get_path(), uuid,
+		mesh_net.Join(app.get_path(), uuid_bytes,
 			reply_handler=join_cb,
 			error_handler=join_error_cb)
 
-- 
2.26.2




[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