Skip to content

Commit

Permalink
Update 802.11ac related docs
Browse files Browse the repository at this point in the history
  • Loading branch information
billz committed Nov 8, 2023
1 parent 37d0ba5 commit 0cc6e01
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 38 deletions.
13 changes: 10 additions & 3 deletions docs/ap-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ As part of this initial setup, the `hostapd` service broadcasts an AP with the f
**Encryption Type:** `CCMP`
**Passphrase:** `ChangeMe`

!!! note "Note"
The **802.11 AC 5GHz** wireless mode option is disabled by default. It may be enabled by configuring a country that permits wireless operation on the 5GHz band. Refer to [this FAQ](faq.md#80211ac) for more information.

Each of these settings may be changed on the **Hotspot > Basic** and **Security** tabs to any values you wish. Your changes will be applied and made visible on the broadcasted AP by choosing
**Save settings** followed by **Restart hotspot**.

Expand All @@ -36,6 +33,16 @@ WPA2 is currently the most secure standard utilizing AES (Advanced Encryption St

By default, RaspAP's access point is configured with WPA2 and CCMP encryption. You may of course change this to allow legacy clients (older mobile devices, for example) by selecting `TKIP+CCMP` as the encryption type. Choose **Save settings** and **Restart hotspot** for your changes to take effect.

## 802.11ac 5 GHz
RaspAP largely removes the guesswork in creating a 5 GHz access point. It achieves this by being tightly integrated with the [wireless regulatory database](https://wireless.wiki.kernel.org/en/developers/Regulatory/wireless-regdb) used by the Linux kernel. Behind the scenes, RaspAP queries `iw` and intelligently matches its output with the 5 GHz channels allowed by `hostapd`, the user space daemon access point software.

From the **Hotspot > Advanced** tab, select your country from the dropdown then choose **Save settings**. This executes `iw reg set [country-code]` to set the wireless regulatory domain for your device. Now, on the **Hotspot > Basic** tab choose an interface, modify your SSID (if desired) and select the '802.11ac - 5 GHz' wireless mode option. RaspAP will automatically populate the available 5 GHz channels for your country. Select a channel followed by **Save settings**, then **Start** or **Restart hotspot**.

!!! tip "Tip"
Enable `hostapd` service logging by sliding the **Logfile output** toggle on the **Hotspot > Logging** tab, followed by **Save settings**. This will provide you with useful log details for troubleshooting purposes.

If the **Channel** dropdown and **Save settings** button are disabled, refer to [this FAQ](faq.md#channels).

### WPA3-Personal
:octicons-beaker-24: Experimental · :octicons-heart-fill-24:{: .heart } [Insiders only](insiders.md)

Expand Down
40 changes: 5 additions & 35 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ If you would like to see a new FAQ that you feel would assist other users, [star
## Networking
* [Why can't I access wireless mode 'N' (802.11n)?](#wireless-mode)
* [How do I exclude NAT rules from IP traffic on localhost?](#iptables)
* [Why is the 802.11ac 5GHz option disabled in Configure hotspot?](#80211ac)
* [I think my country allows 5 GHz AP channels. Can I test this?](#wificountries)
* [Why is the channel dropdown disabled on the Hotspot page?](#channels)
* [Why is the maximum throughput of my 802.11n AP reduced by half?](#wirelessn)
* [Can I connect the WiFi client to a WEP network?](#wep)
* [Can I turn the hotspot on/off over SSH?](#hotspotssh)
Expand Down Expand Up @@ -732,41 +731,12 @@ Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
```
Refer to [this issue](https://github.com/RaspAP/raspap-webgui/issues/333#issue-454352554).

## <a name="80211ac"></a> Why is the 802.11ac 5GHz wireless mode option disabled in Configure hotspot?
**Short answer:** because of wireless regulatory restrictions for your country. If the AC option is disabled on your RPi, there are two small configuration changes you can make to enable it. First, configure your RPi's wireless regulatory domain with `sudo iw reg set US`. Next, on the **Advanced** tab of **Configure hotspot**, choose "United States" as the country code and save settings. You can now choose 802.11ac from the wireless mode select on the **Basic** tab.
## <a name="channels"></a> Why is the channel dropdown disabled on the Hotspot page?
RaspAP is capable of detecting the frequencies (channels) supported by each of your device's wireless interfaces. If an interface is selected that is not capable of broadcasting on the 5 GHz band, the associated channels and the **Save settings** button are disabled. Next to the **Wireless Mode** selector, a tooltip :octicons-question-24: will provide a brief explanation.

Choosing the AC wireless mode will populate the supported 5 GHz channels for you.
![](https://github.com/RaspAP/raspap-webgui/assets/229399/576531cd-fcf1-4377-9d51-3824ee498efb){: style="width:320px"}

![](https://i.imgur.com/ZAxB8Wf.png){: style="width:350px"}

**Longer answer:** AC support is not simply a function of your device's hardware capabilities. It must also take into account regulatory restrictions of the wireless spectrum. The regulatory info for `brcmfmac`, the kernel driver that supports the Broadcom wireless chipset, is embedded in the firmware of RPi models 3B+ and 4. There are lots of [international issues with WiFi](https://en.wikipedia.org/wiki/List_of_WLAN_channels#5_GHz_or_5.8_GHz_(802.11a/h/j/n/ac/ax)) that restrict channel use, transmission power, etc. on a regional and per-country basis. As a result, only combinations of certain frequencies (channels) and countries are capable of hosting an AC access point with the RPi's wireless adapter.

![](https://user-images.githubusercontent.com/229399/112802618-aee75600-9072-11eb-98ca-c55084964a0d.gif){: style="width:550px"}

RaspAP uses an [extensively tested](https://github.com/RaspAP/raspap-webgui/issues/450#issuecomment-569343686) internal database of [permitted wireless channels](https://github.com/RaspAP/raspap-webgui/blob/master/config/wireless.json) for each country to populate
the **Hotspot > Basic** settings tab. The page logic for loading the **Channel** select is displayed above.

If the country configured on your RPi does not allow use of a particular segment of the 5 GHz wireless spectrum, an AC configured AP will fail to start. Errors like these are common:

```
nl80211: Failed to set channel (freq=5180): -22 (Invalid argument)
hostapd: Could not set channel for kernel driver
```

In testing, stable AP's on the RPi's supported AC channels were only reliably obtained with 'US' as the regulatory domain. To get a list of the supported channels on your RPi for the 2.4 and 5 GHz bands, use `iw phy phy0 channels`. Refer to [this issue](https://github.com/RaspAP/raspap-webgui/issues/450#issuecomment-569343686).

## <a name="wificountries"></a>I think my country allows 5 GHz AP channels. Can I test this?
Yes. In the spirit of experimentation, this project allows you to override RaspAP's [default configuration](defaults.md). The file [wireless.json](https://github.com/RaspAP/raspap-webgui/blob/master/config/wireless.json) contains the regulatory domains and channels for the 2.4 and 5 GHz bands. Add a valid ISO Alpha-2 country code to the list of `5Ghz_max48ch` countries and save the file. Next, edit `includes/config.php` and add the same country to this constant:

```
// Constant for the 5GHz wireless regulatory domain
define('RASPI_5GHZ_ISO_ALPHA2', array('US'));
```

The **Configure hotspot** page will now let you select AC as a wireless mode option for your country. If you succeed in creating a stable AP, feel free to share your results in a [discussion](https://github.com/RaspAP/raspap-webgui/discussions/).

!!! tip "Tip"
It's recommended to monitor logs such as `dmesg` and the hostapd error log (available in the **Logfile output** tab of RaspAP) while doing this. Bug reports like "AC doesn't work" and/or troubleshooting requests will not be considered. No hard feelings.
In this case, selecting a compatible 2.4 GHz wireless mode will populate the list of available channels for that interface. Alternatively, select another interface or connect a 5 GHz capable external wireless adapter. RaspAP will automatically detect the adapter and add it to the list of available interfaces.

## <a name="wirelessn"></a>Why is the maximum throughput of my 802.11n AP reduced by half?
In order to achieve optimal throughput with 802.11n, the wireless stream must operate at a 40 MHz wide channel on the 2.4 GHz band. A 20 MHz channel will restrict you to 72 Mbps. Your `hostapd.conf` might have the required settings, but this is no guarantee of a 40 MHz channel.
Expand Down

0 comments on commit 0cc6e01

Please sign in to comment.