From 756adee79c995facf38605cbcffbed7906010b36 Mon Sep 17 00:00:00 2001 From: Rohit Kothari Date: Wed, 16 Apr 2025 10:31:56 -0700 Subject: [PATCH] Network name for Wi-Fi Direct group should have prefix DIRECT-xy. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Network name for Wi-Fi Direct group must starts with the prefix DIRECT-xy. But CTS sometimes makes name with non-character in the position of “xy”. To prevent issue, network name needs to be generated with the prefix DIRECT-xy. Bug: 408245757 Test: atest CtsConnectivityMultiDevicesTestCases Flag: EXEMPT bug fix Change-Id: Ida07616b920b32dadd76f732ff2d87cc6ecc960d Signed-off-by: Rohit Kothari --- staticlibs/testutils/host/python/wifip2p_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/staticlibs/testutils/host/python/wifip2p_utils.py b/staticlibs/testutils/host/python/wifip2p_utils.py index ef6af75708..8192a6b4ea 100644 --- a/staticlibs/testutils/host/python/wifip2p_utils.py +++ b/staticlibs/testutils/host/python/wifip2p_utils.py @@ -51,7 +51,10 @@ def setup_wifi_p2p_server_and_client( client_name = client.getDeviceName() # Generate Wi-Fi P2P group passphrase with random characters. - group_name = "DIRECT-" + tether_utils.generate_uuid32_base64() + # network name must starts with prefix "DIRECT-", followed by any two + # random chars from the set ('A' - 'Z', 'a' - 'z', '0' - '9') + # This follows the documentation on WifiP2pConfig.Builder#setNetworkName. + group_name = "DIRECT-XY" + tether_utils.generate_uuid32_base64() group_passphrase = tether_utils.generate_uuid32_base64() # Server creates a Wi-Fi P2P group