• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2#
3#   Copyright 2019 - 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
17from acts import asserts
18from acts import utils
19from acts.controllers.access_point import setup_ap
20from acts.controllers.ap_lib import hostapd_constants
21from acts.controllers.ap_lib.hostapd_security import Security
22from acts_contrib.test_utils.abstract_devices.wlan_device import create_wlan_device
23from acts_contrib.test_utils.wifi.WifiBaseTest import WifiBaseTest
24
25
26class VapeInteropTest(WifiBaseTest):
27    """Tests interoperability with mock third party AP profiles.
28
29    Test Bed Requirement:
30    * One Android or Fuchsia Device
31    * One Whirlwind Access Point
32    """
33
34    def setup_class(self):
35        super().setup_class()
36        if 'dut' in self.user_params:
37            if self.user_params['dut'] == 'fuchsia_devices':
38                self.dut = create_wlan_device(self.fuchsia_devices[0])
39            elif self.user_params['dut'] == 'android_devices':
40                self.dut = create_wlan_device(self.android_devices[0])
41            else:
42                raise ValueError('Invalid DUT specified in config. (%s)' %
43                                 self.user_params['dut'])
44        else:
45            # Default is an android device, just like the other tests
46            self.dut = create_wlan_device(self.android_devices[0])
47
48        self.access_point = self.access_points[0]
49
50        # Same for both 2g and 5g
51        self.ssid = utils.rand_ascii_str(hostapd_constants.AP_SSID_LENGTH_2G)
52        self.password = utils.rand_ascii_str(
53            hostapd_constants.AP_PASSPHRASE_LENGTH_2G)
54        self.security_profile_wpa2 = Security(
55            security_mode=hostapd_constants.WPA2_STRING,
56            password=self.password,
57            wpa2_cipher=hostapd_constants.WPA2_DEFAULT_CIPER)
58
59        self.access_point.stop_all_aps()
60
61    def setup_test(self):
62        if hasattr(self, "android_devices"):
63            for ad in self.android_devices:
64                ad.droid.wakeLockAcquireBright()
65                ad.droid.wakeUpNow()
66        self.dut.wifi_toggle_state(True)
67
68    def teardown_test(self):
69        if hasattr(self, "android_devices"):
70            for ad in self.android_devices:
71                ad.droid.wakeLockRelease()
72                ad.droid.goToSleepNow()
73        self.dut.turn_location_off_and_scan_toggle_off()
74        self.dut.disconnect()
75        self.dut.reset_wifi()
76        self.download_ap_logs()
77        self.access_point.stop_all_aps()
78
79    def on_fail(self, test_name, begin_time):
80        super().on_fail(test_name, begin_time)
81        self.access_point.stop_all_aps()
82
83    def test_associate_actiontec_pk5000_24ghz_open(self):
84        setup_ap(access_point=self.access_point,
85                 profile_name='actiontec_pk5000',
86                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
87                 ssid=self.ssid)
88        asserts.assert_true(self.dut.associate(self.ssid),
89                            'Failed to connect.')
90
91    def test_associate_actiontec_pk5000_24ghz_wpa2(self):
92        setup_ap(access_point=self.access_point,
93                 profile_name='actiontec_pk5000',
94                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
95                 ssid=self.ssid,
96                 security=self.security_profile_wpa2,
97                 password=self.password)
98        asserts.assert_true(
99            self.dut.associate(self.ssid,
100                               target_pwd=self.password,
101                               target_security=hostapd_constants.WPA2_STRING),
102            'Failed to connect.')
103
104    def test_associate_actiontec_mi424wr_24ghz_open(self):
105        setup_ap(access_point=self.access_point,
106                 profile_name='actiontec_mi424wr',
107                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
108                 ssid=self.ssid)
109        asserts.assert_true(self.dut.associate(self.ssid),
110                            'Failed to connect.')
111
112    def test_associate_actiontec_mi424wr_24ghz_wpa2(self):
113        setup_ap(access_point=self.access_point,
114                 profile_name='actiontec_mi424wr',
115                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
116                 ssid=self.ssid,
117                 security=self.security_profile_wpa2,
118                 password=self.password)
119        asserts.assert_true(
120            self.dut.associate(self.ssid,
121                               target_pwd=self.password,
122                               target_security=hostapd_constants.WPA2_STRING),
123            'Failed to connect.')
124
125    def test_associate_asus_rtac66u_24ghz_open(self):
126        setup_ap(access_point=self.access_point,
127                 profile_name='asus_rtac66u',
128                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
129                 ssid=self.ssid)
130        asserts.assert_true(self.dut.associate(self.ssid),
131                            'Failed to connect.')
132
133    def test_associate_asus_rtac66u_24ghz_wpa2(self):
134        setup_ap(access_point=self.access_point,
135                 profile_name='asus_rtac66u',
136                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
137                 ssid=self.ssid,
138                 security=self.security_profile_wpa2,
139                 password=self.password)
140        asserts.assert_true(
141            self.dut.associate(self.ssid,
142                               target_pwd=self.password,
143                               target_security=hostapd_constants.WPA2_STRING),
144            'Failed to connect.')
145
146    def test_associate_asus_rtac66u_5ghz_open(self):
147        setup_ap(access_point=self.access_point,
148                 profile_name='asus_rtac66u',
149                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
150                 ssid=self.ssid)
151        asserts.assert_true(self.dut.associate(self.ssid),
152                            'Failed to connect.')
153
154    def test_associate_asus_rtac66u_5ghz_wpa2(self):
155        setup_ap(access_point=self.access_point,
156                 profile_name='asus_rtac66u',
157                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
158                 ssid=self.ssid,
159                 security=self.security_profile_wpa2,
160                 password=self.password)
161        asserts.assert_true(
162            self.dut.associate(self.ssid,
163                               target_pwd=self.password,
164                               target_security=hostapd_constants.WPA2_STRING),
165            'Failed to connect.')
166
167    def test_associate_asus_rtac86u_24ghz_open(self):
168        setup_ap(access_point=self.access_point,
169                 profile_name='asus_rtac86u',
170                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
171                 ssid=self.ssid)
172        asserts.assert_true(self.dut.associate(self.ssid),
173                            'Failed to connect.')
174
175    def test_associate_asus_rtac86u_24ghz_wpa2(self):
176        setup_ap(access_point=self.access_point,
177                 profile_name='asus_rtac86u',
178                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
179                 ssid=self.ssid,
180                 security=self.security_profile_wpa2,
181                 password=self.password)
182        asserts.assert_true(
183            self.dut.associate(self.ssid,
184                               target_pwd=self.password,
185                               target_security=hostapd_constants.WPA2_STRING),
186            'Failed to connect.')
187
188    def test_associate_asus_rtac86u_5ghz_open(self):
189        setup_ap(access_point=self.access_point,
190                 profile_name='asus_rtac86u',
191                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
192                 ssid=self.ssid)
193        asserts.assert_true(self.dut.associate(self.ssid),
194                            'Failed to connect.')
195
196    def test_associate_asus_rtac86u_5ghz_wpa2(self):
197        setup_ap(access_point=self.access_point,
198                 profile_name='asus_rtac86u',
199                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
200                 ssid=self.ssid,
201                 security=self.security_profile_wpa2,
202                 password=self.password)
203        asserts.assert_true(
204            self.dut.associate(self.ssid,
205                               target_pwd=self.password,
206                               target_security=hostapd_constants.WPA2_STRING),
207            'Failed to connect.')
208
209    def test_associate_asus_rtac5300_24ghz_open(self):
210        setup_ap(access_point=self.access_point,
211                 profile_name='asus_rtac5300',
212                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
213                 ssid=self.ssid)
214        asserts.assert_true(self.dut.associate(self.ssid),
215                            'Failed to connect.')
216
217    def test_associate_asus_rtac5300_24ghz_wpa2(self):
218        setup_ap(access_point=self.access_point,
219                 profile_name='asus_rtac5300',
220                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
221                 ssid=self.ssid,
222                 security=self.security_profile_wpa2,
223                 password=self.password)
224        asserts.assert_true(
225            self.dut.associate(self.ssid,
226                               target_pwd=self.password,
227                               target_security=hostapd_constants.WPA2_STRING),
228            'Failed to connect.')
229
230    def test_associate_asus_rtac5300_5ghz_open(self):
231        setup_ap(access_point=self.access_point,
232                 profile_name='asus_rtac5300',
233                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
234                 ssid=self.ssid)
235        asserts.assert_true(self.dut.associate(self.ssid),
236                            'Failed to connect.')
237
238    def test_associate_asus_rtac5300_5ghz_wpa2(self):
239        setup_ap(access_point=self.access_point,
240                 profile_name='asus_rtac5300',
241                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
242                 ssid=self.ssid,
243                 security=self.security_profile_wpa2,
244                 password=self.password)
245        asserts.assert_true(
246            self.dut.associate(self.ssid,
247                               target_pwd=self.password,
248                               target_security=hostapd_constants.WPA2_STRING),
249            'Failed to connect.')
250
251    def test_associate_asus_rtn56u_24ghz_open(self):
252        setup_ap(access_point=self.access_point,
253                 profile_name='asus_rtn56u',
254                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
255                 ssid=self.ssid)
256        asserts.assert_true(self.dut.associate(self.ssid),
257                            'Failed to connect.')
258
259    def test_associate_asus_rtn56u_24ghz_wpa2(self):
260        setup_ap(access_point=self.access_point,
261                 profile_name='asus_rtn56u',
262                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
263                 ssid=self.ssid,
264                 security=self.security_profile_wpa2,
265                 password=self.password)
266        asserts.assert_true(
267            self.dut.associate(self.ssid,
268                               target_pwd=self.password,
269                               target_security=hostapd_constants.WPA2_STRING),
270            'Failed to connect.')
271
272    def test_associate_asus_rtn56u_5ghz_open(self):
273        setup_ap(access_point=self.access_point,
274                 profile_name='asus_rtn56u',
275                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
276                 ssid=self.ssid)
277        asserts.assert_true(self.dut.associate(self.ssid),
278                            'Failed to connect.')
279
280    def test_associate_asus_rtn56u_5ghz_wpa2(self):
281        setup_ap(access_point=self.access_point,
282                 profile_name='asus_rtn56u',
283                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
284                 ssid=self.ssid,
285                 security=self.security_profile_wpa2,
286                 password=self.password)
287        asserts.assert_true(
288            self.dut.associate(self.ssid,
289                               target_pwd=self.password,
290                               target_security=hostapd_constants.WPA2_STRING),
291            'Failed to connect.')
292
293    def test_associate_asus_rtn66u_24ghz_open(self):
294        setup_ap(access_point=self.access_point,
295                 profile_name='asus_rtn66u',
296                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
297                 ssid=self.ssid)
298        asserts.assert_true(self.dut.associate(self.ssid),
299                            'Failed to connect.')
300
301    def test_associate_asus_rtn66u_24ghz_wpa2(self):
302        setup_ap(access_point=self.access_point,
303                 profile_name='asus_rtn66u',
304                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
305                 ssid=self.ssid,
306                 security=self.security_profile_wpa2,
307                 password=self.password)
308        asserts.assert_true(
309            self.dut.associate(self.ssid,
310                               target_pwd=self.password,
311                               target_security=hostapd_constants.WPA2_STRING),
312            'Failed to connect.')
313
314    def test_associate_asus_rtn66u_5ghz_open(self):
315        setup_ap(access_point=self.access_point,
316                 profile_name='asus_rtn66u',
317                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
318                 ssid=self.ssid)
319        asserts.assert_true(self.dut.associate(self.ssid),
320                            'Failed to connect.')
321
322    def test_associate_asus_rtn66u_5ghz_wpa2(self):
323        setup_ap(access_point=self.access_point,
324                 profile_name='asus_rtn66u',
325                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
326                 ssid=self.ssid,
327                 security=self.security_profile_wpa2,
328                 password=self.password)
329        asserts.assert_true(
330            self.dut.associate(self.ssid,
331                               target_pwd=self.password,
332                               target_security=hostapd_constants.WPA2_STRING),
333            'Failed to connect.')
334
335    def test_associate_belkin_f9k1001v5_24ghz_open(self):
336        setup_ap(access_point=self.access_point,
337                 profile_name='belkin_f9k1001v5',
338                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
339                 ssid=self.ssid)
340        asserts.assert_true(self.dut.associate(self.ssid),
341                            'Failed to connect.')
342
343    def test_associate_belkin_f9k1001v5_24ghz_wpa2(self):
344        setup_ap(access_point=self.access_point,
345                 profile_name='belkin_f9k1001v5',
346                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
347                 ssid=self.ssid,
348                 security=self.security_profile_wpa2,
349                 password=self.password)
350        asserts.assert_true(
351            self.dut.associate(self.ssid,
352                               target_pwd=self.password,
353                               target_security=hostapd_constants.WPA2_STRING),
354            'Failed to connect.')
355
356    def test_associate_linksys_ea4500_24ghz_open(self):
357        setup_ap(access_point=self.access_point,
358                 profile_name='linksys_ea4500',
359                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
360                 ssid=self.ssid)
361        asserts.assert_true(self.dut.associate(self.ssid),
362                            'Failed to connect.')
363
364    def test_associate_linksys_ea4500_24ghz_wpa2(self):
365        setup_ap(access_point=self.access_point,
366                 profile_name='linksys_ea4500',
367                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
368                 ssid=self.ssid,
369                 security=self.security_profile_wpa2,
370                 password=self.password)
371        asserts.assert_true(
372            self.dut.associate(self.ssid,
373                               target_pwd=self.password,
374                               target_security=hostapd_constants.WPA2_STRING),
375            'Failed to connect.')
376
377    def test_associate_linksys_ea4500_5ghz_open(self):
378        setup_ap(access_point=self.access_point,
379                 profile_name='linksys_ea4500',
380                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
381                 ssid=self.ssid)
382        asserts.assert_true(self.dut.associate(self.ssid),
383                            'Failed to connect.')
384
385    def test_associate_linksys_ea4500_5ghz_wpa2(self):
386        setup_ap(access_point=self.access_point,
387                 profile_name='linksys_ea4500',
388                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
389                 ssid=self.ssid,
390                 security=self.security_profile_wpa2,
391                 password=self.password)
392        asserts.assert_true(
393            self.dut.associate(self.ssid,
394                               target_pwd=self.password,
395                               target_security=hostapd_constants.WPA2_STRING),
396            'Failed to connect.')
397
398    def test_associate_linksys_ea9500_24ghz_open(self):
399        setup_ap(access_point=self.access_point,
400                 profile_name='linksys_ea9500',
401                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
402                 ssid=self.ssid)
403        asserts.assert_true(self.dut.associate(self.ssid),
404                            'Failed to connect.')
405
406    def test_associate_linksys_ea9500_24ghz_wpa2(self):
407        setup_ap(access_point=self.access_point,
408                 profile_name='linksys_ea9500',
409                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
410                 ssid=self.ssid,
411                 security=self.security_profile_wpa2,
412                 password=self.password)
413        asserts.assert_true(
414            self.dut.associate(self.ssid,
415                               target_pwd=self.password,
416                               target_security=hostapd_constants.WPA2_STRING),
417            'Failed to connect.')
418
419    def test_associate_linksys_ea9500_5ghz_open(self):
420        setup_ap(access_point=self.access_point,
421                 profile_name='linksys_ea9500',
422                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
423                 ssid=self.ssid)
424        asserts.assert_true(self.dut.associate(self.ssid),
425                            'Failed to connect.')
426
427    def test_associate_linksys_ea9500_5ghz_wpa2(self):
428        setup_ap(access_point=self.access_point,
429                 profile_name='linksys_ea9500',
430                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
431                 ssid=self.ssid,
432                 security=self.security_profile_wpa2,
433                 password=self.password)
434        asserts.assert_true(
435            self.dut.associate(self.ssid,
436                               target_pwd=self.password,
437                               target_security=hostapd_constants.WPA2_STRING),
438            'Failed to connect.')
439
440    def test_associate_linksys_wrt1900acv2_24ghz_open(self):
441        setup_ap(access_point=self.access_point,
442                 profile_name='linksys_wrt1900acv2',
443                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
444                 ssid=self.ssid)
445        asserts.assert_true(self.dut.associate(self.ssid),
446                            'Failed to connect.')
447
448    def test_associate_linksys_wrt1900acv2_24ghz_wpa2(self):
449        setup_ap(access_point=self.access_point,
450                 profile_name='linksys_wrt1900acv2',
451                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
452                 ssid=self.ssid,
453                 security=self.security_profile_wpa2,
454                 password=self.password)
455        asserts.assert_true(
456            self.dut.associate(self.ssid,
457                               target_pwd=self.password,
458                               target_security=hostapd_constants.WPA2_STRING),
459            'Failed to connect.')
460
461    def test_associate_linksys_wrt1900acv2_5ghz_open(self):
462        setup_ap(access_point=self.access_point,
463                 profile_name='linksys_wrt1900acv2',
464                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
465                 ssid=self.ssid)
466        asserts.assert_true(self.dut.associate(self.ssid),
467                            'Failed to connect.')
468
469    def test_associate_linksys_wrt1900acv2_5ghz_wpa2(self):
470        setup_ap(access_point=self.access_point,
471                 profile_name='linksys_wrt1900acv2',
472                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
473                 ssid=self.ssid,
474                 security=self.security_profile_wpa2,
475                 password=self.password)
476        asserts.assert_true(
477            self.dut.associate(self.ssid,
478                               target_pwd=self.password,
479                               target_security=hostapd_constants.WPA2_STRING),
480            'Failed to connect.')
481
482    def test_associate_netgear_r7000_24ghz_open(self):
483        setup_ap(access_point=self.access_point,
484                 profile_name='netgear_r7000',
485                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
486                 ssid=self.ssid)
487        asserts.assert_true(self.dut.associate(self.ssid),
488                            'Failed to connect.')
489
490    def test_associate_netgear_r7000_24ghz_wpa2(self):
491        setup_ap(access_point=self.access_point,
492                 profile_name='netgear_r7000',
493                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
494                 ssid=self.ssid,
495                 security=self.security_profile_wpa2,
496                 password=self.password)
497        asserts.assert_true(
498            self.dut.associate(self.ssid,
499                               target_pwd=self.password,
500                               target_security=hostapd_constants.WPA2_STRING),
501            'Failed to connect.')
502
503    def test_associate_netgear_r7000_5ghz_open(self):
504        setup_ap(access_point=self.access_point,
505                 profile_name='netgear_r7000',
506                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
507                 ssid=self.ssid)
508        asserts.assert_true(self.dut.associate(self.ssid),
509                            'Failed to connect.')
510
511    def test_associate_netgear_r7000_5ghz_wpa2(self):
512        setup_ap(access_point=self.access_point,
513                 profile_name='netgear_r7000',
514                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
515                 ssid=self.ssid,
516                 security=self.security_profile_wpa2,
517                 password=self.password)
518        asserts.assert_true(
519            self.dut.associate(self.ssid,
520                               target_pwd=self.password,
521                               target_security=hostapd_constants.WPA2_STRING),
522            'Failed to connect.')
523
524    def test_associate_netgear_wndr3400_24ghz_open(self):
525        setup_ap(access_point=self.access_point,
526                 profile_name='netgear_wndr3400',
527                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
528                 ssid=self.ssid)
529        asserts.assert_true(self.dut.associate(self.ssid),
530                            'Failed to connect.')
531
532    def test_associate_netgear_wndr3400_24ghz_wpa2(self):
533        setup_ap(access_point=self.access_point,
534                 profile_name='netgear_wndr3400',
535                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
536                 ssid=self.ssid,
537                 security=self.security_profile_wpa2,
538                 password=self.password)
539        asserts.assert_true(
540            self.dut.associate(self.ssid,
541                               target_pwd=self.password,
542                               target_security=hostapd_constants.WPA2_STRING),
543            'Failed to connect.')
544
545    def test_associate_netgear_wndr3400_5ghz_open(self):
546        setup_ap(access_point=self.access_point,
547                 profile_name='netgear_wndr3400',
548                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
549                 ssid=self.ssid)
550        asserts.assert_true(self.dut.associate(self.ssid),
551                            'Failed to connect.')
552
553    def test_associate_netgear_wndr3400_5ghz_wpa2(self):
554        setup_ap(access_point=self.access_point,
555                 profile_name='netgear_wndr3400',
556                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
557                 ssid=self.ssid,
558                 security=self.security_profile_wpa2,
559                 password=self.password)
560        asserts.assert_true(
561            self.dut.associate(self.ssid,
562                               target_pwd=self.password,
563                               target_security=hostapd_constants.WPA2_STRING),
564            'Failed to connect.')
565
566    def test_associate_securifi_almond_24ghz_open(self):
567        setup_ap(access_point=self.access_point,
568                 profile_name='securifi_almond',
569                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
570                 ssid=self.ssid)
571        asserts.assert_true(self.dut.associate(self.ssid),
572                            'Failed to connect.')
573
574    def test_associate_securifi_almond_24ghz_wpa2(self):
575        setup_ap(access_point=self.access_point,
576                 profile_name='securifi_almond',
577                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
578                 ssid=self.ssid,
579                 security=self.security_profile_wpa2,
580                 password=self.password)
581        asserts.assert_true(
582            self.dut.associate(self.ssid,
583                               target_pwd=self.password,
584                               target_security=hostapd_constants.WPA2_STRING),
585            'Failed to connect.')
586
587    def test_associate_tplink_archerc5_24ghz_open(self):
588        setup_ap(access_point=self.access_point,
589                 profile_name='tplink_archerc5',
590                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
591                 ssid=self.ssid)
592        asserts.assert_true(self.dut.associate(self.ssid),
593                            'Failed to connect.')
594
595    def test_associate_tplink_archerc5_24ghz_wpa2(self):
596        setup_ap(access_point=self.access_point,
597                 profile_name='tplink_archerc5',
598                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
599                 ssid=self.ssid,
600                 security=self.security_profile_wpa2,
601                 password=self.password)
602        asserts.assert_true(
603            self.dut.associate(self.ssid,
604                               target_pwd=self.password,
605                               target_security=hostapd_constants.WPA2_STRING),
606            'Failed to connect.')
607
608    def test_associate_tplink_archerc5_5ghz_open(self):
609        setup_ap(access_point=self.access_point,
610                 profile_name='tplink_archerc5',
611                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
612                 ssid=self.ssid)
613        asserts.assert_true(self.dut.associate(self.ssid),
614                            'Failed to connect.')
615
616    def test_associate_tplink_archerc5_5ghz_wpa2(self):
617        setup_ap(access_point=self.access_point,
618                 profile_name='tplink_archerc5',
619                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
620                 ssid=self.ssid,
621                 security=self.security_profile_wpa2,
622                 password=self.password)
623        asserts.assert_true(
624            self.dut.associate(self.ssid,
625                               target_pwd=self.password,
626                               target_security=hostapd_constants.WPA2_STRING),
627            'Failed to connect.')
628
629    def test_associate_tplink_archerc7_24ghz_open(self):
630        setup_ap(access_point=self.access_point,
631                 profile_name='tplink_archerc7',
632                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
633                 ssid=self.ssid)
634        asserts.assert_true(self.dut.associate(self.ssid),
635                            'Failed to connect.')
636
637    def test_associate_tplink_archerc7_24ghz_wpa2(self):
638        setup_ap(access_point=self.access_point,
639                 profile_name='tplink_archerc7',
640                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
641                 ssid=self.ssid,
642                 security=self.security_profile_wpa2,
643                 password=self.password)
644        asserts.assert_true(
645            self.dut.associate(self.ssid,
646                               target_pwd=self.password,
647                               target_security=hostapd_constants.WPA2_STRING),
648            'Failed to connect.')
649
650    def test_associate_tplink_archerc7_5ghz_open(self):
651        setup_ap(access_point=self.access_point,
652                 profile_name='tplink_archerc7',
653                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
654                 ssid=self.ssid)
655        asserts.assert_true(self.dut.associate(self.ssid),
656                            'Failed to connect.')
657
658    def test_associate_tplink_archerc7_5ghz_wpa2(self):
659        setup_ap(access_point=self.access_point,
660                 profile_name='tplink_archerc7',
661                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
662                 ssid=self.ssid,
663                 security=self.security_profile_wpa2,
664                 password=self.password)
665        asserts.assert_true(
666            self.dut.associate(self.ssid,
667                               target_pwd=self.password,
668                               target_security=hostapd_constants.WPA2_STRING),
669            'Failed to connect.')
670
671    def test_associate_tplink_c1200_24ghz_open(self):
672        setup_ap(access_point=self.access_point,
673                 profile_name='tplink_c1200',
674                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
675                 ssid=self.ssid)
676        asserts.assert_true(self.dut.associate(self.ssid),
677                            'Failed to connect.')
678
679    def test_associate_tplink_c1200_24ghz_wpa2(self):
680        setup_ap(access_point=self.access_point,
681                 profile_name='tplink_c1200',
682                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
683                 ssid=self.ssid,
684                 security=self.security_profile_wpa2,
685                 password=self.password)
686        asserts.assert_true(
687            self.dut.associate(self.ssid,
688                               target_pwd=self.password,
689                               target_security=hostapd_constants.WPA2_STRING),
690            'Failed to connect.')
691
692    def test_associate_tplink_c1200_5ghz_open(self):
693        setup_ap(access_point=self.access_point,
694                 profile_name='tplink_c1200',
695                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
696                 ssid=self.ssid)
697        asserts.assert_true(self.dut.associate(self.ssid),
698                            'Failed to connect.')
699
700    def test_associate_tplink_c1200_5ghz_wpa2(self):
701        setup_ap(access_point=self.access_point,
702                 profile_name='tplink_c1200',
703                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
704                 ssid=self.ssid,
705                 security=self.security_profile_wpa2,
706                 password=self.password)
707        asserts.assert_true(
708            self.dut.associate(self.ssid,
709                               target_pwd=self.password,
710                               target_security=hostapd_constants.WPA2_STRING),
711            'Failed to connect.')
712
713    def test_associate_tplink_tlwr940n_24ghz_open(self):
714        setup_ap(access_point=self.access_point,
715                 profile_name='tplink_tlwr940n',
716                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
717                 ssid=self.ssid)
718        asserts.assert_true(self.dut.associate(self.ssid),
719                            'Failed to connect.')
720
721    def test_associate_tplink_tlwr940n_24ghz_wpa2(self):
722        setup_ap(access_point=self.access_point,
723                 profile_name='tplink_tlwr940n',
724                 channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
725                 ssid=self.ssid,
726                 security=self.security_profile_wpa2,
727                 password=self.password)
728        asserts.assert_true(
729            self.dut.associate(self.ssid,
730                               target_pwd=self.password,
731                               target_security=hostapd_constants.WPA2_STRING),
732            'Failed to connect.')
733