Network name for Wi-Fi Direct group should have prefix DIRECT-xy.

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 <r.kothari@samsung.corp-partner.google.com>
This commit is contained in:
Rohit Kothari 2025-04-16 10:31:56 -07:00 • committed by Paul Hu
commit 756adee79c

View file

@ -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