wi-fi design framework for 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

How can I do  automation testing to WI-FI 802.11 Board through python scripting using PyCharm 3.6 version and windows 10 PC.I need to Design framework for automation Testing ,So what are the modules prerequisites and scripting .

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
VinayakS_26
Moderator
Moderator
Moderator
100 replies posted 50 replies posted 25 replies posted

Hi,

You could test the device with the scripts present in the following directory:/43xxx_Wi-Fi/libraries/test/wl_tool/scripts/

Check the following thread : wifi test commands  for more details.

PFA the python script to make use of the wl utility. Do modify the script accordingly to add the necessary commands.

Regards,

Vinayak

View solution in original post

10 Replies
lock attach
Attachments are accessible only for community members.
VinayakS_26
Moderator
Moderator
Moderator
100 replies posted 50 replies posted 25 replies posted

Hi,

You could test the device with the scripts present in the following directory:/43xxx_Wi-Fi/libraries/test/wl_tool/scripts/

Check the following thread : wifi test commands  for more details.

PFA the python script to make use of the wl utility. Do modify the script accordingly to add the necessary commands.

Regards,

Vinayak

Hi Vinayak ,

                  I got it correct WI-FI 802.11  designing framework for automation testing through python scripting. I need with one example of wl command like wl down ,wl up ,wl isup  with in your above python scripting that will be very helpful.

Thanks ,

Srikrishna . Pelluru

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

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("-p","--port",help="com port Number")
args = parser.parse_args()
if args.location and args.port:
    print("Running wl utility at " + args.location)
    type(args.location)
    os.chdir(args.location)
    #add your list of commands here inside
    commands = ['ver' , 'ver'] ####

eg. wl down,wl up,wl isup,wl out,wl up....use any one command and please give me one example...

    for i in range(0,len(commands)):

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

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

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

0 Likes
lock attach
Attachments are accessible only for community members.

Hi,

Modified the code.

It will read the necessary commands from a text file input that has the wl commands.

note: don't add 'wl'  for each command in the input text file.

Regards,

Vinayak

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

Hi Vinayak,

                   you referred the documentwifi test commands is operating in Linux or windows. you referred document mentioned contents 1.1

                    1.1 System Requirements The hardware and software requirements are:

                             ■ The latest Cypress CYW43xx hardware.

                             ■ A Linux operating system platform.

                             ■ The latest version of the Cypress dongle driver.

we are working on windows10 operating system platform

Thanks ,

srikrishna

0 Likes

Hi,

I think the whole point of the automation script is to send the sequence of wl commands, if i am not wrong. In that case, tweaking individual wl commands could be done directly by running the binary itself.(wl43xx.exe). Besides adding that to your automation script would be trivial. As you said the function

wwd_wifi_set_scan_params(self,

   assoc_time,

   unassoc_time,

   passive_time,

   home_time,

   nprobes
   😞

could be written but it would account for work that is already been done to make the wl43xx.exe binary itself.

Also if you were able to bringup the console in windows10 to send wl commands to the host(and subsequetly to radio), then u don't necessarily need a Linux operating system.

Regards,

Vinayak

We have several partners that have implemented an AT type interface.  Inventek Systems​ is one of them.

als_1964561

0 Likes

I feel the test console app in wiced will be better choice for testing than the wl tool,which is manufacturing test tool.

I see its very easy in test.console to scan,connect,and to run it in AP mode.

Please let us know which one will be better for testing wifi features.

Regards,

Suresh

0 Likes