How to build a 6GHz WiFi Bridge Mode AP with a Raspberry Pi and Netgear A8000
Tags: raspberrypi, wifi6e, 6ghz
Published: 2023-06-26 08:18:48

The use of 6GHz WiFi band has been approved in Japan since September 2022.
This article ([Japanese](https://qiita.com/wataniguchi/items/313aeecba00e2b28554d)) provides detailed instructions to build a 6GHz WiFi Bridge Mode AP there, using a Raspberry Pi and a Netgear A8000.
It is most likely that these instructions are applicable in any country where the use of 6GHz is allowed.  However, it is not tested outside of Japan.
Instructions to build a 6GHz client is covered by a separate article [How to build a 6GHz WiFi client with a Raspberry Pi and Netgear A8000](https://dev.to/wataniguchi/how-to-build-a-6ghz-wifi-client-with-a-raspberry-pi-and-netgear-a8000-47ok).

Also, it might be useful to take a look at another AP article,  [How to build a 6GHz WiFi Router Mode AP with a Raspberry Pi and Netgear A8000](https://dev.to/wataniguchi/how-to-build-a-6ghz-wifi-router-mode-ap-with-a-raspberry-pi-and-netgear-a8000-31om).

# Task Summary

- Force the standard mt7921u driver to recognize A8000
- Refresh Linux Wireless Regulatory Database to reflect the addition of 6GHz band WiFi
- Renew MediaTek WiFi firmware
- Install bridge-utils
- Install hostapd and upgrade it to v2.10

# Prerequisites and Assumptions

- Raspberry Pi OS version is Bullseye, i.e., kernel 6.1
- Interface name for the onboard wired LAN is eth0, that for the onboard WiFi is wlan0, and that for A8000 is wlan1
- Raspberry Pi is wired to an upstream router, e.g. ONU, where DHCP service is available
- Instructions described in this article are for Japan

# Force the standard mt7921u driver to recognize A8000

Refer to [How to build a 6GHz WiFi clinet with a Raspberry Pi and Netgear A8000](https://dev.to/wataniguchi/how-to-build-a-6ghz-wifi-client-with-a-raspberry-pi-and-netgear-a8000-47ok)

# Refresh Linux Wireless Regulatory Database to reflect the addition of 6GHz band WiFi

Refer to [How to build a 6GHz WiFi clinet with a Raspberry Pi and Netgear A8000](https://dev.to/wataniguchi/how-to-build-a-6ghz-wifi-client-with-a-raspberry-pi-and-netgear-a8000-47ok)

# Renew MediaTek WiFi firmware

Refer to [How to build a 6GHz WiFi clinet with a Raspberry Pi and Netgear A8000](https://dev.to/wataniguchi/how-to-build-a-6ghz-wifi-client-with-a-raspberry-pi-and-netgear-a8000-47ok)

# Install bridge-utils

Install the package by `sudo apt-get install bridge-utils` and areate a new file `/etc/network/interfaces.d/bridge.conf` as follows.

```
auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan1
```

# Install hostapd and upgrade it to v2.10

Install the package by `sudo apt-get install hostapd`.
Then upgrade it to v2.10 as [802.11ax support was only added in v2.10](https://forums.raspberrypi.com/viewtopic.php?t=338143).  Since WPA Applicant is also have to be upgraded to v2.10 for client, let's download `hostap_2_10.tar.gz` package that incorporate both WPA Supplicant and hostapd from [its distribution site](https://w1.fi/cgit/hostap/).

```
tar -xzvf hostap_2_10.tar.gz
cd hostap_2_10/hostapd
cp defconfig .config
echo CONFIG_IEEE80211AX=y >> .config
echo CONFIG_IEEE80211AC=y >> .config
echo CONFIG_SAE=y >> .config
echo CONFIG_ACS=y >> .config
make
sudo mv /usr/sbin/hostapd /usr/sbin/hostapd_2_9
sudo cp hostapd /usr/sbin/
sudo mv /usr/sbin/hostapd_cli /usr/sbin/hostapd_cli_2_9
sudo cp hostapd_cli /usr/sbin/
```

Create a new file `/etc/hostapd/hostapd.conf`.  Do not forget to change `ssid=`, `sae_password=`, and `channel=` appropriately.
```
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
country_code=JP
interface=wlan1
bridge=br0
driver=nl80211
ssid=foo-ax
sae_password=foobar
hw_mode=a
channel=57
ieee80211ax=1
wmm_enabled=1
op_class=131
ieee80211w=2
auth_algs=3
wpa=2
wpa_key_mgmt=SAE
rsn_pairwise=CCMP
rsn_preauth=1
sae_require_mfp=1
sae_pwe=1
wpa_group_rekey=1800
group_cipher=CCMP
wpa_psk_radius=0
```

Register hostapd as a service that automatically starts at boot.
```
sudo systemctl unmask hostapd.service
sudo systemctl enable hostapd.service
```

You can optionally disable the use of wlan0/onboard WiFi by `sudo iwconfig wlan0 txpower off`.

# Done

See if you are on 6GHz by `sudo hostapd_cli status`.
```
$ sudo hostapd_cli status
Selected interface 'wlan1'
state=ENABLED
phy=phy1
freq=6235
num_sta_non_erp=0
num_sta_no_short_slot_time=1
num_sta_no_short_preamble=1
olbc=0
num_sta_ht_no_gf=0
num_sta_no_ht=1
num_sta_ht_20_mhz=0
num_sta_ht40_intolerant=0
olbc_ht=0
ht_op_mode=0x0
cac_time_seconds=0
cac_time_left_seconds=N/A
channel=57
edmg_enable=0
edmg_channel=0
secondary_channel=0
ieee80211n=0
ieee80211ac=0
ieee80211ax=1
beacon_int=100
dtim_period=2
he_oper_chwidth=0
he_oper_centr_freq_seg0_idx=0
he_oper_centr_freq_seg1_idx=0
supported_rates=0c 12 18 24 30 48 60 6c
max_txpower=23
bss[0]=wlan1
bssid[0]=94:18:65:xx:xx:xx
ssid[0]=foo-ax
num_sta[0]=1
```