4.1 Example

3 TX with 1 RX test case:

import sys
# import Python standard function for sys
import subprocess
# import Python standard function for call CMD function
import time
# import Python standard function for time
start_time = time.time()
#Python standard function for time check the start time
child = subprocess.Popen(["MCHPRT", "3400"], stdout=subprocess.PIPE,stdin=subprocess.PIPE )   
# Start Init in CMD type "MCHPRT 3400" using subprocess
time.sleep(1)
# Delay 1 sec for upload test FW to module


print "Start Test TX1 11b 11Mbps"
# Print the command state to screen 
child.stdin.write("MCHPRT 6 6 3 0 0 -10 18 15 1500 0\n")
# Send command to start TX, command informaiton please help to check application note
# add the TX measurement in here


print "Start Test TX2 11g 54Mbps"
# Print the command state to screen 
child.stdin.write("MCHPRT 6 6 7 1 0 -10 18 15 1500 0\n")
# Send command to start TX, command informaiton please help to check application note
# add the TX measurement in here


print "Start Test TX3 11n MCS7"
# Print the command state to screen 
child.stdin.write("MCHPRT 6 6 7 2 0 -10 18 15 1500 0\n")
# Send command to start TX, command informaiton please help to check application note
# add the TX measurement in here


print "Stop TX"
# Print the command state to screen 
child.stdin.write("MCHPRT 13\n")
# Send command to stop TX, command informaiton please help to check application note


print "Test RX1 channel 6"
# Print the command state to screen
child.stdin.write("MCHPRT 2 6\n")
# Send command to start channel 6, command informaiton please help to check application note


print "Test RX1 package count "
# Print the command state to screen
child.stdin.write("MCHPRT 3\n")
# Send command to stop RX and printing recevied package information, command informaiton please help to check application note


child.stdin.write("MCHPRT 4\n")
# Send command to close MCHPRT, command informaiton please help to check application note

print child.stdout.read()
child.stdin.close()
child.kill()
print("--- %s seconds ---" % (time.time() - start_time))
#--- 7.08999991417 seconds ---
Figure 4-1. Log when the script is run: