blob: ae3b8465a45a9037fb201e7c0093624dd4e38830 [file] [log] [blame]
# Copyright (C) 2012 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.
NAME = 'network_WiFiTxRx'
PURPOSE = '''Check the Tx and Rx signal strength when associating with 802.11
CRITERIA = '''This test requires that a WiFI AP be set up as described in the
DOC section.'''
SUITE = 'hwqual'
TEST_CATEGORY = 'Functional'
TEST_CLASS = 'network'
TEST_TYPE = 'client'
DOC = '''
The AP used to develop the tests was a TRENDNET TEW-673GRU
The described steps are annotated with the place they need
to be carried out:
H - hardware (ie something phsyical)
P - root shell on your laptop/whatever
S - ordinary shell on your laptop/whatever
A - root shell on the AP
W - Web UI on the AP (in a browser on your machine)
=== first time, to flash OpenWRT onto a TRENDNET TEW-673GRU ===
H Power the AP up
H Connect a patch cable from your laptop to a LAN port of the AP
S Get the OpenWRT image from the site
P dhclient your eth0 interface OR ifconfig eth0 up
W connect to, login as admin/admin
W Go to the firmware option in the menu
W Upload the image, allow to reboot
=== installing packages and initial setup on the AP ===
P ifconfig eth0 up
P iptables -A POSTROUTING -t nat -s -j MASQUERADE
P echo 1 >/proc/sys/net/ipv4/ip_forward
P telnet
A passwd # set the root password to something here
P ssh root@ - check you can get in with the new password!
A route add default gw
A ssh USER@ getent hosts >> /etc/hosts
A opkg update
A opkg install luci
A opkg install iwinfo
=== configuring the AP for our tests ===
A uci set wireless.radio0.disabled=0
A uci set wireless.radio1.disabled=0
A uci set wireless.@wifi-iface[0].ssid=CrOS-test-80211bg
A uci set wireless.@wifi-iface[1].ssid=CrOS-test-80211an
A uci commit
A wifi # your wifi AP interfaces should now come up
A /etc/init.d/uhttpd restart
S scp autotest/client/site_tests/network_WiFiTxRx/txinfo \
A chmod a+rx /www/cgi-bin/txinfo
S wget # just to make sure it responds
args = utils.args_to_dict(args)
min_tx = int(args.get('min_tx', -90)) # dBm
min_rx = int(args.get('min_rx', -90)) # dBm
max_tx = int(args.get('max_tx', 20)) # dBm
max_rx = int(args.get('max_rx', 20)) # dBm
min_qual = float(args.get('min_qual', 0.14)) # 0 - 1.00
interface = args.get('interface', None) # 'wlan0', 'wlan1' etc. autodetected.