• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2#   Copyright 2021 - The Android Open Source Project
3#
4#   Licensed under the Apache License, Version 2.0 (the "License");
5#   you may not use this file except in compliance with the License.
6#   You may obtain a copy of the License at
7#
8#   http://www.apache.org/licenses/LICENSE-2.0
9#
10#   Unless required by applicable law or agreed to in writing, software
11#   distributed under the License is distributed on an "AS IS" BASIS,
12#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13#   See the License for the specific language governing permissions and
14#   limitations under the License.
15
16from acts.test_decorators import test_tracker_info
17import acts_contrib.test_utils.wifi.wifi_test_utils as wutils
18from acts_contrib.test_utils.wifi.WifiBaseTest import WifiBaseTest
19
20
21class WifiHiddenSSID6eTest(WifiBaseTest):
22  """Tests for hidden 6e tests.
23
24  Test Bed Requirement:
25    1 Android devices, 1 Asus AXE11000 Access Point.
26  """
27
28  def setup_class(self):
29    super().setup_class()
30
31    self.dut = self.android_devices[0]
32    self.ap = self.access_points[0]
33    self.ap.configure_hidden_network_and_apply("6g", True)
34
35  def teardown_class(self):
36    super.teardown_class()
37    self.ap.configure_hidden_network_and_apply("6g", False)
38
39  def setup_test(self):
40    super().setup_test()
41    for ad in self.android_devices:
42      ad.droid.wakeLockAcquireBright()
43      ad.droid.wakeUpNow()
44
45  def teardown_test(self):
46    super().teardown_test()
47    for ad in self.android_devices:
48      ad.droid.wakeLockRelease()
49      ad.droid.goToSleepNow()
50    wutils.reset_wifi(self.dut)
51
52  ### Tests ###
53
54  @test_tracker_info(uuid="233b1019-2025-4a5b-8c6f-c442c189fe17")
55  def test_connect_to_6g_wpa3_sae_hidden(self):
56    """Connect to 6GHz WPA3 SAE hidden."""
57    self.ap.configure_ap({"6g": {"security": "sae"}})
58    wifi_network = self.ap.get_wifi_network("6g")
59    wifi_network["hiddenSSID"] = True
60    wutils.connect_to_wifi_network(self.dut, wifi_network, hidden=True)
61
62  @test_tracker_info(uuid="303b0d51-5427-4718-9ac1-45b65dbde56f")
63  def test_connect_to_6g_wpa3_owe_hidden(self):
64    """Connect to 6GHz WPA3 OWE hidden."""
65    self.ap.configure_ap({"6g": {"security": "owe"}})
66    wifi_network = self.ap.get_wifi_network("6g")
67    wutils.connect_to_wifi_network(self.dut, wifi_network, hidden=True)
68