Lines Matching refs:dut
47 self.dut = self.android_devices[0]
61 utils.require_sl4a((self.dut, self.dut_client))
62 utils.sync_device_time(self.dut)
65 wutils.set_wifi_country_code(self.dut, wutils.WifiEnums.CountryCode.US)
68 self.dut.droid.wifiEnableVerboseLogging(1)
69 asserts.assert_equal(self.dut.droid.wifiGetVerboseLoggingLevel(), 1,
74 wutils.wifi_toggle_state(self.dut, True)
77 if self.dut.model in self.dbs_supported_models:
88 if self.dut.droid.wifiIsApEnabled():
89 wutils.stop_wifi_tethering(self.dut)
90 wutils.reset_wifi(self.dut)
101 self.dut.log.debug("Toggling Airplane mode OFF.")
102 asserts.assert_true(utils.force_airplane_mode(self.dut, False),
103 "Can not turn off airplane mode: %s" % self.dut.serial)
104 if self.dut.droid.wifiIsApEnabled():
105 wutils.stop_wifi_tethering(self.dut)
108 self.dut.take_bug_report(test_name, begin_time)
116 self.dut.log.info("softap setup: %s %s", ap_ssid, ap_password)
173 if not self.dut.droid.telephonyIsDataEnabled():
174 self.dut.log.info("need to enable data")
175 self.dut.droid.telephonyToggleDataConnection(True)
176 asserts.assert_true(self.dut.droid.telephonyIsDataEnabled(),
189 initial_wifi_state = self.dut.droid.wifiCheckState()
190 initial_cell_state = tel_utils.is_sim_ready(self.log, self.dut)
191 self.dut.log.info("current state: %s", initial_wifi_state)
192 self.dut.log.info("is sim ready? %s", initial_cell_state)
196 wutils.start_wifi_tethering(self.dut,
217 wutils.stop_wifi_tethering(self.dut)
218 asserts.assert_false(self.dut.droid.wifiIsApEnabled(),
221 wutils.wait_for_wifi_state(self.dut, True)
222 elif self.dut.droid.wifiCheckState():
236 dut_ip = self.dut.droid.connectivityGetIPv4Addresses(self.AP_IFACE)[0]
239 self.dut.log.info("Try to ping %s" % dut_client_ip)
241 utils.adb_shell_ping(self.dut, count=10, dest_ip=dut_client_ip, timeout=20),
242 "%s ping %s failed" % (self.dut.serial, dut_client_ip))
249 wutils.stop_wifi_tethering(self.dut)
290 hotspot_supported = self.dut.droid.wifiIsPortableHotspotSupported()
291 tethering_supported = self.dut.droid.connectivityIsTetheringSupported()
396 wutils.wifi_toggle_state(self.dut, True)
397 wutils.wifi_connect(self.dut, self.open_network)
399 wutils.start_wifi_tethering(self.dut,
403 asserts.assert_true(self.dut.droid.wifiIsApEnabled(),
408 wutils.stop_wifi_tethering(self.dut)
424 self.dut.log.debug("Toggling Airplane mode ON.")
425 asserts.assert_true(utils.force_airplane_mode(self.dut, True),
426 "Can not turn on airplane mode: %s" % self.dut.serial)
427 wutils.wifi_toggle_state(self.dut, True)
511 callbackId = self.dut.droid.registerSoftApCallback()
514 self.dut, callbackId, 0)
515 wutils.wait_for_expected_softap_state(self.dut, callbackId,
522 self.dut, callbackId, 1)
525 callbackId_2 = self.dut.droid.registerSoftApCallback()
528 self.dut, callbackId_2, 1)
529 wutils.wait_for_expected_softap_state(self.dut, callbackId_2,
535 wutils.wait_for_expected_number_of_softap_clients(self.dut,
537 wutils.wait_for_expected_number_of_softap_clients(self.dut,
539 wutils.wait_for_expected_number_of_softap_clients(self.dut,
541 wutils.wait_for_expected_number_of_softap_clients(self.dut,
545 self.dut.droid.unregisterSoftApCallback(callbackId_2)
551 self.dut, callbackId, 2)
554 wutils.stop_wifi_tethering(self.dut)
561 wutils.wait_for_expected_softap_state(self.dut, callbackId,
563 wutils.wait_for_expected_softap_state(self.dut, callbackId,
566 self.dut, callbackId, 0)
568 self.dut.droid.unregisterSoftApCallback(callbackId)
573 self.dut, callbackId_2), None)
591 callbackId = self.dut.droid.registerSoftApCallback()
593 wutils.wait_for_expected_number_of_softap_clients(self.dut,
595 wutils.wait_for_expected_softap_state(self.dut, callbackId,
601 self.dut, callbackId, 1)
603 self.dut.log.info("Start waiting %s seconds with 1 clients ",
608 asserts.assert_true(self.dut.droid.wifiIsApEnabled(),
612 wutils.wait_for_expected_number_of_softap_clients(self.dut,
614 self.dut.log.info("Start waiting %s seconds with 0 client",
619 wutils.wait_for_expected_softap_state(self.dut, callbackId,
621 wutils.wait_for_expected_softap_state(self.dut, callbackId,
623 asserts.assert_false(self.dut.droid.wifiIsApEnabled(),
625 self.dut.droid.unregisterSoftApCallback(callbackId)
642 original_softap_config = self.dut.droid.wifiGetApConfiguration()
648 current_softap_config = self.dut.droid.wifiGetApConfiguration()
651 callbackId = self.dut.droid.registerSoftApCallback()
653 wutils.wait_for_expected_number_of_softap_clients(self.dut,
655 wutils.wait_for_expected_softap_state(self.dut, callbackId,
660 wutils.save_wifi_soft_ap_config(self.dut, current_softap_config,
665 self.dut, callbackId, 1)
667 self.dut.log.info("Start waiting %s seconds with 1 clients ",
672 asserts.assert_true(self.dut.droid.wifiIsApEnabled(),
676 wutils.wait_for_expected_number_of_softap_clients(self.dut,
678 self.dut.log.info("Start waiting %s seconds with 0 client",
683 wutils.wait_for_expected_softap_state(self.dut, callbackId,
685 wutils.wait_for_expected_softap_state(self.dut, callbackId,
687 asserts.assert_false(self.dut.droid.wifiIsApEnabled(),
689 self.dut.droid.unregisterSoftApCallback(callbackId)
692 wutils.save_wifi_soft_ap_config(self.dut, original_softap_config)
703 original_softap_config = self.dut.droid.wifiGetApConfiguration()
704 wutils.save_wifi_soft_ap_config(self.dut, {"SSID":"ACTS_TEST"},
711 wutils.save_wifi_soft_ap_config(self.dut, {"SSID":"ACTS_TEST"},
719 wutils.save_wifi_soft_ap_config(self.dut, original_softap_config)
735 callbackId = self.dut.droid.registerSoftApCallback()
739 capability = self.dut.ed.pop_event(capabilityEventStr, 10)
746 self.dut.droid.unregisterSoftApCallback(callbackId)
751 original_softap_config = self.dut.droid.wifiGetApConfiguration()
753 wutils.save_wifi_soft_ap_config(self.dut, {"SSID":"ACTS_TEST"},
758 wutils.start_wifi_tethering_saved_config(self.dut)
759 current_softap_config = self.dut.droid.wifiGetApConfiguration()
762 callbackId = self.dut.droid.registerSoftApCallback()
765 wutils.wait_for_expected_number_of_softap_clients(self.dut,
767 wutils.wait_for_expected_softap_state(self.dut, callbackId,
775 blockedClient = self.dut.ed.pop_event(eventStr, 10)
782 wutils.save_wifi_soft_ap_config(self.dut, current_softap_config,
792 wutils.wait_for_expected_number_of_softap_clients(self.dut,
796 wutils.save_wifi_soft_ap_config(self.dut, original_softap_config)
799 self.dut.droid.unregisterSoftApCallback(callbackId)
817 callbackId = self.dut.droid.registerSoftApCallback()
821 capability = self.dut.ed.pop_event(capabilityEventStr, 10)
828 self.dut.droid.unregisterSoftApCallback(callbackId)
831 original_softap_config = self.dut.droid.wifiGetApConfiguration()
833 wutils.save_wifi_soft_ap_config(self.dut, {"SSID":"ACTS_TEST"},
838 wutils.start_wifi_tethering_saved_config(self.dut)
839 current_softap_config = self.dut.droid.wifiGetApConfiguration()
842 callbackId = self.dut.droid.registerSoftApCallback()
845 wutils.wait_for_expected_number_of_softap_clients(self.dut,
847 wutils.wait_for_expected_softap_state(self.dut, callbackId,
859 blockedClient = self.dut.ed.pop_event(eventStr, 10)
864 wutils.wait_for_expected_number_of_softap_clients(self.dut,
868 wutils.save_wifi_soft_ap_config(self.dut, current_softap_config,
878 wutils.wait_for_expected_number_of_softap_clients(self.dut,
882 wutils.save_wifi_soft_ap_config(self.dut, original_softap_config)
885 self.dut.droid.unregisterSoftApCallback(callbackId)