platform = statics.Device(serial=serial) adb_steps.connect_device(serial=serial, port=adb_server_port)() # turn display on, if turned off ui_steps.wake_up_device(serial=serial)() # ensure the device is unlocked ui_steps.unlock_device(serial=serial, pin=wifi_defaults.wifi['pin'])() # go to home screen ui_steps.press_home(serial=serial)() # airplane mode on, if configured so if airplane_mode == "ON": wifi_generic_steps.set_airplane_mode(state="ON", serial=serial)() # wifi ON wifi_generic_steps.set_wifi(state="ON", serial=serial)() # configure ap with the first settings set ap_steps.setup(mode, security, new_ssid=ddwrt_ap_name, encryption=encryption, wifi_password=ddwrt_ap_pass, radius_ip=radius_ip, radius_secret=radius_secret, channel_bw=channel_bw, interface5ghz=interface5ghz, serial=serial)()
def config_am(self, state): print "====================== config_am ======================" if state: wifi_generic_steps.set_airplane_mode(state = "ON", serial = self.am_serial)() else: wifi_generic_steps.set_airplane_mode(state = "OFF", serial = self.am_serial)()
def activate_am(self, serial): wifi_generic_steps.set_airplane_mode(state = "ON", serial = serial)()
dut_ip = wifi_utils.get_connection_parameter(parameter="ip_address", serial=serial) # turn of the hotspot before start the test if dut_ip == wifi_defaults.wifi["hotSpot_ip"]: # turn off the HotSpot in case that hotspot is on wifi_generic_steps.set_hotSpot(serial=serial, hotSpot_state="OFF")() # make sure there are no saved networks wifi_generic_steps.clear_saved_networks(serial=serial)() # make sure there are no p2p connections wifi_generic_steps.p2p_disconect_all(serial=serial)() # set the airplane mode off wifi_generic_steps.set_airplane_mode(serial=serial, state="OFF")() # create the hot spot wifi_generic_steps.configure_hotSpot(serial=serial, hotSpot_name=hotSpot_name, hotSpot_security=hotSpot_security, hotSpot_band=hotSpot_band, hotSpot_pass=hotSpot_pass)() # turn on the HotSpot wifi_generic_steps.set_hotSpot(serial=serial, hotSpot_state="ON")() # turn on the airplane mode wifi_generic_steps.set_airplane_mode(serial=serial, state="ON")() # verify the status of the wifi