| # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # This test run is designed to check that we roam successfully when signal |
| # strength varies. |
| { "name":"MultiSwitch", |
| "skip_test":"this test is known to be flaky", |
| "steps":[ |
| [ "create", { "type":"hostap" } ], |
| |
| [ "config", { "channel":"2412", "mode":"11g", "pureg":None } ], |
| |
| # Connect with the specific purpose of establishing "normal" signal levels |
| # of signal and noise for this channel. |
| [ "connect", { "security":"none" } ], |
| |
| # Stay on channel for a while, generating some traffic. |
| [ "client_ping", { "count":"10" } ], |
| |
| # Collect the average signal strength during to connection fo use in |
| # setting a reasonable threshold. |
| [ "client_get_signal" ], |
| [ "disconnect" ], |
| |
| # Set a background scan signal threshold relative to the values |
| # derived above. We set the threshold here so that when we vary the |
| # transmit power on the AP, we will receive a "low signal" alert on |
| # the DUT. |
| [ "bgscan_set", { "signal":"auto", "offset":"-3" }], |
| |
| # Connect to the first AP. |
| [ "connect", { "security":"none" } ], |
| [ "client_ping", { "count":"10" } ], |
| |
| # Once the connection is up, restore the profile values to flimflam default |
| [ "bgscan_set", { "signal":"default" }], |
| |
| # Create a second AP at the same time on the 5GHz radio, Channel 48 |
| [ "config", { "channel":"5240", "ht40-":None, "puren":None, |
| "multi_interface":None } ], |
| |
| # Drop the transmit power of the first AP |
| [ "set_txpower", { "power":"fixed 0" } ], |
| |
| # Instead of explicitly connecting, just wait to see if the DUT |
| # re-connects by itself |
| [ "wait_service", { "run_timeout":40, # Timeout connection in 20 seconds |
| "debug":True, # Print out all state transitions |
| "states":[ |
| (None, '+ready') # Wait for the "current AP" (as |
| ] } ], # read off the AP) |
| # service to transition to "ready" |
| [ "client_ping", { "count":"10", "ap":1 } ], |
| |
| # Verify that the client roamed to the 5GHz band. |
| [ "client_check_frequency", [ "5240" ] ], |
| |
| # Return AP to auto transmit power |
| [ "set_txpower", { "power":"auto" } ], |
| |
| [ "destroy" ], |
| ], |
| } |