mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-15 09:34:54 +00:00
lf_sniff_radio: Add notes for improvement.
This commit is contained in:
@@ -56,6 +56,7 @@ class SniffRadio(Realm):
|
|||||||
self.radio = radio
|
self.radio = radio
|
||||||
|
|
||||||
def setup(self, ht40_value, ht80_value, ht160_value):
|
def setup(self, ht40_value, ht80_value, ht160_value):
|
||||||
|
# TODO: Store original channel settings so that radio can be set back to original values.
|
||||||
self.monitor.set_flag(param_name="disable_ht40", value=ht40_value)
|
self.monitor.set_flag(param_name="disable_ht40", value=ht40_value)
|
||||||
self.monitor.set_flag(param_name="disable_ht80", value=ht80_value)
|
self.monitor.set_flag(param_name="disable_ht80", value=ht80_value)
|
||||||
self.monitor.set_flag(param_name="ht160_enable", value=ht160_value)
|
self.monitor.set_flag(param_name="ht160_enable", value=ht160_value)
|
||||||
@@ -63,6 +64,7 @@ class SniffRadio(Realm):
|
|||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
self.monitor.admin_up()
|
self.monitor.admin_up()
|
||||||
|
# TODO: Use LFUtils.wait_until_ports_admin_up instead of sleep, check return code.
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
self.monitor.start_sniff(capname=self.outfile, duration_sec=self.duration)
|
self.monitor.start_sniff(capname=self.outfile, duration_sec=self.duration)
|
||||||
for i in range(0, self.duration):
|
for i in range(0, self.duration):
|
||||||
@@ -73,6 +75,8 @@ class SniffRadio(Realm):
|
|||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
|
# TODO: Add error checking to make sure monitor port really went away.
|
||||||
|
# TODO: Set radio back to original channel
|
||||||
self.monitor.cleanup()
|
self.monitor.cleanup()
|
||||||
|
|
||||||
|
|
||||||
@@ -117,10 +121,12 @@ def main():
|
|||||||
radio_mode=args.radio_mode
|
radio_mode=args.radio_mode
|
||||||
)
|
)
|
||||||
obj.setup(int(args.disable_ht40), int(args.disable_ht80), int(args.ht160_enable))
|
obj.setup(int(args.disable_ht40), int(args.disable_ht80), int(args.ht160_enable))
|
||||||
|
# TODO: Add wait-for logic instead of a sleep
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
obj.start()
|
obj.start()
|
||||||
obj.cleanup()
|
obj.cleanup()
|
||||||
|
|
||||||
|
# TODO: Check if passed or not.
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -246,6 +246,10 @@ function create_dut_and_chamberview() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function create_station_and_sensitivity {
|
function create_station_and_sensitivity {
|
||||||
|
set -x
|
||||||
|
# TODO: This uses wrong dut name for generic testbed, probably it fails in other ways too.
|
||||||
|
# I guess we can at least use it as a negative test hoping to see failure.
|
||||||
|
# until we can make it work better.
|
||||||
./create_station.py --radio $RADIO_USED --ssid $SSID_USED --passwd $PASSWD_USED --security $SECURITY --debug --mgr $MGR
|
./create_station.py --radio $RADIO_USED --ssid $SSID_USED --passwd $PASSWD_USED --security $SECURITY --debug --mgr $MGR
|
||||||
./lf_rx_sensitivity_test.py --mgr $MGR --port 8080 --lf_user lanforge --lf_password lanforge \
|
./lf_rx_sensitivity_test.py --mgr $MGR --port 8080 --lf_user lanforge --lf_password lanforge \
|
||||||
--instance_name rx-sensitivity-instance --config_name test_con --upstream $UPSTREAM \
|
--instance_name rx-sensitivity-instance --config_name test_con --upstream $UPSTREAM \
|
||||||
@@ -264,6 +268,7 @@ function create_station_and_sensitivity {
|
|||||||
#--influx_token=-u_Wd-L8o992701QF0c5UmqEp7w7Z7YOMaWLxOMgmHfATJGnQbbmYyNxHBR9PgD6taM_tcxqJl6U8DjU1xINFQ== \
|
#--influx_token=-u_Wd-L8o992701QF0c5UmqEp7w7Z7YOMaWLxOMgmHfATJGnQbbmYyNxHBR9PgD6taM_tcxqJl6U8DjU1xINFQ== \
|
||||||
#--influx_bucket ben \
|
#--influx_bucket ben \
|
||||||
#--influx_tag testbed Ferndale-01
|
#--influx_tag testbed Ferndale-01
|
||||||
|
set +x
|
||||||
}
|
}
|
||||||
if [[ ${#SHORT} -gt 0 ]]; then
|
if [[ ${#SHORT} -gt 0 ]]; then
|
||||||
testCommands=(
|
testCommands=(
|
||||||
|
|||||||
Reference in New Issue
Block a user