blob: c3e3b231d5af1c19f1187d7d5f6b907e357dff94 [file] [log] [blame]
Bindu Mahadev27c2d292018-03-19 16:13:08 -07001#!/usr/bin/env python3.4
2#
3# Copyright 2018 - The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17import itertools
18import pprint
19import queue
20import sys
21import time
22
23import acts.base_test
24import acts.signals as signals
25import acts.test_utils.wifi.wifi_test_utils as wutils
26import acts.utils as utils
27
28from acts import asserts
29from acts.controllers.ap_lib import hostapd_constants
30from acts.test_decorators import test_tracker_info
31from acts.test_utils.tel.tel_test_utils import WIFI_CONFIG_APBAND_2G
32from acts.test_utils.tel.tel_test_utils import WIFI_CONFIG_APBAND_5G
33from acts.test_utils.wifi.WifiBaseTest import WifiBaseTest
34from threading import Thread
35
36WifiEnums = wutils.WifiEnums
37WIFI_CONFIG_APBAND_AUTO = -1
38
39class WifiSoftApAcsTest(WifiBaseTest):
40 """Tests for Automatic Channel Selection.
41
42 Test Bed Requirement:
43 * Two Android devices and an AP.
44 * 2GHz and 5GHz Wi-Fi network visible to the device.
45 """
46
47 def __init__(self, controllers):
48 WifiBaseTest.__init__(self, controllers)
49
50 def setup_class(self):
51 self.dut = self.android_devices[0]
52 self.dut_client = self.android_devices[1]
53 wutils.wifi_test_device_init(self.dut)
54 wutils.wifi_test_device_init(self.dut_client)
55 utils.require_sl4a((self.dut, self.dut_client))
56 utils.sync_device_time(self.dut)
57 utils.sync_device_time(self.dut_client)
58 # Set country code explicitly to "US".
59 self.dut.droid.wifiSetCountryCode(wutils.WifiEnums.CountryCode.US)
60 self.dut_client.droid.wifiSetCountryCode(wutils.WifiEnums.CountryCode.US)
61 # Enable verbose logging on the duts
62 self.dut.droid.wifiEnableVerboseLogging(1)
63 asserts.assert_equal(self.dut.droid.wifiGetVerboseLoggingLevel(), 1,
64 "Failed to enable WiFi verbose logging on the softap dut.")
65 self.dut_client.droid.wifiEnableVerboseLogging(1)
66 asserts.assert_equal(self.dut_client.droid.wifiGetVerboseLoggingLevel(), 1,
67 "Failed to enable WiFi verbose logging on the client dut.")
68 req_params = []
69 opt_param = ["iperf_server_address", "reference_networks"]
70 self.unpack_userparams(
71 req_param_names=req_params, opt_param_names=opt_param)
72 if "iperf_server_address" in self.user_params:
73 self.iperf_server = self.iperf_servers[0]
74 if hasattr(self, 'iperf_server'):
75 self.iperf_server.start()
76
77 def setup_test(self):
78 self.dut.droid.wakeLockAcquireBright()
79 self.dut.droid.wakeUpNow()
80
81 def teardown_test(self):
82 self.dut.droid.wakeLockRelease()
83 self.dut.droid.goToSleepNow()
84 wutils.stop_wifi_tethering(self.dut)
85 wutils.reset_wifi(self.dut)
86 wutils.reset_wifi(self.dut_client)
87 try:
88 if "AccessPoint" in self.user_params:
89 del self.user_params["reference_networks"]
90 del self.user_params["open_network"]
91 except:
92 pass
Bindu Mahadev0c378a52018-05-10 16:49:01 -070093 self.access_points[0].close()
Bindu Mahadev27c2d292018-03-19 16:13:08 -070094
95 def teardown_class(self):
96 if hasattr(self, 'iperf_server'):
97 self.iperf_server.stop()
98
99 def on_fail(self, test_name, begin_time):
100 self.dut.take_bug_report(test_name, begin_time)
101 self.dut.cat_adb_log(test_name, begin_time)
102
103 """Helper Functions"""
104
105 def run_iperf_client(self, params):
106 """Run iperf traffic after connection.
107
108 Args:
109 params: A tuple of network info and AndroidDevice object.
110
111 """
112 if "iperf_server_address" in self.user_params:
113 network, ad = params
114 SSID = network[WifiEnums.SSID_KEY]
115 self.log.info("Starting iperf traffic through {}".format(SSID))
116 port_arg = "-p {} -t {}".format(self.iperf_server.port, 3)
117 success, data = ad.run_iperf_client(self.iperf_server_address,
118 port_arg)
119 self.log.debug(pprint.pformat(data))
120 asserts.assert_true(success, "Error occurred in iPerf traffic.")
121 self.log.info("Finished iperf traffic through {}".format(SSID))
122
123 def start_softap_and_verify(self, band):
124 """Bring-up softap and verify AP mode and in scan results.
125
126 Args:
127 band: The band to use for softAP.
128
129 """
130 config = wutils.create_softap_config()
131 wutils.start_wifi_tethering(self.dut,
132 config[wutils.WifiEnums.SSID_KEY],
133 config[wutils.WifiEnums.PWD_KEY], band=band)
134 asserts.assert_true(self.dut.droid.wifiIsApEnabled(),
135 "SoftAp is not reported as running")
136 wutils.start_wifi_connection_scan_and_ensure_network_found(
137 self.dut_client, config[wutils.WifiEnums.SSID_KEY])
138 return config
139
140 def get_softap_acs(self, softap):
141 """Connect to the softap on client-dut and get the softap channel
142 information.
143
144 Args:
145 softap: The softap network configuration information.
146
147 """
148 wutils.connect_to_wifi_network(self.dut_client, softap,
149 check_connectivity=False)
150 softap_info = self.dut_client.droid.wifiGetConnectionInfo()
151 self.log.debug("DUT is connected to softAP %s with details: %s" %
152 (softap[wutils.WifiEnums.SSID_KEY], softap_info))
Bindu Mahadev0c378a52018-05-10 16:49:01 -0700153 frequency = softap_info['frequency']
Bindu Mahadev27c2d292018-03-19 16:13:08 -0700154 return hostapd_constants.CHANNEL_MAP[frequency]
155
156 def configure_ap(self, channel_2g=None, channel_5g=None):
157 """Configure and bring up AP on required channel.
158
159 Args:
160 channel_2g: The channel number to use for 2GHz network.
161 channel_5g: The channel number to use for 5GHz network.
162
163 """
164 if "AccessPoint" in self.user_params:
165 if not channel_2g:
166 self.legacy_configure_ap_and_start(channel_5g=channel_5g)
167 elif not channel_5g:
168 self.legacy_configure_ap_and_start(channel_2g=channel_2g)
169 else:
170 self.legacy_configure_ap_and_start(channel_2g=channel_2g,
171 channel_5g=chanel_5g)
172
173 def start_traffic_and_softap(self, network, softap_band):
174 """Start iPerf traffic on client dut, during softAP bring-up on dut.
175
176 Args:
177 network: Network information of the network to connect to.
178 softap_band: The band to use for softAP.
179
180 """
181 if not network:
182 # For a clean environment just bring up softap and return channel.
183 softap = self.start_softap_and_verify(softap_band)
184 channel = self.get_softap_acs(softap)
185 return channel
186 # Connect to the AP and start IPerf traffic, while we bring up softap.
187 wutils.connect_to_wifi_network(self.dut_client, network)
188 t = Thread(target=self.run_iperf_client,args=((network,self.dut_client),))
189 t.setDaemon(True)
190 t.start()
191 time.sleep(1)
192 softap = self.start_softap_and_verify(softap_band)
193 t.join()
194 channel = self.get_softap_acs(softap)
195 return channel
196
197 def verify_acs_channel(self, chan, avoid_chan):
198 """Verify ACS algorithm by ensuring that softAP came up on a channel,
199 different than the active channels.
200
201 Args:
202 chan: The channel number softap came-up on.
203 avoid_chan: The channel to avoid during this test.
204
205 """
206 if avoid_chan in range(1,12):
207 avoid_chan2 = hostapd_constants.AP_DEFAULT_CHANNEL_5G
Bindu Mahadevf014b282018-05-30 14:00:28 -0700208 elif avoid_chan in range(36, 166):
Bindu Mahadev27c2d292018-03-19 16:13:08 -0700209 avoid_chan2 = hostapd_constants.AP_DEFAULT_CHANNEL_2G
210 if chan == avoid_chan or chan == avoid_chan2:
211 raise signals.TestFailure("ACS chose the same channel that the "
212 "AP was beaconing on. Channel = %d" % chan)
213
214 """Tests"""
215 @test_tracker_info(uuid="3507bd18-e787-4380-8725-1872916d4267")
216 def test_softap_2G_clean_env(self):
217 """Test to bring up SoftAp on 2GHz in clean environment."""
218 network = None
219 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
220 if not chan in range(1, 12):
221 raise signals.TestFailure("ACS chose incorrect channel %d for 2GHz "
222 "band" % chan)
223
224 @test_tracker_info(uuid="3d18da8b-d29a-45f9-8018-5348e10099e9")
225 def test_softap_5G_clean_env(self):
226 """Test to bring up SoftAp on 5GHz in clean environment."""
227 network = None
228 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
229 if not chan in range(36, 166):
230 # Note: This does not treat DFS channel separately.
231 raise signals.TestFailure("ACS chose incorrect channel %d for 5GHz "
232 "band" % chan)
233
234 @test_tracker_info(uuid="cc353bda-3831-4d6e-b990-e501b8e4eafe")
235 def test_softap_auto_clean_env(self):
236 """Test to bring up SoftAp on AUTO-band in clean environment."""
237 network = None
238 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_AUTO)
239 if not chan in range(36, 166):
240 # Note: This does not treat DFS channel separately.
241 raise signals.TestFailure("ACS chose incorrect channel %d for 5GHz "
242 "band" % chan)
243
244 @test_tracker_info(uuid="a5f6a926-76d2-46a7-8136-426e35b5a5a8")
245 def test_softap_2G_avoid_channel_1(self):
246 """Test to configure AP and bring up SoftAp on 2G."""
247 self.configure_ap(channel_2g=1)
248 network = self.reference_networks[0]["2g"]
249 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
250 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
251 self.verify_acs_channel(chan, avoid_chan)
252
253 @test_tracker_info(uuid="757e2019-b027-40bf-a562-2b01f3e5957e")
254 def test_softap_5G_avoid_channel_1(self):
255 """Test to configure AP and bring up SoftAp on 5G."""
256 self.configure_ap(channel_2g=1)
257 network = self.reference_networks[0]["2g"]
258 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
259 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
260 self.verify_acs_channel(chan, avoid_chan)
261
262 @test_tracker_info(uuid="b96e39d1-9041-4662-a55f-22641c2e2b02")
263 def test_softap_2G_avoid_channel_2(self):
264 """Test to configure AP and bring up SoftAp on 2G."""
265 self.configure_ap(channel_2g=2)
266 network = self.reference_networks[0]["2g"]
267 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
268 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
269 self.verify_acs_channel(chan, avoid_chan)
270
271 @test_tracker_info(uuid="941c4e2b-ae35-4b49-aa81-13d3dc44b5b6")
272 def test_softap_5G_avoid_channel_2(self):
273 """Test to configure AP and bring up SoftAp on 5G."""
274 self.configure_ap(channel_2g=2)
275 network = self.reference_networks[0]["2g"]
276 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
277 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
278 self.verify_acs_channel(chan, avoid_chan)
279
280 @test_tracker_info(uuid="444c4a34-7f6b-4f02-9802-2e896e7d1796")
281 def test_softap_2G_avoid_channel_3(self):
282 """Test to configure AP and bring up SoftAp on 2G."""
283 self.configure_ap(channel_2g=3)
284 network = self.reference_networks[0]["2g"]
285 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
286 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
287 self.verify_acs_channel(chan, avoid_chan)
288
289 @test_tracker_info(uuid="eccd06b1-6df5-4144-8fda-1504cb822375")
290 def test_softap_5G_avoid_channel_3(self):
291 """Test to configure AP and bring up SoftAp on 5G."""
292 self.configure_ap(channel_2g=3)
293 network = self.reference_networks[0]["2g"]
294 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
295 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
296 self.verify_acs_channel(chan, avoid_chan)
297
298 @test_tracker_info(uuid="fb257644-2081-4c3d-8394-7a308dde0047")
299 def test_softap_2G_avoid_channel_4(self):
300 """Test to configure AP and bring up SoftAp on 2G."""
301 self.configure_ap(channel_2g=4)
302 network = self.reference_networks[0]["2g"]
303 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
304 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
305 self.verify_acs_channel(chan, avoid_chan)
306
307 @test_tracker_info(uuid="88b9cd16-4541-408a-8607-415fe60001f2")
308 def test_softap_5G_avoid_channel_4(self):
309 """Test to configure AP and bring up SoftAp on 5G."""
310 self.configure_ap(channel_2g=4)
311 network = self.reference_networks[0]["2g"]
312 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
313 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
314 self.verify_acs_channel(chan, avoid_chan)
315
316 @test_tracker_info(uuid="b3626ec8-50e8-412c-bdbe-5c5ade647d7b")
317 def test_softap_2G_avoid_channel_5(self):
318 """Test to configure AP and bring up SoftAp on 2G."""
319 self.configure_ap(channel_2g=5)
320 network = self.reference_networks[0]["2g"]
321 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
322 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
323 self.verify_acs_channel(chan, avoid_chan)
324
325 @test_tracker_info(uuid="45c4396b-9b0c-44f3-adf2-ea9c86fcab1d")
326 def test_softap_5G_avoid_channel_5(self):
327 """Test to configure AP and bring up SoftAp on 5G."""
328 self.configure_ap(channel_2g=5)
329 network = self.reference_networks[0]["2g"]
330 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
331 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
332 self.verify_acs_channel(chan, avoid_chan)
333
334 @test_tracker_info(uuid="f70634e7-c6fd-403d-8cd7-439fbbda6af0")
335 def test_softap_2G_avoid_channel_6(self):
336 """Test to configure AP and bring up SoftAp on 2G."""
337 self.configure_ap(channel_2g=6)
338 network = self.reference_networks[0]["2g"]
339 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
340 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
341 self.verify_acs_channel(chan, avoid_chan)
342
343 @test_tracker_info(uuid="f3341136-10bc-44e2-b9a8-2d27d3284b73")
344 def test_softap_5G_avoid_channel_6(self):
345 """Test to configure AP and bring up SoftAp on 5G."""
346 self.configure_ap(channel_2g=6)
347 network = self.reference_networks[0]["2g"]
348 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
349 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
350 self.verify_acs_channel(chan, avoid_chan)
351
352 @test_tracker_info(uuid="8129594d-1608-448b-8548-5a8c4022f2a1")
353 def test_softap_2G_avoid_channel_7(self):
354 """Test to configure AP and bring up SoftAp on 2G."""
355 self.configure_ap(channel_2g=7)
356 network = self.reference_networks[0]["2g"]
357 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
358 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
359 self.verify_acs_channel(chan, avoid_chan)
360
361 @test_tracker_info(uuid="7b470b82-d19b-438c-8f98-ce697e0eb474")
362 def test_softap_5G_avoid_channel_7(self):
363 """Test to configure AP and bring up SoftAp on 5G."""
364 self.configure_ap(channel_2g=7)
365 network = self.reference_networks[0]["2g"]
366 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
367 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
368 self.verify_acs_channel(chan, avoid_chan)
369
370 @test_tracker_info(uuid="11540182-d471-4bf0-8f8b-add89443c329")
371 def test_softap_2G_avoid_channel_8(self):
372 """Test to configure AP and bring up SoftAp on 2G."""
373 self.configure_ap(channel_2g=8)
374 network = self.reference_networks[0]["2g"]
375 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
376 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
377 self.verify_acs_channel(chan, avoid_chan)
378
379 @test_tracker_info(uuid="1280067c-389e-42e9-aa75-6bfbd61340f3")
380 def test_softap_5G_avoid_channel_8(self):
381 """Test to configure AP and bring up SoftAp on 5G."""
Bindu Mahadeved92b572019-02-08 16:38:20 -0800382 self.configure_ap(channel_2g=8)
Bindu Mahadev27c2d292018-03-19 16:13:08 -0700383 network = self.reference_networks[0]["2g"]
384 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
385 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
386 self.verify_acs_channel(chan, avoid_chan)
387
388 @test_tracker_info(uuid="6feeb83c-2723-49cb-93c1-6297d4a3d853")
389 def test_softap_2G_avoid_channel_9(self):
390 """Test to configure AP and bring up SoftAp on 2G."""
391 self.configure_ap(channel_2g=9)
392 network = self.reference_networks[0]["2g"]
393 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
394 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
395 self.verify_acs_channel(chan, avoid_chan)
396
397 @test_tracker_info(uuid="49a110cd-03e8-4e99-9327-5123eab40902")
398 def test_softap_5G_avoid_channel_9(self):
399 """Test to configure AP and bring up SoftAp on 5G."""
400 self.configure_ap(channel_2g=9)
401 network = self.reference_networks[0]["2g"]
402 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
403 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
404 self.verify_acs_channel(chan, avoid_chan)
405
406 @test_tracker_info(uuid="a03c9e45-8763-4b5c-bead-e574fb9899a2")
407 def test_softap_2G_avoid_channel_10(self):
408 """Test to configure AP and bring up SoftAp on 2G."""
409 self.configure_ap(channel_2g=10)
410 network = self.reference_networks[0]["2g"]
411 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
412 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
413 self.verify_acs_channel(chan, avoid_chan)
414
415 @test_tracker_info(uuid="c1a1d272-a646-4c2d-8425-09d2ae6ae8e6")
416 def test_softap_5G_avoid_channel_10(self):
417 """Test to configure AP and bring up SoftAp on 5G."""
418 self.configure_ap(channel_2g=10)
419 network = self.reference_networks[0]["2g"]
420 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
421 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
422 self.verify_acs_channel(chan, avoid_chan)
423
424 @test_tracker_info(uuid="f38d8911-92d4-4dcd-ba23-1e1667fa1f5a")
425 def test_softap_2G_avoid_channel_11(self):
426 """Test to configure AP and bring up SoftAp on 2G."""
427 self.configure_ap(channel_2g=11)
428 network = self.reference_networks[0]["2g"]
429 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
430 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
431 self.verify_acs_channel(chan, avoid_chan)
432
433 @test_tracker_info(uuid="24cc35ba-45e3-4b7a-9bc9-25b7abe92fa9")
434 def test_softap_5G_avoid_channel_11(self):
435 """Test to configure AP and bring up SoftAp on 5G."""
436 self.configure_ap(channel_2g=11)
437 network = self.reference_networks[0]["2g"]
438 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
439 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
440 self.verify_acs_channel(chan, avoid_chan)
441
442 @test_tracker_info(uuid="85aef720-4f3c-43bb-9de0-615b88c2bfe0")
443 def test_softap_2G_avoid_channel_36(self):
444 """Test to configure AP and bring up SoftAp on 2G."""
445 self.configure_ap(channel_5g=36)
446 network = self.reference_networks[0]["5g"]
447 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
448 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
449 self.verify_acs_channel(chan, avoid_chan)
450
451 @test_tracker_info(uuid="433e8db3-93b5-463e-a83c-0d4b9b9a8700")
452 def test_softap_5G_avoid_channel_36(self):
453 """Test to configure AP and bring up SoftAp on 5G."""
454 self.configure_ap(channel_5g=36)
455 network = self.reference_networks[0]["5g"]
456 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
457 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
458 self.verify_acs_channel(chan, avoid_chan)
459
460 @test_tracker_info(uuid="326e0e42-3219-4e63-a18d-5dc32c58e7d8")
461 def test_softap_2G_avoid_channel_40(self):
462 """Test to configure AP and bring up SoftAp on 2G."""
463 self.configure_ap(channel_5g=40)
464 network = self.reference_networks[0]["5g"]
465 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
466 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
467 self.verify_acs_channel(chan, avoid_chan)
468
469 @test_tracker_info(uuid="45953c03-c978-4775-a39b-fb7e70c8990a")
470 def test_softap_5G_avoid_channel_40(self):
471 """Test to configure AP and bring up SoftAp on 5G."""
472 self.configure_ap(channel_5g=40)
473 network = self.reference_networks[0]["5g"]
474 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
475 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
476 self.verify_acs_channel(chan, avoid_chan)
477
478 @test_tracker_info(uuid="e8e89cec-aa27-4780-8ff8-546d5af820f7")
479 def test_softap_2G_avoid_channel_44(self):
480 """Test to configure AP and bring up SoftAp on 2G."""
481 self.configure_ap(channel_5g=44)
482 network = self.reference_networks[0]["5g"]
483 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
484 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
485 self.verify_acs_channel(chan, avoid_chan)
486
487 @test_tracker_info(uuid="5e386d7d-d4c9-40cf-9333-06da55e11ba1")
488 def test_softap_5G_avoid_channel_44(self):
489 """Test to configure AP and bring up SoftAp on 5G."""
490 self.configure_ap(channel_5g=44)
491 network = self.reference_networks[0]["5g"]
492 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
493 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
494 self.verify_acs_channel(chan, avoid_chan)
495
496 @test_tracker_info(uuid="cb51dfca-f8de-4dfc-b513-e590c838c766")
497 def test_softap_2G_avoid_channel_48(self):
498 """Test to configure AP and bring up SoftAp on 2G."""
499 self.configure_ap(channel_5g=48)
500 network = self.reference_networks[0]["5g"]
501 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
502 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
503 self.verify_acs_channel(chan, avoid_chan)
504
505 @test_tracker_info(uuid="490b8ed1-196c-4941-b06b-5f0721ca440b")
506 def test_softap_5G_avoid_channel_48(self):
507 """Test to configure AP and bring up SoftAp on 5G."""
508 self.configure_ap(channel_5g=48)
509 network = self.reference_networks[0]["5g"]
510 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
511 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
512 self.verify_acs_channel(chan, avoid_chan)
513
514 @test_tracker_info(uuid="c5ab141b-e145-4cc1-b0d7-dd610cbfb462")
515 def test_softap_2G_avoid_channel_149(self):
516 """Test to configure AP and bring up SoftAp on 2G."""
517 self.configure_ap(channel_5g=149)
518 network = self.reference_networks[0]["5g"]
519 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
520 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
521 self.verify_acs_channel(chan, avoid_chan)
522
523 @test_tracker_info(uuid="108d7ef8-6fe7-49ba-b684-3820e881fcf0")
524 def test_softap_5G_avoid_channel_149(self):
525 """Test to configure AP and bring up SoftAp on 5G."""
526 self.configure_ap(channel_5g=149)
527 network = self.reference_networks[0]["5g"]
528 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
529 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
530 self.verify_acs_channel(chan, avoid_chan)
531
532 @test_tracker_info(uuid="f6926f40-0afc-41c5-9b38-c95a99788ff5")
533 def test_softap_2G_avoid_channel_153(self):
534 """Test to configure AP and bring up SoftAp on 2G."""
535 self.configure_ap(channel_5g=153)
536 network = self.reference_networks[0]["5g"]
537 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
538 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
539 self.verify_acs_channel(chan, avoid_chan)
540
541 @test_tracker_info(uuid="3d7b653b-c094-4c57-8e6a-047629b05216")
542 def test_softap_5G_avoid_channel_153(self):
543 """Test to configure AP and bring up SoftAp on 5G."""
544 self.configure_ap(channel_5g=153)
545 network = self.reference_networks[0]["5g"]
546 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
547 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
548 self.verify_acs_channel(chan, avoid_chan)
549
550 @test_tracker_info(uuid="b866ceea-d3ca-45d4-964a-4edea96026e6")
551 def test_softap_2G_avoid_channel_157(self):
552 """Test to configure AP and bring up SoftAp on 2G."""
553 self.configure_ap(channel_5g=157)
554 network = self.reference_networks[0]["5g"]
555 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
556 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
557 self.verify_acs_channel(chan, avoid_chan)
558
559 @test_tracker_info(uuid="03cb9163-bca3-442e-9691-6df82f8c51c7")
560 def test_softap_2G_avoid_channel_157(self):
561 """Test to configure AP and bring up SoftAp on 5G."""
562 self.configure_ap(channel_5g=157)
563 network = self.reference_networks[0]["5g"]
564 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
565 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
566 self.verify_acs_channel(chan, avoid_chan)
567
568 @test_tracker_info(uuid="ae10f23a-da70-43c8-9991-2c2f4a602724")
569 def test_softap_2G_avoid_channel_161(self):
570 """Test to configure AP and bring up SoftAp on 2G."""
571 self.configure_ap(channel_5g=161)
572 network = self.reference_networks[0]["5g"]
573 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
574 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
575 self.verify_acs_channel(chan, avoid_chan)
576
577 @test_tracker_info(uuid="521686c2-acfa-42d1-861b-aa10ac4dad34")
578 def test_softap_5G_avoid_channel_161(self):
579 """Test to configure AP and bring up SoftAp on 5G."""
580 self.configure_ap(channel_5g=161)
581 network = self.reference_networks[0]["5g"]
582 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
583 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
584 self.verify_acs_channel(chan, avoid_chan)
585
586 @test_tracker_info(uuid="77ebecd7-c036-463f-b77d-2cd70d89bc81")
587 def test_softap_2G_avoid_channel_165(self):
588 """Test to configure AP and bring up SoftAp on 2G."""
589 self.configure_ap(channel_5g=165)
590 network = self.reference_networks[0]["5g"]
591 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
592 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
593 self.verify_acs_channel(chan, avoid_chan)
594
595 @test_tracker_info(uuid="85d9386d-fe60-4708-9f91-75bbf8bec54f")
596 def test_softap_5G_avoid_channel_165(self):
597 """Test to configure AP and bring up SoftAp on 5G."""
598 self.configure_ap(channel_5g=165)
599 network = self.reference_networks[0]["5g"]
600 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
601 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
602 self.verify_acs_channel(chan, avoid_chan)