• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3.4
2#
3#   Copyright 2022 - 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 SMS scenarios
18"""
19
20from acts.test_decorators import test_tracker_info
21from acts_contrib.test_utils.tel.TelephonyBaseTest import TelephonyBaseTest
22from acts_contrib.test_utils.tel.tel_defines import WFC_MODE_WIFI_PREFERRED
23from acts_contrib.test_utils.tel.tel_defines import WFC_MODE_CELLULAR_PREFERRED
24from acts_contrib.test_utils.tel.tel_5g_test_utils import provision_device_for_5g
25from acts_contrib.test_utils.tel.tel_data_utils import active_file_download_task
26from acts_contrib.test_utils.tel.tel_message_utils import message_test
27from acts_contrib.test_utils.tel.tel_phone_setup_utils import ensure_phones_idle
28from acts_contrib.test_utils.tel.tel_phone_setup_utils import phone_setup_volte
29from acts_contrib.test_utils.tel.tel_test_utils import install_message_apk
30from acts_contrib.test_utils.tel.tel_test_utils import toggle_airplane_mode
31from acts_contrib.test_utils.tel.tel_test_utils import verify_internet_connection
32from acts.libs.utils.multithread import run_multithread_func
33
34
35class Nsa5gSmsTest(TelephonyBaseTest):
36    def setup_class(self):
37        super().setup_class()
38
39        self.message_util = self.user_params.get("message_apk", None)
40        if isinstance(self.message_util, list):
41            self.message_util = self.message_util[0]
42
43        if self.message_util:
44            ads = self.android_devices
45            for ad in ads:
46                install_message_apk(ad, self.message_util)
47
48    def setup_test(self):
49        TelephonyBaseTest.setup_test(self)
50
51    def teardown_test(self):
52        ensure_phones_idle(self.log, self.android_devices)
53
54    """ Tests Begin """
55
56    @test_tracker_info(uuid="4a64a262-7433-4a7f-b5c6-a36ff60aeaa2")
57    @TelephonyBaseTest.tel_test_wrap
58    def test_5g_nsa_sms_mo_mt(self):
59        """Test SMS between two phones in 5g NSA
60
61        Provision devices in 5g NSA
62        Send and Verify SMS from PhoneA to PhoneB
63        Verify both devices are still on 5g NSA
64
65        Returns:
66            True if success.
67            False if failed.
68        """
69        return message_test(self.log,
70                            self.android_devices[0],
71                            self.android_devices[1],
72                            mo_rat='5g',
73                            mt_rat='5g')
74
75    @test_tracker_info(uuid="52b16764-0c9e-45c0-910f-a39d17c7cf7e")
76    @TelephonyBaseTest.tel_test_wrap
77    def test_5g_nsa_sms_mo_general(self):
78        """Test MO SMS for 1 phone in 5g NSA. The other phone in any network
79
80        Provision PhoneA in 5g NSA
81        Send and Verify SMS from PhoneA to PhoneB
82        Verify phoneA is still on 5g NSA
83
84        Returns:
85            True if success.
86            False if failed.
87        """
88        return message_test(self.log,
89                            self.android_devices[0],
90                            self.android_devices[1],
91                            mo_rat='5g',
92                            mt_rat='default')
93
94    @test_tracker_info(uuid="e9b2494a-0e40-449c-b877-1e4ddc78c536")
95    @TelephonyBaseTest.tel_test_wrap
96    def test_5g_nsa_sms_mt_general(self):
97        """Test MT SMS for 1 phone in 5g NSA. The other phone in any network
98
99        Provision PhoneA in 5g NSA
100        Send and Verify SMS from PhoneB to PhoneA
101        Verify phoneA is still on 5g NSA
102
103        Returns:
104            True if success.
105            False if failed.
106        """
107        return message_test(self.log,
108                            self.android_devices[1],
109                            self.android_devices[0],
110                            mo_rat='default',
111                            mt_rat='5g')
112
113    @test_tracker_info(uuid="2ce809d4-cbf6-4233-81ad-43f91107b201")
114    @TelephonyBaseTest.tel_test_wrap
115    def test_5g_nsa_sms_mo_mt_volte(self):
116        """Test SMS between two phones with VoLTE on 5G NSA
117
118        Provision devices on VoLTE
119        Provision devices in 5g NSA
120        Send and Verify SMS from PhoneA to PhoneB
121        Verify both devices are still on 5g NSA
122
123        Returns:
124            True if success.
125            False if failed.
126        """
127        return message_test(self.log,
128                            self.android_devices[0],
129                            self.android_devices[1],
130                            mo_rat='5g_volte',
131                            mt_rat='5g_volte')
132
133    @test_tracker_info(uuid="e51f3dbb-bb16-4400-b2be-f9422f511087")
134    @TelephonyBaseTest.tel_test_wrap
135    def test_5g_nsa_sms_mo_volte(self):
136        """Test MO SMS with VoLTE on 5G NSA. The other phone in any network
137
138        Provision PhoneA on VoLTE
139        Provision PhoneA in 5g NSA
140        Send and Verify SMS from PhoneA to PhoneB
141        Verify PhoneA is still on 5g NSA
142
143        Returns:
144            True if success.
145            False if failed.
146        """
147        return message_test(self.log,
148                            self.android_devices[0],
149                            self.android_devices[1],
150                            mo_rat='5g_volte',
151                            mt_rat='default')
152
153    @test_tracker_info(uuid="5217d427-04a2-4b2b-9ed8-28951e71fc21")
154    @TelephonyBaseTest.tel_test_wrap
155    def test_5g_nsa_sms_mt_volte(self):
156        """Test MT SMS with VoLTE on 5G NSA. The other phone in any network
157
158        Provision PhoneA on VoLTE
159        Provision PhoneA in 5g NSA
160        Send and Verify SMS from PhoneB to PhoneA
161        Verify phoneA is still on 5g NSA
162
163        Returns:
164            True if success.
165            False if failed.
166        """
167        return message_test(self.log,
168                            self.android_devices[1],
169                            self.android_devices[0],
170                            mo_rat='default',
171                            mt_rat='5g_volte')
172
173    @test_tracker_info(uuid="49bfb4b3-a6ec-45d4-ad96-09282fb07d1d")
174    @TelephonyBaseTest.tel_test_wrap
175    def test_5g_nsa_sms_mo_mt_in_call_volte(self):
176        """ Test MO SMS during a MO VoLTE call over 5G NSA.
177
178        Provision devices on VoLTE
179        Provision devices in 5g NSA
180        Make a Voice call from PhoneA to PhoneB
181        Send and Verify SMS from PhoneA to PhoneB
182        Verify both devices are still on 5g NSA
183
184        Returns:
185            True if pass; False if fail.
186        """
187        return message_test(self.log,
188                            self.android_devices[0],
189                            self.android_devices[1],
190                            mo_rat='5g_volte',
191                            mt_rat='5g_volte',
192                            msg_in_call=True)
193
194    @test_tracker_info(uuid="3d5c8f60-1eaa-4f4a-b539-c529fa36db91")
195    @TelephonyBaseTest.tel_test_wrap
196    def test_5g_nsa_sms_mo_in_call_volte(self):
197        """ Test MO SMS during a MO VoLTE call over 5G NSA.
198
199        Provision PhoneA on VoLTE
200        Provision PhoneA in 5g NSA
201        Make a Voice call from PhoneA to PhoneB
202        Send and Verify SMS from PhoneA to PhoneB
203        Verify phoneA is still on 5g NSA
204
205        Returns:
206            True if pass; False if fail.
207        """
208        return message_test(self.log,
209                            self.android_devices[0],
210                            self.android_devices[1],
211                            mo_rat='5g_volte',
212                            mt_rat='default',
213                            msg_in_call=True)
214
215    @test_tracker_info(uuid="c71813f3-bb04-4115-8519-e23046349689")
216    @TelephonyBaseTest.tel_test_wrap
217    def test_5g_nsa_sms_mt_in_call_volte(self):
218        """ Test MT SMS during a MT VoLTE call over 5G NSA.
219
220        Provision PhoneA on VoLTE
221        Provision PhoneA in 5g NSA
222        Make a Voice call from PhoneB to PhoneA
223        Send and Verify SMS from PhoneB to PhoneA
224        Verify phoneA is still on 5g NSA
225
226        Returns:
227            True if pass; False if fail.
228        """
229        return message_test(self.log,
230                            self.android_devices[1],
231                            self.android_devices[0],
232                            mo_rat='default',
233                            mt_rat='5g_volte',
234                            msg_in_call=True)
235
236    @test_tracker_info(uuid="1f914d5c-ac24-4794-9fcb-cb28e483d69a")
237    @TelephonyBaseTest.tel_test_wrap
238    def test_5g_nsa_sms_mo_mt_iwlan(self):
239        """ Test SMS text function between two phones,
240        Phones in APM, WiFi connected, WFC Cell Preferred mode.
241
242        Disable APM on both devices
243        Provision devices in 5g NSA
244        Provision devices for WFC Cell Pref with APM ON
245        Send and Verify SMS from PhoneA to PhoneB
246
247        Returns:
248            True if pass; False if fail.
249        """
250        apm_mode = [
251            toggle_airplane_mode(self.log, ad, False)
252            for ad in self.android_devices
253        ]
254        return message_test(self.log,
255                            self.android_devices[0],
256                            self.android_devices[1],
257                            mo_rat='5g_wfc',
258                            mt_rat='5g_wfc',
259                            is_airplane_mode=True,
260                            wfc_mode=WFC_MODE_CELLULAR_PREFERRED,
261                            wifi_ssid=self.wifi_network_ssid,
262                            wifi_pwd=self.wifi_network_pass)
263
264    @test_tracker_info(uuid="2d375f20-a785-42e0-b5a1-968d19bc693d")
265    @TelephonyBaseTest.tel_test_wrap
266    def test_5g_nsa_sms_mo_iwlan(self):
267        """ Test MO SMS for 1 phone in APM,
268        WiFi connected, WFC Cell Preferred mode.
269
270        Disable APM on both devices
271        Provision PhoneA in 5g NSA
272        Provision PhoneA for WFC Cell Pref with APM ON
273        Send and Verify SMS from PhoneA to PhoneB
274
275        Returns:
276            True if pass; False if fail.
277        """
278        apm_mode = [
279            toggle_airplane_mode(self.log, ad, False)
280            for ad in self.android_devices
281        ]
282        return message_test(self.log,
283                            self.android_devices[0],
284                            self.android_devices[1],
285                            mo_rat='5g_wfc',
286                            mt_rat='general',
287                            is_airplane_mode=True,
288                            wfc_mode=WFC_MODE_CELLULAR_PREFERRED,
289                            wifi_ssid=self.wifi_network_ssid,
290                            wifi_pwd=self.wifi_network_pass)
291
292    @test_tracker_info(uuid="db8b2b5b-bf9e-4a99-9fdb-dbd028567705")
293    @TelephonyBaseTest.tel_test_wrap
294    def test_5g_nsa_sms_mt_iwlan(self):
295        """ Test MT SMS for 1 phone in APM,
296        WiFi connected, WFC Cell Preferred mode.
297
298        Disable APM on both devices
299        Provision PhoneA in 5g NSA
300        Provision PhoneA for WFC Cell Pref with APM ON
301        Send and Verify SMS from PhoneB to PhoneA
302
303        Returns:
304            True if pass; False if fail.
305        """
306        apm_mode = [
307            toggle_airplane_mode(self.log, ad, False)
308            for ad in self.android_devices
309        ]
310        return message_test(self.log,
311                            self.android_devices[1],
312                            self.android_devices[0],
313                            mo_rat='general',
314                            mt_rat='5g_wfc',
315                            is_airplane_mode=True,
316                            wfc_mode=WFC_MODE_CELLULAR_PREFERRED,
317                            wifi_ssid=self.wifi_network_ssid,
318                            wifi_pwd=self.wifi_network_pass)
319
320    @test_tracker_info(uuid="7274be32-b9dd-4ce3-83d1-f32ab14ce05e")
321    @TelephonyBaseTest.tel_test_wrap
322    def test_5g_nsa_sms_mo_mt_iwlan_apm_off(self):
323        """ Test MO SMS, Phone in APM off, WiFi connected, WFC WiFi Preferred mode.
324
325        Disable APM on both devices
326        Provision devices in 5g NSA
327        Provision devices for WFC Wifi Pref with APM OFF
328        Send and Verify SMS from PhoneA to PhoneB
329        Verify 5g NSA attach for both devices
330
331        Returns:
332            True if pass; False if fail.
333        """
334        apm_mode = [
335            toggle_airplane_mode(self.log, ad, False)
336            for ad in self.android_devices
337        ]
338        return message_test(self.log,
339                            self.android_devices[0],
340                            self.android_devices[1],
341                            mo_rat='5g_wfc',
342                            mt_rat='5g_wfc',
343                            wfc_mode=WFC_MODE_WIFI_PREFERRED,
344                            wifi_ssid=self.wifi_network_ssid,
345                            wifi_pwd=self.wifi_network_pass)
346
347    @test_tracker_info(uuid="5997a618-efee-478f-8fa9-6cf8ba9cfc58")
348    @TelephonyBaseTest.tel_test_wrap
349    def test_5g_nsa_sms_mo_iwlan_apm_off(self):
350        """ Test MO SMS for 1 Phone in APM off, WiFi connected,
351        WFC WiFi Preferred mode.
352
353        Disable APM on both devices
354        Provision PhoneA in 5g NSA
355        Provision PhoneA for WFC Wifi Pref with APM OFF
356        Send and Verify SMS from PhoneA to PhoneB
357        Verify 5g NSA attach for PhoneA
358
359        Returns:
360            True if pass; False if fail.
361        """
362        apm_mode = [
363            toggle_airplane_mode(self.log, ad, False)
364            for ad in self.android_devices
365        ]
366        return message_test(self.log,
367                            self.android_devices[0],
368                            self.android_devices[1],
369                            mo_rat='5g_wfc',
370                            mt_rat='general',
371                            wfc_mode=WFC_MODE_WIFI_PREFERRED,
372                            wifi_ssid=self.wifi_network_ssid,
373                            wifi_pwd=self.wifi_network_pass)
374
375    @test_tracker_info(uuid="352ca023-2cd1-4b08-877c-20c5d50cc265")
376    @TelephonyBaseTest.tel_test_wrap
377    def test_5g_nsa_sms_mt_iwlan_apm_off(self):
378        """ Test MT SMS for 1 Phone in APM off, WiFi connected,
379        WFC WiFi Preferred mode.
380
381        Disable APM on both devices
382        Provision PhoneA in 5g NSA
383        Provision PhoneA for WFC Wifi Pref with APM OFF
384        Send and Verify SMS from PhoneB to PhoneA
385        Verify 5g NSA attach for PhoneA
386
387        Returns:
388            True if pass; False if fail.
389        """
390        apm_mode = [
391            toggle_airplane_mode(self.log, ad, False)
392            for ad in self.android_devices
393        ]
394        return message_test(self.log,
395                            self.android_devices[1],
396                            self.android_devices[0],
397                            mo_rat='general',
398                            mt_rat='5g_wfc',
399                            wfc_mode=WFC_MODE_WIFI_PREFERRED,
400                            wifi_ssid=self.wifi_network_ssid,
401                            wifi_pwd=self.wifi_network_pass)
402
403    @test_tracker_info(uuid="2d1787f2-d6fe-4b41-b389-2a8f817594e4")
404    @TelephonyBaseTest.tel_test_wrap
405    def test_5g_nsa_sms_mo_mt_in_call_iwlan(self):
406        """ Test MO SMS, Phone in APM, WiFi connected, WFC WiFi Preferred mode.
407
408        Disable APM on both devices
409        Provision devices in 5g NSA
410        Provision devices for WFC Wifi Pref with APM ON
411        Make a Voice call from PhoneA to PhoneB
412        Send and Verify SMS from PhoneA to PhoneB
413
414        Returns:
415            True if pass; False if fail.
416        """
417        apm_mode = [
418            toggle_airplane_mode(self.log, ad, False)
419            for ad in self.android_devices
420        ]
421        return message_test(self.log,
422                            self.android_devices[0],
423                            self.android_devices[1],
424                            mo_rat='5g_wfc',
425                            mt_rat='5g_wfc',
426                            msg_in_call=True,
427                            is_airplane_mode=True,
428                            wfc_mode=WFC_MODE_WIFI_PREFERRED,
429                            wifi_ssid=self.wifi_network_ssid,
430                            wifi_pwd=self.wifi_network_pass)
431
432    @test_tracker_info(uuid="784062e8-02a4-49ce-8fc1-5359ab40bbdd")
433    @TelephonyBaseTest.tel_test_wrap
434    def test_5g_nsa_sms_long_message_mo_mt(self):
435        """Test SMS basic function between two phone. Phones in nsa 5G network.
436
437        Airplane mode is off.
438        Send SMS from PhoneA to PhoneB.
439        Verify received message on PhoneB is correct.
440
441        Returns:
442            True if success.
443            False if failed.
444        """
445        return message_test(self.log,
446                            self.android_devices[0],
447                            self.android_devices[1],
448                            mo_rat='5g',
449                            mt_rat='5g',
450                            long_msg=True)
451
452    @test_tracker_info(uuid="45dbd61a-6a90-473e-9cfa-03e2408d5f15")
453    @TelephonyBaseTest.tel_test_wrap
454    def test_5g_nsa_sms_mo_mt_in_call_csfb(self):
455        """ Test MO/MT SMS during a MO csfb call over 5G NSA.
456
457        Disable APM on both devices
458        Set up PhoneA/B are in CSFB mode.
459        Provision PhoneA/B in 5g NSA.
460        Make sure PhoneA/B is able to make/receive call.
461        Call from PhoneA to PhoneB, accept on PhoneB, send SMS on PhoneA,
462         receive SMS on PhoneB.
463
464        Returns:
465            True if pass; False if fail.
466        """
467        return message_test(self.log,
468                            self.android_devices[0],
469                            self.android_devices[1],
470                            mo_rat='5g_csfb',
471                            mt_rat='5g_csfb',
472                            msg_in_call=True)
473
474    @test_tracker_info(uuid="709d5322-3da3-4c77-9180-281bc54ad78e")
475    @TelephonyBaseTest.tel_test_wrap
476    def test_5g_nsa_sms_mo_in_call_iwlan(self):
477        """ Test MO SMS for 1 Phone in APM, WiFi connected,
478        WFC WiFi Preferred mode.
479
480        Disable APM on both devices
481        Provision PhoneA in 5g NSA
482        Provision PhoneA for WFC Wifi Pref with APM ON
483        Make a Voice call from PhoneA to PhoneB
484        Send and Verify SMS from PhoneA to PhoneB
485
486        Returns:
487            True if pass; False if fail.
488        """
489        apm_mode = [
490            toggle_airplane_mode(self.log, ad, False)
491            for ad in self.android_devices
492        ]
493        return message_test(self.log,
494                            self.android_devices[0],
495                            self.android_devices[1],
496                            mo_rat='5g_wfc',
497                            mt_rat='default',
498                            msg_in_call=True,
499                            is_airplane_mode=True,
500                            wfc_mode=WFC_MODE_WIFI_PREFERRED,
501                            wifi_ssid=self.wifi_network_ssid,
502                            wifi_pwd=self.wifi_network_pass)
503
504    @test_tracker_info(uuid="6af38572-bbf7-4c11-8f0c-ab2f9b25ac49")
505    @TelephonyBaseTest.tel_test_wrap
506    def test_5g_nsa_sms_mt_in_call_iwlan(self):
507        """ Test MT SMS for 1 Phone in APM, WiFi connected,
508        WFC WiFi Preferred mode.
509
510        Disable APM on both devices
511        Provision PhoneA in 5g NSA
512        Provision PhoneA for WFC Wifi Pref with APM ON
513        Make a Voice call from PhoneB to PhoneA
514        Send and Verify SMS from PhoneB to PhoneA
515
516        Returns:
517            True if pass; False if fail.
518        """
519        apm_mode = [
520            toggle_airplane_mode(self.log, ad, False)
521            for ad in self.android_devices
522        ]
523        return message_test(self.log,
524                            self.android_devices[1],
525                            self.android_devices[0],
526                            mo_rat='default',
527                            mt_rat='5g_wfc',
528                            msg_in_call=True,
529                            is_airplane_mode=True,
530                            wfc_mode=WFC_MODE_WIFI_PREFERRED,
531                            wifi_ssid=self.wifi_network_ssid,
532                            wifi_pwd=self.wifi_network_pass)
533
534    @test_tracker_info(uuid="1437adb8-dfb0-49fb-8ecc-b456f60d7f64")
535    @TelephonyBaseTest.tel_test_wrap
536    def test_5g_nsa_sms_long_message_mo(self):
537        """Test MO long SMS function for 1 phone in nsa 5G network.
538
539        Disable APM on PhoneA
540        Provision PhoneA in 5g NSA
541        Send SMS from PhoneA to PhoneB
542        Verify received message on PhoneB is correct
543
544        Returns:
545            True if success.
546            False if failed.
547        """
548        return message_test(self.log,
549                            self.android_devices[0],
550                            self.android_devices[1],
551                            mo_rat='5g',
552                            mt_rat='default',
553                            long_msg=True)
554
555    @test_tracker_info(uuid="d34a4840-d1fa-46f1-885b-f67456225f50")
556    @TelephonyBaseTest.tel_test_wrap
557    def test_5g_nsa_sms_long_message_mt(self):
558        """Test MT long SMS function for 1 phone in nsa 5G network.
559
560        Disable APM on PhoneA
561        Provision PhoneA in 5g NSA
562        Send SMS from PhoneB to PhoneA
563        Verify received message on PhoneA is correct
564
565        Returns:
566            True if success.
567            False if failed.
568        """
569        return message_test(self.log,
570                            self.android_devices[1],
571                            self.android_devices[0],
572                            mo_rat='default',
573                            mt_rat='5g',
574                            long_msg=True)
575
576    @test_tracker_info(uuid="84e40f15-1d02-44b0-8103-f25f73dae7a1")
577    @TelephonyBaseTest.tel_test_wrap
578    def test_5g_nsa_sms_mo_in_call_csfb(self):
579        """ Test MO SMS during a MO csfb call over 5G NSA.
580
581        Disable APM on PhoneA
582        Set up PhoneA are in CSFB mode.
583        Provision PhoneA in 5g NSA.
584        Make sure PhoneA is able to make call.
585        Call from PhoneA to PhoneB, accept on PhoneB, send SMS on PhoneA,
586         receive SMS on PhoneB.
587
588        Returns:
589            True if pass; False if fail.
590        """
591        return message_test(self.log,
592                            self.android_devices[0],
593                            self.android_devices[1],
594                            mo_rat='5g_csfb',
595                            mt_rat='default',
596                            msg_in_call=True)
597
598    @test_tracker_info(uuid="259ccd94-2d70-450e-adf4-949889096cce")
599    @TelephonyBaseTest.tel_test_wrap
600    def test_5g_nsa_sms_mt_in_call_csfb(self):
601        """ Test MT SMS during a MT csfb call over 5G NSA.
602
603        Disable APM on PhoneA
604        Set up PhoneA are in CSFB mode.
605        Provision PhoneA in 5g NSA.
606        Make sure PhoneA is able to receive call.
607        Call from PhoneB to PhoneA, accept on PhoneA, send SMS on PhoneB,
608         receive SMS on PhoneA.
609
610        Returns:
611            True if pass; False if fail.
612        """
613        return message_test(self.log,
614                            self.android_devices[1],
615                            self.android_devices[0],
616                            mo_rat='default',
617                            mt_rat='5g_csfb',
618                            msg_in_call=True)
619
620    @test_tracker_info(uuid="303d5c2f-15bd-4608-96b8-37d16341004e")
621    @TelephonyBaseTest.tel_test_wrap
622    def test_5g_nsa_sms_multiple_pdns_mo(self):
623        """Test 5G NSA for multiple pdns
624
625        Steps:
626            (1) UE supports EN-DC option 3.
627            (2) SIM with 5G service.
628            (3) UE is provisioned for 5G service and powered off.
629            (4) NR cell (Cell 2) that is within the coverage of LTE cell (Cell 1).
630            (5) UE is in near cell coverage for LTE (Cell 1) and NR (Cell 2).
631            (6) Power on the UE.
632            (7) Initiate data transfer while UE is in idle mode.
633            (8) During data transferring, send a MO SMS.
634            (9) End the data transfer
635
636	Returns:
637            True if pass; False if fail.
638        """
639        cell_1 = self.android_devices[0]
640        cell_2 = self.android_devices[1]
641        if not phone_setup_volte(self.log, cell_1):
642            cell_1.log.error("Failed to setup on VoLTE")
643            return False
644
645        if not verify_internet_connection(self.log, cell_1):
646            return False
647        if not provision_device_for_5g(self.log, cell_2, nr_type='nsa'):
648            cell_2.log.error("Failed to setup on 5G NSA")
649            return False
650        if not verify_internet_connection(self.log, cell_2):
651            return False
652        if not active_file_download_task(self.log, cell_2):
653            return False
654        download_task = active_file_download_task(self.log, cell_2, "10MB")
655        message_task = (message_test, (self.log, cell_2, cell_1, '5g', 'volte',
656                                       'sms'))
657        results = run_multithread_func(self.log, [download_task, message_task])
658
659        if ((results[0]) & (results[1])):
660            self.log.info(
661                "PASS - MO SMS test validated over active data transfer")
662        elif ((results[0] == False) & (results[1] == True)):
663            self.log.error("FAIL - Data Transfer failed")
664        elif ((results[0] == True) & (results[1] == False)):
665            self.log.error("FAIL - Sending SMS failed")
666        else:
667            self.log.error("FAILED - MO SMS test over active data transfer")
668
669        return results
670
671    @test_tracker_info(uuid="cc9d2b46-80cc-47a8-926b-3ccf8095cefb")
672    @TelephonyBaseTest.tel_test_wrap
673    def test_5g_nsa_sms_multiple_pdns_mt(self):
674        """Test 5G NSA for multiple pdns
675
676        Steps:
677	    (1) UE supports EN-DC option 3.
678	    (2) SIM with 5G service.
679	    (3) UE is provisioned for 5G service and powered off.
680	    (4) NR cell (Cell 2) that is within the coverage of LTE cell (Cell 1).
681	    (5) UE is in near cell coverage for LTE (Cell 1) and NR (Cell 2).
682	    (6) Power on the UE.
683	    (7) Initiate data transfer while UE is in idle mode.
684	    (8) During data transferring, send a MT SMS.
685	    (9) End the data transfer.
686
687        Returns:
688            True if pass; False if fail.
689        """
690        cell_1 = self.android_devices[0]
691        cell_2 = self.android_devices[1]
692
693        if not phone_setup_volte(self.log, cell_1):
694            cell_1.log.error("Failed to setup on VoLTE")
695            return False
696        if not verify_internet_connection(self.log, cell_1):
697            return False
698        if not provision_device_for_5g(self.log, cell_2, nr_type='nsa'):
699            cell_2.log.error("Failed to setup on 5G NSA")
700            return False
701        if not verify_internet_connection(self.log, cell_2):
702            return False
703        if not active_file_download_task(self.log, cell_2):
704            return False
705
706        download_task = active_file_download_task(self.log, cell_2, "10MB")
707        message_task = (message_test, (self.log, cell_1, cell_2, 'volte', '5g',
708                                       'sms'))
709        results = run_multithread_func(self.log, [download_task, message_task])
710
711        if ((results[0]) & (results[1])):
712            self.log.info(
713                "PASS - MT SMS test validated over active data transfer")
714        elif ((results[0] == False) & (results[1] == True)):
715            self.log.error("FAIL - Data Transfer failed")
716        elif ((results[0] == True) & (results[1] == False)):
717            self.log.error("FAIL - Sending SMS failed")
718        else:
719            self.log.error("FAILED - MT SMS test over active data transfer")
720
721        return results
722
723    """ Tests End """
724