Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 28 additions & 5 deletions py-json/interop_connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,25 +332,48 @@ async def configure_wifi(self, port_list=[]):
curr_encryption = "wpa2-ent"
if curr_encryption == "wpa3_enterprise":
curr_encryption = "wpa3-ent"

adb_cmd = (
'shell am start -n com.candela.wecan/com.candela.wecan.StartupActivity '
'--es auto_start 1 '
'--es username {} '
'--es serverip {} '
'--es ssid \\"{}\\" '
'--es password \\"{}\\" '
'--es encryption {} '
'--es eap_method {} '
'--es eap_user {} '
'--es eap_passwd {} '
'--es app_flags 1 '
'--es auto_wifi 1').format(
username, self.server_ip, curr_ssid, curr_passwd, curr_encryption, curr_eap_method,
curr_eap_identity, curr_passwd)
data = {
'shelf': 1,
'resource': 1,
'adb_id': serial,
# key=8 modification for adb API to add faster callback option
'key': 8,
'adb_cmd': 'shell am start -n com.candela.wecan/com.candela.wecan.StartupActivity --es auto_start 1 --es username {} --es serverip {} --es ssid {} --es password {} --es encryption {} --es eap_method {} --es eap_user {} --es eap_passwd {}'.format(
username, self.server_ip, curr_ssid, curr_passwd, curr_encryption, curr_eap_method,
curr_eap_identity, curr_passwd)
'adb_cmd': adb_cmd
}
else:
adb_cmd = (
'shell am start -n com.candela.wecan/com.candela.wecan.StartupActivity '
'--es auto_start 1 '
'--es username {} '
'--es serverip {} '
'--es ssid \\"{}\\" '
'--es password \\"{}\\" '
'--es encryption {} '
'--es auto_wifi 1').format(
username, self.server_ip, curr_ssid, curr_passwd, curr_encryption)
data = {
'shelf': 1,
'resource': 1,
'adb_id': serial,
# key=8 modification for adb API to add faster callback option
'key': 8,
'adb_cmd': 'shell am start -n com.candela.wecan/com.candela.wecan.StartupActivity --es auto_start 1 --es username {} --es serverip {} --es ssid {} --es password {} --es encryption {}'.format(
username, self.server_ip, curr_ssid, curr_passwd, curr_encryption)
'adb_cmd': adb_cmd
}
data_list.append(data)
logger.info("DATA LIST: {}".format(data_list))
Expand Down
7 changes: 4 additions & 3 deletions py-scripts/lf_base_interop_profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,15 +1161,16 @@ async def configure_wifi(self, select_serials=None):
await self.laptops_obj.reboot_laptop(port_list=selected_laptops)
time.sleep(5)
if self.disconnect_devices:
if (selected_androids != []):
await self.androids_obj.forget_all_networks(port_list=selected_androids)
time.sleep(10)
if (selected_laptops != []):
await self.laptops_obj.disconnect_wifi(port_list=selected_laptops)
time.sleep(10)
# if self.reboot==False and self.disconnect_devices==False:
if (selected_androids != []):
await self.androids_obj.stop_app(port_list=selected_androids)
# Added forget_all_networks after stop app because in build 5.5.2 we have issue with clearing profiles, so the app is still running with the existing ssid.
if (self.disconnect_devices):
await self.androids_obj.forget_all_networks(port_list=selected_androids)
time.sleep(10)
# await self.androids_obj.forget_all_networks(port_list=selected_androids)
await self.androids_obj.configure_wifi(port_list=selected_androids)

Expand Down
Loading