wifi design framework for automation testing

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
srpec_3628341
Level 2
Level 2
First like received

Hi ,

     Thank you for giving answers. I got it .I need to One command with arguments or parameters with python script that is very helpful one eg.

for example  scan command  will under come parameters like association time , unassociation time,passive time.like that please give example as like as above script. or not required to pass arguments? and some commands have  wl join <ssid> [key <xxxxx>] [imode bss|infra|ibss|adhoc] ,where we can mentioned parameters or arguments in the script.

#######################################################

def wwd_wifi_set_scan_params(self,

   assoc_time,

   unassoc_time,

   passive_time,

   home_time,

   nprobes
   😞

########################################################

import sys, string , os ,argparse

parser = argparse.ArgumentParser()

parser.add_argument("-l","--location",help="absolute path to your wl utility,(note the slash) eg:<location>/43xxx_Wi-Fi/libraries/test/wl_tool/ ")

parser.add_argument("-c","--commands",help="location of the commands file, note the slash eg: C:/home/test/test_command.txt")

parser.add_argument("-p","--port",help="com port Number")

args = parser.parse_args()

if args.location and args.port and args.commands:

   print("Running wl utility at " + args.location)

   type(args.location)

  clist = []

  file = open(args.commands, 'r')

   for line in file:

  clist.append(line.strip('\n'))

  os.chdir(args.location)

   #add your list of commands here inside
  
   for i in range(0,len(clist)):

  os.system(args.location + "wl43909B0.exe --serial " + args.port + " " + clist)

else:

   print("incorrect usage, type -h for help")

##################################################

Thanks ,

Srikrishna

0 Likes
1 Reply
RaktimR_11
Moderator
Moderator
Moderator
500 replies posted 250 replies posted 100 replies posted

You can open the example_commands.txt and add "join <SSID_NAME> open none" command and you should be able to check the association process. Note the SSID you are connecting to should be of WICED_SECURITY_OPEN category for mfg_test firmware