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