generic_wireless_examples

Examples for testing wireless components. wireless is called “Wifi / Bluetooth” in AVL.

Inherit

BluetoothDetectAdapterOnly

pytest_name

bluetooth

args

expected_adapter_count
1
scan_devices
false

BluetoothScanChromebook

pytest_name

bluetooth

args

expected_adapter_count
1
scan_devices
true
keyword
"Chromebook"

BluetoothScanSpecificStrength

pytest_name

bluetooth

args

expected_adapter_count
1
scan_devices
true
average_rssi_threshold
-60.0

ExampleWifiSSIDList

This test object cannot be run directly. Users have to inherit and modify it.

pytest_name

wifi_throughput

args

event_log_name
"example_basic_ssid_list"

ExampleWirelessConnect2G

pytest_name

wireless_connect

args

service_name
[
  {
    "passphrase": "",
    "security": "none",
    "ssid": "GoogleGuest-Legacy"
  }
]

ExampleWirelessConnect5G

pytest_name

wireless_connect

args

service_name
[
  {
    "passphrase": "",
    "security": "none",
    "ssid": "GoogleGuest-IPv4"
  }
]

IntelWirelessAntenna

Tested on device with component (cid, qid) = (3645, 7066)

pytest_name

wireless_antenna

args

device_name
"wlan0"
ignore_missing_services
true
services
"eval! constants.wireless_services"
switch_antenna_config
{
  "all": [
    3,
    3
  ],
  "aux": [
    2,
    2
  ],
  "main": [
    1,
    1
  ]
}
strength
{
  "all": -60,
  "aux": -60,
  "main": -60
}
wifi_chip_type
"radiotap"
press_space_to_start
false

MediatekWirelessAntenna

Tested on device with component (cid, qid) = (5423, 12758)

pytest_name

wireless_antenna

args

device_name
"wlan0"
ignore_missing_services
true
services
"eval! constants.wireless_services"
switch_antenna_config
{
  "all": [
    3,
    3
  ],
  "aux": [
    2,
    2
  ],
  "main": [
    1,
    1
  ]
}
strength
{
  "all": -60,
  "aux": -60,
  "main": -60
}
wifi_chip_type
"radiotap"
press_space_to_start
false

QualcommAtherosWirelessAntenna

Tested on device with component (cid, qid) = (3062, 5436).

pytest_name

wireless_antenna

args

device_name
"wlan0"
ignore_missing_services
true
services
"eval! constants.wireless_services"
switch_antenna_config
{
  "all": [
    3,
    3
  ],
  "aux": [
    2,
    2
  ],
  "main": [
    1,
    1
  ]
}
strength
{
  "all": -60,
  "aux": -60,
  "main": -60
}
wifi_chip_type
"station_dump"
press_space_to_start
false

RealtekWirelessAntenna

Tested on device with component (cid, qid) = (1522, 5668)

pytest_name

wireless_antenna

args

device_name
"wlan0"
ignore_missing_services
true
services
"eval! constants.wireless_services"
switch_antenna_config
{
  "all": [
    3,
    3
  ],
  "aux": [
    2,
    2
  ],
  "main": [
    1,
    1
  ]
}
strength
{
  "all": -60,
  "aux": -60,
  "main": -60
}
wifi_chip_type
"radiotap"
press_space_to_start
false

WifiThroughputInChamber

Users need to adjust the network topology and the IP. To pass go/pe-sw-gates, the device has to pass suite:wifi_perf which includes some iperf3 tests.

pytest_name

wifi_throughput

args

event_log_name
"wifi_throughput_in_chamber"
services
[
  {
    "iperf_host": "127.0.0.1",
    "iperf_port": 5201,
    "min_rx_throughput": 80,
    "min_strength": -80,
    "password": "",
    "ssid": "GoogleGuest-Legacy"
  },
  {
    "iperf_host": "127.0.0.1",
    "iperf_port": 5201,
    "min_rx_throughput": 80,
    "min_strength": -80,
    "password": "",
    "ssid": "GoogleGuest-IPv4"
  }
]
enable_iperf_server
true

WirelessAntenna

Auto detect the type of the wifi chip.

pytest_name

wireless_antenna

args

device_name
"wlan0"
ignore_missing_services
true
services
"eval! constants.wireless_services"
switch_antenna_config
{
  "all": [
    3,
    3
  ],
  "aux": [
    2,
    2
  ],
  "main": [
    1,
    1
  ]
}
strength
{
  "all": -60,
  "aux": -60,
  "main": -60
}
wifi_chip_type
null
press_space_to_start
false

WirelessAntennaSpecificFrequency

Auto detect the type of the wifi chip.

pytest_name

wireless_antenna

args

device_name
"wlan0"
ignore_missing_services
true
services
[
  [
    "GoogleGuest-Legacy",
    2412,
    null
  ]
]
switch_antenna_config
{
  "all": [
    3,
    3
  ],
  "aux": [
    2,
    2
  ],
  "main": [
    1,
    1
  ]
}
strength
{
  "all": -60,
  "aux": -60,
  "main": -60
}
wifi_chip_type
null
press_space_to_start
false

BluetoothPairWithDevice

Serial subtests

  • {
      "args": {
        "device_data_key": "factory.bluetooth_device_name",
        "label": "Bluetooth Device Name"
      },
      "inherit": "Scan",
      "label": "Scan Bluetooth Device Name"
    }
    
  • {
      "args": {
        "expected_adapter_count": 1,
        "keyword": "eval! device.factory.bluetooth_device_name",
        "pair_with_match": true,
        "scan_counts": 1,
        "scan_devices": true
      },
      "label": "Pair With Bluetooth Device",
      "pytest_name": "bluetooth"
    }