Skip to main content

2 posts tagged with "80211ax"

View All Tags

· 3 min read

Intro

In this post we'll cover how to configure hostapd with the mt7915 to run 160 MHz channels over 5ghz. This allows stations to break gigabit speeds for WiFi with only 2 spatial streams.

Requirements

Preparation

  • Set up your AP device according to the SPR Setup Guide
  • For mt7915, run a mainline kernel or a kernel with fixes from https://github.com/openwrt/mt76 and the latest firmware. I'll publish some updates to building SPR with these in the near future. Fixes are needed for DFS support.

Hostapd configuration

  1. Modify config/wifi/hostpad.conf
  2. Make sure vht_capab includes [VHT160] and [SHORT-GI-160]
  3. Make sure to set vht_oper_chwidth/he_oper_chwidth set to 2.
  4. For the channel configuration, the following are valid 160mhz centers on 5ghz: [50, 114, 163]. Set the vht/he_oper_centr_freq_seg0_idx to these values and the channel to the center value - 14.
  5. Set ieee80211ax to 1
ctrl_interface=/state/wifi/control
country_code=US
interface=wlan0
ssid=TestLab
hw_mode=a
ieee80211d=1
ieee80211h=1
ieee80211n=1
ieee80211ac=1
ieee80211ax=1
he_su_beamformer=1
he_su_beamformee=1
he_mu_beamformer=1
wmm_enabled=1
preamble=1
ht_capab=[LDPC][HT40+][HT40-][GF][SHORT-GI-20][SHORT-GI-40]
vht_capab=[MAX-MPDU-7991][SU-BEAMFORMEE][SU-BEAMFORMER][VHT160][RXLDPC][SHORT-GI-160][SHORT-GI-80][MAX-A-MPDU-LEN-EXP3][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][TX-STBC-2BY1][RX-STBC-1][MU-BEAMFORMER[[MU-BEAMFORMEE]
vht_oper_chwidth=2
he_oper_chwidth=2
channel=36
vht_oper_centr_freq_seg0_idx=50
he_oper_centr_freq_seg0_idx=50
auth_algs=1
wpa=2
wpa_key_mgmt=WPA-PSK WPA-PSK-SHA256 SAE
rsn_pairwise=CCMP

# Security parameters

# Isolate stations and per-station group keys
ap_isolate=1
multicast_to_unicast=1

# Mitigate krack attack
wpa_disable_eapol_key_retries=1

# VLAN
per_sta_vif=1

# Passwords

sae_psk_file=/configs/wifi/sae_passwords
wpa_psk_file=/configs/wifi/wpa2pskfile
  1. Restart hostapd
root@pirouter:~/super# docker compose restart wifid

If anything has gone wrong, check the docker compose logs for the wifid service.

Perf Test

Running iperf3 on the SPR device, and iperf3 on a client with AX210 chip, we see the following:

On SPR:

iw wls6 info

Interface wls6
ifindex 5
wdev 0x1
addr 00:0a:52:07:32:c9
ssid testlab
type AP
wiphy 0
channel 100 (5500 MHz), width: 160 MHz, center1: 5570 MHz
txpower 23.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 246 0 0 0 0 27114 272

iperf3 -s

On the station:

iperf3 -c 192.168.2.1

Performance results

Accepted connection from 192.168.2.26, port 56156
[ 5] local 192.168.2.1 port 5201 connected to 192.168.2.26 port 56158
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 139 MBytes 1.17 Gbits/sec
[ 5] 1.00-2.00 sec 126 MBytes 1.06 Gbits/sec
[ 5] 2.00-3.00 sec 141 MBytes 1.18 Gbits/sec
[ 5] 3.00-4.00 sec 137 MBytes 1.15 Gbits/sec
[ 5] 4.00-5.00 sec 152 MBytes 1.27 Gbits/sec
[ 5] 5.00-6.00 sec 153 MBytes 1.28 Gbits/sec
[ 5] 6.00-7.00 sec 155 MBytes 1.30 Gbits/sec
[ 5] 7.00-8.00 sec 148 MBytes 1.24 Gbits/sec
[ 5] 8.00-9.00 sec 145 MBytes 1.21 Gbits/sec
[ 5] 9.00-10.00 sec 119 MBytes 995 Mbits/sec
[ 5] 10.00-10.00 sec 482 KBytes 1.22 Gbits/sec

· 3 min read

Intro

In the blog post we'll describe how to build and run SPR on a Mini-PC. And we'll use a WiFi 6 capable radio inside.

First, get a Mini PC ready

  1. Identify a good mini PC to use. Wilson suggested a look at QOTOM's i3 broadwell routers.

The g330 is not bad. It's a fanless build with a TDP of 15W. One mini pci-e slot is dedicated to mSATA, and the other can be used to fit a wifi radio. It also has additional SATA available for one more storage drive.

WARNING: On this device, the mini-pcie slot has a tall post for half-sized cards that needs to be removed to fit thicker full sized WiFi cards.

  1. Get a good WiFi radio.

We'll run with an 802.11ax card that works with Linux in AP mode (at least 802.11ac is recommended).

Mediatek is the disruptor in this space and supports AP mode on Linux. [NOTE: Many other cards will NOT work with ax in AP mode on Linux with open source drivers] . If you have recommendations please do not hesitate to reach out on the matrix chat. For the G330 Qotom, 2 antennas wires are provided to outside the case, so the 2x2 configuration is best.

The MT7915 can be purchased from AsiaRF.

Setup

Download and install Ubuntu Server. Since the WiFi 6 driver is a work in progress, we grabbed a daily release of Jammy Jellyfish 22.04 from the Ubuntu Live page to get the latest fixes. Copy the installer to installation media (a flash drive) then plug it in and go.

Then follow the SPR Setup Guide.

Our config/base/config.sh:

#!/bin/sh                                                                                                              
SSID_NAME=6lab
SSID_INTERFACE=wlan1

#PPPIF=eth0
#WANIF=ppp0
#PPP_VLANID=201
#PPP_PROVIDER=provider-config
WANIF=enp1s0
RUN_WAN_DHCP=true
RUN_WAN_DHCP_IPV=4
# Uncomment the next line if a second ethernet port goes to wired LAN
#LANIF=eth1
VLANIF=wlan1
VLANSIF=$VLANIF.

LANIP=192.168.3.1
DNSIP=$LANIP
TINYNETSTART=192.168.3.4
TINYNETSTOP=192.168.3.255
TINYNETMASK=255.255.255.252
TINYSLASHMASK=30
DOCKERNET=172.17.0.0/16
DOCKERIF=docker0

WIREGUARD_PORT=51280
#WIREGUARD_NETWORK=192.168.3.1/24

Configure hostapd for 802.11AX

On the SPR device, modify configs/wifi/hostapd.conf and add:

ieee80211ax=1
he_su_beamformer=1
he_su_beamformee=1
he_mu_beamformer=1
he_oper_chwidth=1 # 80mhz channel
he_oper_centr_freq_seg0_idx=42

Restart wifid

docker compose restart wifid

Connect a wifi 6 client and verify HE codings are available

# iw dev wlan1.4096 station dump -v  | grep bitrate
tx bitrate: 1200.9 MBit/s 80MHz HE-MCS 11 HE-NSS 2 HE-GI 0 HE-DCM 0
rx bitrate: 720.6 MBit/s 80MHz HE-MCS 7 HE-NSS 2 HE-GI 0 HE-DCM 0

Some Notes on the MT7915

The MT7915 is a Dual Mode driver. This means that it supports both 2Ghz and 5Ghz frequencies simultaneously. For our install the 2ghz interface is on wlan0 and 5Ghz on wlan1. This is really wonderful, since one card can serve older IOT devices that only run on 2Ghz as well as more modern devices at high speeds.

The linux kernel driver is not yet as stable as it could be, so beware that it may not yet be production ready -- several assertions and crashes were noticed. The mainline kernel does not yet support radar scanning, however the code is available in the openwrt development branch.