• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3.4
2#
3#   Copyright 2021 - Google
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"""
17    Test Script for 5G NSA MMWAVE Tethering scenarios
18"""
19
20import time
21
22from acts.utils import rand_ascii_str
23from acts.test_decorators import test_tracker_info
24from acts_contrib.test_utils.tel.TelephonyBaseTest import TelephonyBaseTest
25from acts_contrib.test_utils.tel.tel_defines import NETWORK_SERVICE_DATA
26from acts_contrib.test_utils.tel.tel_defines import RAT_3G
27from acts_contrib.test_utils.tel.tel_defines import RAT_4G
28from acts_contrib.test_utils.tel.tel_defines import RAT_5G
29from acts_contrib.test_utils.tel.tel_defines import TETHERING_PASSWORD_HAS_ESCAPE
30from acts_contrib.test_utils.tel.tel_defines import TETHERING_SPECIAL_SSID_LIST
31from acts_contrib.test_utils.tel.tel_defines import TETHERING_SPECIAL_PASSWORD_LIST
32from acts_contrib.test_utils.tel.tel_defines import WAIT_TIME_DATA_STATUS_CHANGE_DURING_WIFI_TETHERING
33from acts_contrib.test_utils.tel.tel_5g_test_utils import provision_device_for_5g
34from acts_contrib.test_utils.tel.tel_data_utils import test_wifi_tethering
35from acts_contrib.test_utils.tel.tel_data_utils import test_setup_tethering
36from acts_contrib.test_utils.tel.tel_data_utils import test_start_wifi_tethering_connect_teardown
37from acts_contrib.test_utils.tel.tel_data_utils import tethering_check_internet_connection
38from acts_contrib.test_utils.tel.tel_data_utils import verify_toggle_apm_tethering_internet_connection
39from acts_contrib.test_utils.tel.tel_data_utils import verify_tethering_entitlement_check
40from acts_contrib.test_utils.tel.tel_data_utils import wifi_tethering_cleanup
41from acts_contrib.test_utils.tel.tel_data_utils import wifi_tethering_setup_teardown
42from acts_contrib.test_utils.tel.tel_data_utils import wait_and_verify_device_internet_connection
43from acts_contrib.test_utils.tel.tel_data_utils import setup_device_internet_connection
44from acts_contrib.test_utils.tel.tel_data_utils import verify_toggle_data_during_wifi_tethering
45from acts_contrib.test_utils.tel.tel_phone_setup_utils import ensure_network_generation
46from acts_contrib.test_utils.tel.tel_test_utils import set_phone_silent_mode
47from acts_contrib.test_utils.tel.tel_test_utils import verify_internet_connection
48from acts_contrib.test_utils.tel.tel_wifi_utils import WIFI_CONFIG_APBAND_5G
49from acts_contrib.test_utils.tel.tel_wifi_utils import WIFI_CONFIG_APBAND_2G
50from acts_contrib.test_utils.tel.tel_wifi_utils import wifi_reset
51
52
53class Nsa5gMmwTetheringTest(TelephonyBaseTest):
54    def setup_class(self):
55        super().setup_class()
56        self.stress_test_number = self.get_stress_test_number()
57        self.provider = self.android_devices[0]
58        self.clients = self.android_devices[1:]
59        for ad in self.android_devices:
60            set_phone_silent_mode(self.log, ad, True)
61
62    def setup_test(self):
63        TelephonyBaseTest.setup_test(self)
64        self.number_of_devices = 1
65
66    def teardown_class(self):
67        TelephonyBaseTest.teardown_class(self)
68
69
70    """ Tests Begin """
71
72
73    @test_tracker_info(uuid="ae6c4a14-0474-448c-ad18-dcedfee7fa5a")
74    @TelephonyBaseTest.tel_test_wrap
75    def test_5g_nsa_mmw_wifi_tethering_to_5gwifi(self):
76        """WiFi Tethering test: 5G NSA MMW to WiFI 5G Tethering
77
78        1. DUT in 5G NSA MMW mode, attached.
79        2. DUT start 5G WiFi Tethering
80        3. PhoneB disable data, connect to DUT's softAP
81        4. Verify Internet access on DUT and PhoneB
82
83        Returns:
84            True if success.
85            False if failed.
86        """
87        return test_wifi_tethering(self.log,
88                                   self.provider,
89                                   self.clients,
90                                   self.clients,
91                                   RAT_5G,
92                                   WIFI_CONFIG_APBAND_5G,
93                                   check_interval=10,
94                                   check_iteration=10,
95                                   nr_type= 'mmwave')
96
97
98    @test_tracker_info(uuid="bf6ed593-4fe3-417c-9d04-ad71a8d3095e")
99    @TelephonyBaseTest.tel_test_wrap
100    def test_5g_nsa_mmw_wifi_tethering_to_2gwifi(self):
101        """WiFi Tethering test: 5G NSA MMW to WiFI 2G Tethering
102
103        1. DUT in 5G NSA MMW mode, attached.
104        2. DUT start 2.4G WiFi Tethering
105        3. PhoneB disable data, connect to DUT's softAP
106        4. Verify Internet access on DUT and PhoneB
107
108        Returns:
109            True if success.
110            False if failed.
111        """
112        return test_wifi_tethering(self.log,
113                                   self.provider,
114                                   self.clients,
115                                   self.clients,
116                                   RAT_5G,
117                                   WIFI_CONFIG_APBAND_2G,
118                                   check_interval=10,
119                                   check_iteration=10,
120                                   nr_type= 'mmwave')
121
122
123    @test_tracker_info(uuid="96c4bc30-6dd1-4f14-bdbd-bf40b8b24701")
124    @TelephonyBaseTest.tel_test_wrap
125    def test_5g_nsa_mmw_wifi_tethering_toggle_apm(self):
126        """WiFi Tethering test: Toggle APM during active WiFi 2.4G Tethering from 5G NSA MMW
127
128        1. DUT in 5G NSA MMW mode, idle.
129        2. DUT start 2.4G WiFi Tethering
130        3. PhoneB disable data, connect to DUT's softAP
131        4. Verify Internet access on DUT and PhoneB
132        5. DUT toggle APM on, verify WiFi tethering stopped, PhoneB lost WiFi connection.
133        6. DUT toggle APM off, verify PhoneA have cellular data and Internet connection.
134
135        Returns:
136            True if success.
137            False if failed.
138        """
139        try:
140            ssid = rand_ascii_str(10)
141            if not test_wifi_tethering(self.log,
142                                       self.provider,
143                                       self.clients,
144                                       [self.clients[0]],
145                                       RAT_5G,
146                                       WIFI_CONFIG_APBAND_2G,
147                                       check_interval=10,
148                                       check_iteration=2,
149                                       do_cleanup=False,
150                                       ssid=ssid,
151                                       nr_type= 'mmwave'):
152                self.log.error("WiFi Tethering failed.")
153                return False
154
155            if not verify_toggle_apm_tethering_internet_connection(self.log,
156                                                                   self.provider,
157                                                                   self.clients,
158                                                                   ssid):
159                return False
160        finally:
161            self.clients[0].droid.telephonyToggleDataConnection(True)
162            wifi_reset(self.log, self.clients[0])
163        return True
164
165
166    @test_tracker_info(uuid="e4f7deaa-a2be-4543-9364-17d704b2bf44")
167    @TelephonyBaseTest.tel_test_wrap
168    def test_5g_nsa_mmw_wifi_tethering_toggle_data(self):
169        """WiFi Tethering test: Toggle Data during active WiFi Tethering from 5G NSA MMW
170
171        1. DUT is on 5G NSA MMW, DUT data connection is on and idle.
172        2. DUT start 2.4G WiFi Tethering
173        3. PhoneB disable data, connect to DUT's softAP
174        4. Verify Internet access on DUT and PhoneB
175        5. Disable Data on DUT, verify PhoneB still connected to WiFi, but no Internet access.
176        6. Enable Data on DUT, verify PhoneB still connected to WiFi and have Internet access.
177
178        Returns:
179            True if success.
180            False if failed.
181        """
182        if not verify_toggle_data_during_wifi_tethering(self.log,
183                                                        self.provider,
184                                                        self.clients,
185                                                        new_gen=RAT_5G,
186                                                        nr_type= 'mmwave'):
187            return False
188        return True
189
190
191    @test_tracker_info(uuid="e6c30776-c245-42aa-a211-77dbd76c5217")
192    @TelephonyBaseTest.tel_test_wrap
193    def test_5g_nsa_mmw_wifi_tethering_entitlement_check(self):
194        """5G NSA MMW Tethering Entitlement Check Test
195
196        Get tethering entitlement check result.
197
198        Returns:
199            True if entitlement check returns True.
200        """
201
202        if not provision_device_for_5g(self.log, self.provider, nr_type= 'mmwave'):
203            return False
204        return verify_tethering_entitlement_check(self.log,
205                                                  self.provider)
206
207
208    @test_tracker_info(uuid="a73ca034-c90c-4579-96dd-9518d74c2a6c")
209    @TelephonyBaseTest.tel_test_wrap
210    def test_5g_nsa_mmw_wifi_tethering_ssid_quotes(self):
211        """WiFi Tethering test: 5G NSA MMW wifi tethering SSID name have quotes.
212        1. Set SSID name have double quotes.
213        2. Start LTE to WiFi (2.4G) tethering.
214        3. Verify tethering.
215
216        Returns:
217            True if success.
218            False if failed.
219        """
220        ssid = "\"" + rand_ascii_str(10) + "\""
221        self.log.info(
222            "Starting WiFi Tethering test with ssid: {}".format(ssid))
223
224        return test_wifi_tethering(self.log,
225                                   self.provider,
226                                   self.clients,
227                                   self.clients,
228                                   RAT_5G,
229                                   WIFI_CONFIG_APBAND_2G,
230                                   check_interval=10,
231                                   check_iteration=10,
232                                   ssid=ssid,
233                                   nr_type= 'mmwave')
234
235
236    @test_tracker_info(uuid="6702831b-f656-4410-a922-d47fae138d68")
237    @TelephonyBaseTest.tel_test_wrap
238    def test_5g_nsa_mmw_wifi_tethering_password_escaping_characters(self):
239        """WiFi Tethering test: 5G NSA MMW wifi tethering password have escaping characters.
240        1. Set password have escaping characters.
241            e.g.: '"DQ=/{Yqq;M=(^_3HzRvhOiL8S%`]w&l<Qp8qH)bs<4E9v_q=HLr^)}w$blA0Kg'
242        2. Start LTE to WiFi (2.4G) tethering.
243        3. Verify tethering.
244
245        Returns:
246            True if success.
247            False if failed.
248        """
249
250        password = TETHERING_PASSWORD_HAS_ESCAPE
251        self.log.info(
252            "Starting WiFi Tethering test with password: {}".format(password))
253
254        return test_wifi_tethering(self.log,
255                                   self.provider,
256                                   self.clients,
257                                   self.clients,
258                                   RAT_5G,
259                                   WIFI_CONFIG_APBAND_2G,
260                                   check_interval=10,
261                                   check_iteration=10,
262                                   password=password,
263                                   nr_type= 'mmwave')
264
265
266    @test_tracker_info(uuid="93cf9aa2-740f-42a4-92a8-c506ceb5d448")
267    @TelephonyBaseTest.tel_test_wrap
268    def test_5g_nsa_mmw_wifi_tethering_ssid(self):
269        """WiFi Tethering test: start 5G NSA MMW WiFi tethering with all kinds of SSIDs.
270
271        For each listed SSID, start WiFi tethering on DUT, client connect WiFi,
272        then tear down WiFi tethering.
273
274        Returns:
275            True if WiFi tethering succeed on all SSIDs.
276            False if failed.
277        """
278        if not test_setup_tethering(self.log, self.provider, self.clients, RAT_5G, nr_type= 'mmwave'):
279            self.log.error("Setup Failed.")
280            return False
281        ssid_list = TETHERING_SPECIAL_SSID_LIST
282        fail_list = {}
283        self.number_of_devices = 2
284        for ssid in ssid_list:
285            password = rand_ascii_str(8)
286            self.log.info("SSID: <{}>, Password: <{}>".format(ssid, password))
287            if not test_start_wifi_tethering_connect_teardown(self.log,
288                                                              self.provider,
289                                                              self.clients[0],
290                                                              ssid,
291                                                              password):
292                fail_list[ssid] = password
293
294        if len(fail_list) > 0:
295            self.log.error("Failed cases: {}".format(fail_list))
296            return False
297        else:
298            return True
299
300
301    @test_tracker_info(uuid="ed73ed58-781b-4fe4-991e-fa0cc2726b0d")
302    @TelephonyBaseTest.tel_test_wrap
303    def test_5g_nsa_mmw_wifi_tethering_password(self):
304        """WiFi Tethering test: start 5G NSA MMW WiFi tethering with all kinds of passwords.
305
306        For each listed password, start WiFi tethering on DUT, client connect WiFi,
307        then tear down WiFi tethering.
308
309        Returns:
310            True if WiFi tethering succeed on all passwords.
311            False if failed.
312        """
313        if not test_setup_tethering(self.log, self.provider, self.clients, RAT_5G, nr_type= 'mmwave'):
314            self.log.error("Setup Failed.")
315            return False
316        password_list = TETHERING_SPECIAL_PASSWORD_LIST
317        fail_list = {}
318        self.number_of_devices = 2
319        for password in password_list:
320            ssid = rand_ascii_str(8)
321            self.log.info("SSID: <{}>, Password: <{}>".format(ssid, password))
322            if not test_start_wifi_tethering_connect_teardown(self.log,
323                                                              self.provider,
324                                                              self.clients[0],
325                                                              ssid,
326                                                              password):
327                fail_list[ssid] = password
328
329        if len(fail_list) > 0:
330            self.log.error("Failed cases: {}".format(fail_list))
331            return False
332        else:
333            return True
334
335
336    # Invalid Live Test. Can't rely on the result of this test with live network.
337    # Network may decide not to change the RAT when data connection is active.
338    @test_tracker_info(uuid="ac18159b-ebfb-42d1-b97b-ff25c5cb7b9e")
339    @TelephonyBaseTest.tel_test_wrap
340    def test_5g_nsa_mmw_wifi_tethering_from_5g_nsa_mmw_to_3g(self):
341        """WiFi Tethering test: Change Cellular Data RAT generation from 5G NSA MMW to 3G,
342            during active WiFi Tethering.
343
344        1. DUT in 5G NSA MMW mode, idle.
345        2. DUT start 2.4G WiFi Tethering
346        3. PhoneB disable data, connect to DUT's softAP
347        4. Verily Internet access on DUT and PhoneB
348        5. Change DUT Cellular Data RAT generation from 5G NSA MMW to 3G.
349        6. Verify both DUT and PhoneB have Internet access.
350
351        Returns:
352            True if success.
353            False if failed.
354        """
355        if not test_setup_tethering(self.log, self.provider, self.clients, RAT_5G, nr_type= 'mmwave'):
356            self.log.error("Verify 5G Internet access failed.")
357            return False
358        try:
359            if not wifi_tethering_setup_teardown(
360                    self.log,
361                    self.provider, [self.clients[0]],
362                    ap_band=WIFI_CONFIG_APBAND_2G,
363                    check_interval=10,
364                    check_iteration=2,
365                    do_cleanup=False):
366                self.log.error("WiFi Tethering failed.")
367                return False
368
369            if not self.provider.droid.wifiIsApEnabled():
370                self.provider.log.error("Provider WiFi tethering stopped.")
371                return False
372
373            self.log.info("Provider change RAT from 5G NSA MMW to 3G.")
374            if not ensure_network_generation(
375                    self.log,
376                    self.provider,
377                    RAT_3G,
378                    voice_or_data=NETWORK_SERVICE_DATA,
379                    toggle_apm_after_setting=False):
380                self.provider.log.error("Provider failed to reselect to 3G.")
381                return False
382            time.sleep(WAIT_TIME_DATA_STATUS_CHANGE_DURING_WIFI_TETHERING)
383            if not verify_internet_connection(self.log, self.provider):
384                self.provider.log.error("Data not available on Provider.")
385                return False
386            if not self.provider.droid.wifiIsApEnabled():
387                self.provider.log.error("Provider WiFi tethering stopped.")
388                return False
389            if not tethering_check_internet_connection(
390                    self.log, self.provider, [self.clients[0]], 10, 5):
391                return False
392        finally:
393            if not wifi_tethering_cleanup(self.log, self.provider,
394                                          self.clients):
395                return False
396        return True
397
398
399    # Invalid Live Test. Can't rely on the result of this test with live network.
400    # Network may decide not to change the RAT when data connection is active.
401    @test_tracker_info(uuid="5a2dc4f4-f6ea-4162-b034-4919997161ac")
402    @TelephonyBaseTest.tel_test_wrap
403    def test_5g_nsa_mmw_wifi_tethering_from_3g_to_5g_nsa_mmw(self):
404        """WiFi Tethering test: Change Cellular Data RAT generation from 3G to 5G NSA MMW,
405            during active WiFi Tethering.
406
407        1. DUT in 3G mode, idle.
408        2. DUT start 2.4G WiFi Tethering
409        3. PhoneB disable data, connect to DUT's softAP
410        4. Verily Internet access on DUT and PhoneB
411        5. Change DUT Cellular Data RAT generation from 3G to nsa5G.
412        6. Verify both DUT and PhoneB have Internet access.
413
414        Returns:
415            True if success.
416            False if failed.
417        """
418        if not test_setup_tethering(self.log, self.provider, self.clients, RAT_3G):
419            self.log.error("Verify 3G Internet access failed.")
420            return False
421        try:
422            if not wifi_tethering_setup_teardown(
423                    self.log,
424                    self.provider, [self.clients[0]],
425                    ap_band=WIFI_CONFIG_APBAND_2G,
426                    check_interval=10,
427                    check_iteration=2,
428                    do_cleanup=False):
429                self.log.error("WiFi Tethering failed.")
430                return False
431
432            if not self.provider.droid.wifiIsApEnabled():
433                self.log.error("Provider WiFi tethering stopped.")
434                return False
435
436            self.log.info("Provider change RAT from 3G to 5G NSA MMW.")
437            if not ensure_network_generation(
438                    self.log,
439                    self.provider,
440                    RAT_5G,
441                    voice_or_data=NETWORK_SERVICE_DATA,
442                    toggle_apm_after_setting=False,
443                    nr_type= 'mmwave'):
444                self.log.error("Provider failed to reselect to 5G NSA MMW")
445                return False
446
447            time.sleep(WAIT_TIME_DATA_STATUS_CHANGE_DURING_WIFI_TETHERING)
448            if not verify_internet_connection(self.log, self.provider):
449                self.provider.log.error("Data not available on Provider.")
450                return False
451            if not self.provider.droid.wifiIsApEnabled():
452                self.provider.log.error("Provider WiFi tethering stopped.")
453                return False
454            if not tethering_check_internet_connection(
455                    self.log, self.provider, [self.clients[0]], 10, 5):
456                return False
457        finally:
458            if not wifi_tethering_cleanup(self.log, self.provider, [self.clients[0]]):
459                return False
460        return True
461
462
463    # Invalid Live Test. Can't rely on the result of this test with live network.
464    # Network may decide not to change the RAT when data connection is active.
465    @test_tracker_info(uuid="ac0a5f75-3f08-40fb-83ca-3312019680b9")
466    @TelephonyBaseTest.tel_test_wrap
467    def test_5g_nsa_mmw_wifi_tethering_from_5g_nsa_mmw_to_4g(self):
468        """WiFi Tethering test: Change Cellular Data RAT generation from 5G NSA MMW to 4G,
469            during active WiFi Tethering.
470
471        1. DUT in 5G NSA MMW mode, idle.
472        2. DUT start 2.4G WiFi Tethering
473        3. PhoneB disable data, connect to DUT's softAP
474        4. Verily Internet access on DUT and PhoneB
475        5. Change DUT Cellular Data RAT generation from 5G NSA MMW to LTE.
476        6. Verify both DUT and PhoneB have Internet access.
477
478        Returns:
479            True if success.
480            False if failed.
481        """
482        if not test_setup_tethering(self.log, self.provider, self.clients, RAT_5G, nr_type= 'mmwave'):
483            self.log.error("Verify 5G Internet access failed.")
484            return False
485        try:
486            if not wifi_tethering_setup_teardown(
487                    self.log,
488                    self.provider, [self.clients[0]],
489                    ap_band=WIFI_CONFIG_APBAND_2G,
490                    check_interval=10,
491                    check_iteration=2,
492                    do_cleanup=False):
493                self.log.error("WiFi Tethering failed.")
494                return False
495
496            if not self.provider.droid.wifiIsApEnabled():
497                self.provider.log.error("Provider WiFi tethering stopped.")
498                return False
499
500            self.log.info("Provider change RAT from 5G to LTE.")
501            if not ensure_network_generation(
502                    self.log,
503                    self.provider,
504                    RAT_4G,
505                    voice_or_data=NETWORK_SERVICE_DATA,
506                    toggle_apm_after_setting=False):
507                self.provider.log.error("Provider failed to reselect to 4G.")
508                return False
509            time.sleep(WAIT_TIME_DATA_STATUS_CHANGE_DURING_WIFI_TETHERING)
510            if not verify_internet_connection(self.log, self.provider):
511                self.provider.log.error("Data not available on Provider.")
512                return False
513            if not self.provider.droid.wifiIsApEnabled():
514                self.provider.log.error("Provider WiFi tethering stopped.")
515                return False
516            if not tethering_check_internet_connection(
517                    self.log, self.provider, [self.clients[0]], 10, 5):
518                return False
519        finally:
520            if not wifi_tethering_cleanup(self.log, self.provider,
521                                          self.clients):
522                return False
523        return True
524
525
526    # Invalid Live Test. Can't rely on the result of this test with live network.
527    # Network may decide not to change the RAT when data connection is active.
528    @test_tracker_info(uuid="9335bfdc-d0df-4c5e-99fd-6492a2ce2947")
529    @TelephonyBaseTest.tel_test_wrap
530    def test_5g_nsa_mmw_wifi_tethering_from_4g_to_5g_nsa_mmw(self):
531        """WiFi Tethering test: Change Cellular Data RAT generation from 4G to 5G NSA MMW,
532            during active WiFi Tethering.
533
534        1. DUT in 4G mode, idle.
535        2. DUT start 2.4G WiFi Tethering
536        3. PhoneB disable data, connect to DUT's softAP
537        4. Verily Internet access on DUT and PhoneB
538        5. Change DUT Cellular Data RAT generation from 4G to 5G NSA MMW.
539        6. Verify both DUT and PhoneB have Internet access.
540
541        Returns:
542            True if success.
543            False if failed.
544        """
545        if not test_setup_tethering(self.log, self.provider, self.clients, RAT_4G):
546            self.log.error("Verify 4G Internet access failed.")
547            return False
548        try:
549            if not wifi_tethering_setup_teardown(
550                    self.log,
551                    self.provider, [self.clients[0]],
552                    ap_band=WIFI_CONFIG_APBAND_2G,
553                    check_interval=10,
554                    check_iteration=2,
555                    do_cleanup=False):
556                self.log.error("WiFi Tethering failed.")
557                return False
558
559            if not self.provider.droid.wifiIsApEnabled():
560                self.log.error("Provider WiFi tethering stopped.")
561                return False
562
563            self.log.info("Provider change RAT from 4G to 5G.")
564            if not ensure_network_generation(
565                    self.log,
566                    self.provider,
567                    RAT_5G,
568                    voice_or_data=NETWORK_SERVICE_DATA,
569                    toggle_apm_after_setting=False,
570                    nr_type= 'mmwave'):
571                self.log.error("Provider failed to reselect to 5G NSA MMW")
572                return False
573
574            time.sleep(WAIT_TIME_DATA_STATUS_CHANGE_DURING_WIFI_TETHERING)
575            if not verify_internet_connection(self.log, self.provider):
576                self.provider.log.error("Data not available on Provider.")
577                return False
578            if not self.provider.droid.wifiIsApEnabled():
579                self.provider.log.error("Provider WiFi tethering stopped.")
580                return False
581            if not tethering_check_internet_connection(
582                    self.log, self.provider, [self.clients[0]], 10, 5):
583                return False
584        finally:
585            if not wifi_tethering_cleanup(self.log, self.provider, [self.clients[0]]):
586                return False
587        return True
588
589
590    @test_tracker_info(uuid="7956472e-962c-4bbe-a08d-37901935c9ac")
591    @TelephonyBaseTest.tel_test_wrap
592    def test_5g_nsa_mmw_wifi_tethering_no_password(self):
593        """WiFi Tethering test: Start 5G NSA MMW WiFi tethering with no password
594
595        1. DUT is idle.
596        2. DUT start 2.4G WiFi Tethering, with no WiFi password.
597        3. PhoneB disable data, connect to DUT's softAP
598        4. Verify Internet access on DUT and PhoneB
599
600        Returns:
601            True if success.
602            False if failed.
603        """
604        return test_wifi_tethering(self.log,
605                                   self.provider,
606                                   self.clients,
607                                   [self.clients[0]],
608                                   RAT_5G,
609                                   WIFI_CONFIG_APBAND_2G,
610                                   check_interval=10,
611                                   check_iteration=10,
612                                   password="",
613                                   nr_type= 'mmwave')
614
615
616    @test_tracker_info(uuid="39e73f91-79c7-4cc0-9fa0-a737f88889e8")
617    @TelephonyBaseTest.tel_test_wrap
618    def test_5g_nsa_mmw_wifi_tethering_disable_resume_wifi(self):
619        """WiFi Tethering test: WiFI connected to 2.4G network,
620        start (LTE) 2.4G WiFi tethering, then stop tethering over 5G NSA MMW
621
622        1. DUT in data connected, idle. WiFi connected to 2.4G Network
623        2. DUT start 2.4G WiFi Tethering
624        3. PhoneB disable data, connect to DUT's softAP
625        4. Verify Internet access on DUT and PhoneB
626        5. Disable WiFi Tethering on DUT.
627        6. Verify DUT automatically connect to previous WiFI network
628
629        Returns:
630            True if success.
631            False if failed.
632        """
633        # Ensure provider connecting to wifi network.
634        def setup_provider_internet_connection():
635            return setup_device_internet_connection(self.log,
636                                                    self.provider,
637                                                    self.wifi_network_ssid,
638                                                    self.wifi_network_pass)
639
640        if not test_wifi_tethering(self.log,
641                                   self.provider,
642                                   self.clients,
643                                   [self.clients[0]],
644                                   RAT_5G,
645                                   WIFI_CONFIG_APBAND_2G,
646                                   check_interval=10,
647                                   check_iteration=2,
648                                   pre_teardown_func=setup_provider_internet_connection,
649                                   nr_type= 'mmwave'):
650            return False
651
652        if not wait_and_verify_device_internet_connection(self.log, self.provider):
653            return False
654        return True
655
656
657    """ Tests End """
658