• 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 Wifi6eMultiChannelTest(WifiBaseTest):
22  """Tests for 6GHz band."""
23
24  def setup_class(self):
25    super().setup_class()
26
27    self.dut = self.android_devices[0]
28    self.ap = self.access_points[0]
29    self.wifi_network = self.ap.get_wifi_network("6g")
30
31  def setup_test(self):
32    super().setup_test()
33    for ad in self.android_devices:
34      ad.droid.wakeLockAcquireBright()
35      ad.droid.wakeUpNow()
36
37  def teardown_test(self):
38    super().teardown_test()
39    for ad in self.android_devices:
40      ad.droid.wakeLockRelease()
41      ad.droid.goToSleepNow()
42    wutils.reset_wifi(self.dut)
43
44  ### Tests ###
45
46  @test_tracker_info(uuid="74df7ca9-2e50-4f96-94b3-6d776849847f")
47  def test_connect_to_6g_channel_37(self):
48    """Connect to 6GHz WPA3 SAE on channel 37."""
49    self.ap.set_channel_and_apply("6g", 37)
50    wutils.connect_to_wifi_network(self.dut, self.wifi_network)
51
52  @test_tracker_info(uuid="9ebc2250-f98a-4f72-9d6e-94b4067ddd19")
53  def test_connect_to_6g_channel_53(self):
54    """Connect to 6GHz WPA3 SAE on channel 53."""
55    self.ap.set_channel_and_apply("6g", 53)
56    wutils.connect_to_wifi_network(self.dut, self.wifi_network)
57
58  @test_tracker_info(uuid="c6aa700b-0216-4693-8584-d95ec243e801")
59  def test_connect_to_6g_channel_69(self):
60    """Connect to 6GHz WPA3 SAE on channel 69."""
61    self.ap.set_channel_and_apply("6g", 69)
62    wutils.connect_to_wifi_network(self.dut, self.wifi_network)
63
64  @test_tracker_info(uuid="a122066c-ae55-4b8f-9260-240ac078167d")
65  def test_connect_to_6g_channel_85(self):
66    """Connect to 6GHz WPA3 SAE on channel 85."""
67    self.ap.set_channel_and_apply("6g", 85)
68    wutils.connect_to_wifi_network(self.dut, self.wifi_network)
69
70  @test_tracker_info(uuid="d222163b-ffc4-4e97-a5e3-c55ce7d24ab1")
71  def test_connect_to_6g_channel_101(self):
72    """Connect to 6GHz WPA3 SAE on channel 101."""
73    self.ap.set_channel_and_apply("6g", 101)
74    wutils.connect_to_wifi_network(self.dut, self.wifi_network)
75
76  @test_tracker_info(uuid="7251b966-7061-415c-9aca-4e7150383dd2")
77  def test_connect_to_6g_channel_117(self):
78    """Connect to 6GHz WPA3 SAE on channel 117."""
79    self.ap.set_channel_and_apply("6g", 117)
80    wutils.connect_to_wifi_network(self.dut, self.wifi_network)
81
82  @test_tracker_info(uuid="53b1e07e-66df-46b7-b55b-8045daae500f")
83  def test_connect_to_6g_channel_133(self):
84    """Connect to 6GHz WPA3 SAE on channel 133."""
85    self.ap.set_channel_and_apply("6g", 133)
86    wutils.connect_to_wifi_network(self.dut, self.wifi_network)
87
88  @test_tracker_info(uuid="16a09fcc-3fe1-4035-bb17-0f51b8d2b6f3")
89  def test_connect_to_6g_channel_149(self):
90    """Connect to 6GHz WPA3 SAE on channel 149."""
91    self.ap.set_channel_and_apply("6g", 149)
92    wutils.connect_to_wifi_network(self.dut, self.wifi_network)
93
94  @test_tracker_info(uuid="6ea66361-86cf-4cf1-ae26-48008914cea1")
95  def test_connect_to_6g_channel_165(self):
96    """Connect to 6GHz WPA3 SAE on channel 165."""
97    self.ap.set_channel_and_apply("6g", 165)
98    wutils.connect_to_wifi_network(self.dut, self.wifi_network)
99
100  @test_tracker_info(uuid="9e292afc-21fe-4bb7-81a9-f473b2e051bc")
101  def test_connect_to_6g_channel_181(self):
102    """Connect to 6GHz WPA3 SAE on channel 181."""
103    self.ap.set_channel_and_apply("6g", 181)
104    wutils.connect_to_wifi_network(self.dut, self.wifi_network)
105
106  @test_tracker_info(uuid="a7167923-9ccf-4e4f-a34a-707c61044d97")
107  def test_connect_to_6g_channel_197(self):
108    """Connect to 6GHz WPA3 SAE on channel 197."""
109    self.ap.set_channel_and_apply("6g", 197)
110    wutils.connect_to_wifi_network(self.dut, self.wifi_network)
111
112  @test_tracker_info(uuid="8d5c96f7-515a-4e85-a60d-eb2e7cc4613d")
113  def test_connect_to_6g_channel_213(self):
114    """Connect to 6GHz WPA3 SAE on channel 213."""
115    self.ap.set_channel_and_apply("6g", 213)
116    wutils.connect_to_wifi_network(self.dut, self.wifi_network)
117