1

Has anyone been successful in enabling ap-mode for Intel AX-200 WLAN adapters on the 5GHz band? After a few weeks of attempting and searching other forums there hasn't been a positive note yet that shows such feat. Here are the details:

Intel AX-200 M2 form WLAN adapter

$ lspci
02:00.0 Network controller: Intel Corporation Wi-Fi 6 AX200 (rev 1a)
03:00.0 Network controller: Intel Corporation Wi-Fi 6 AX200 (rev 1a)

Operating system

$ uname -a
Linux survey 5.4.0-40-generic #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Intel drivers:

$ ls -al /lib/firmware/ | grep iwl
-rw-r--r--   1 root root 1044452 Jun 17 07:36 iwlwifi-cc-a0-46.ucode
-rw-r--r--   1 root root 1096704 Jun 17 07:36 iwlwifi-cc-a0-48.ucode
$ lsmod | grep iwl
iwlmvm                380928  0
mac80211              843776  1 iwlmvm
iwlwifi               331776  1 iwlmvm
cfg80211              704512  3 iwlmvm,iwlwifi,mac80211
$ iw dev
phy#1
        Interface wlp3s0
                ifindex 4
                wdev 0x100000001
                addr 84:c5:a6:3a:1b:c8
                type managed
                txpower 0.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       0       0       0       0       0       0               0
phy#0
        Interface wlp2s0
                ifindex 3
                wdev 0x1
                addr 60:f2:62:4d:c0:65
                type managed
                txpower 0.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       0       0       0       0       0       0               0
$ cat /etc/default/crda | grep -v '^#'
REGDOMAIN=US

HostAPD

$ hostapd -v
hostapd v2.9
$ cat /etc/hostapd/wlp2s0.conf | grep -v '^#' | grep -v '^$'
interface=wlp2s0
bridge=br0
driver=nl80211
ssid=survey
hw_mode=a
channel=5180
ignore_broadcast_ssid=0
country_code=US
ieee80211d=1
ieee80211h=1
ieee80211n=0
ieee80211ac=0
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
ctrl_interface=/var/run/hostapd

The output of iw list can be provided separately since it is over 14K characters long, which prevents it from being included in the Originating Post.

When using "Band1", which is the 2.4GHz, the interface will come up as a BSS provider (ap mode). When applied to "Band2", depending on how the hostapd is configured, either the DFS results are not passed back, to show what frequencies are available, or the Device/Resource always reports busy

wlp2s0: Event SCAN_STARTED (47) received
Unknown event 47
nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for wlp2s0
wlp2s0: nl80211: New scan results available
nl80211: Scan included frequencies: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 2467 2472 5180 5200 5220 5240 5260 5280 5300 5320 5500 5520 5540 5560 5580 5600 5620 5640 5660 5680 5700 5720 5745 5765 5785 5805 5825
wlp2s0: Event SCAN_RESULTS (3) received
ACS: Using survey based algorithm (acs_num_scans=5)
nl80211: Fetch survey data
wlp2s0: Event SURVEY (46) received
No survey data received
ACS: Trying survey-based ACS
ACS: Unable to collect survey data
ACS: All study options have failed
Interface initialization failed

When DFS is disabled, or the improper frequency (FCC domain) is selected, the interface properly locks out all of the 5GHz bands

Channel 60 (primary) not allowed for AP mode, flags: 0x17b NO-IR RADAR
wlp2s0: IEEE 802.11 Configured channel (60) not found from the channel list of current mode (2) IEEE 802.11a
wlp2s0: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)

4 Answers 4

1

Intel driver does not support AP on 5GHz band at all for reasons unknown to me. Trying to launch it is just a waste of time (at the moment of writing), so if you've ended here via google search - just don't.

Features:

AP mode on 2.4GHz (on devices driven by iwlmvm)

https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi

1
1

It would be better for determining the exact issue if you could post the output of iw reg get. With that said, as I have had worked through a very similar issue on my AX200 (and later AX210 as well), I would guess:

The obstacle that seems to be in your way is called LAR, or Location Aware Regulatory. You can find more info about it in this answer.

In short, this is an Intel's functionality, which makes your wifi chipset ignores your software-configured region, and determine the region you are in via scanning other wifi signals around you.

There are a few workarounds:

1. Set lar_disable

This solution would work only on kernels before 5.4.y. The newer kernels removed this functionality, making LAR a mandatory feature.

The solution was originally posted here. In short, you would like to load iwlwifi module with lar_disable=1 parameter set, via either of the following methods:

  1. Reload the module: modprobe -r iwlwifi & modprobe iwlwifi lar_disable=1

  2. Have the module loaded with the parameter on boot: echo "options iwlwifi lar_disable=1" >/etc/modprobe.d/iwlwifi.conf

2. Use wpa_supplicant

This solution should work with the newest kernel, and is also the most graceful one I've figured out so far.

Instead of setting up hostapd, you could use wpa_supplicant for creating the AP. wpa_supplicant do have the ability to create an AP, with less configurable items though.

A simple working configuration looks like this:

ctrl_interface=/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1
ap_scan=1
                                                  
network={         
        ssid="your-ssid"
        mode=2
        frequency=5200
        proto=RSN
        pairwise=CCMP
        group=CCMP
        key_mgmt=WPA-PSK
        password="your-password"
}

mode=2 makes the connection an AP, and the rest could be configured just like any other connections. For more details on the available options, refer to the official documentation.

3. Create a virtual device for AP, and have the main device keep scanning

If you really need those options that could only be set via hostapd, (for example, VHT or enterprise security). You could do as below:

  1. Create a virtual device for your physical wifi device. sudo iw dev wlan0 interface add wlan0.ap type managed

Here we assume your device is wlan0. Replace it with your actual device name. If you would like to have the interface added automatically on boot, you could create a rule file in /etc/udev/rules.d/:

/etc/udev/rules.d/99-virtual-wireless-device.rules

ACTION=="add",SUBSYSTEM=="ieee80211",KERNEL=="phy0",RUN+="/usr/bin/iw phy %k interface add wlan0.ap type managed"

Similarly, replace phy0 with correct devices id if necessary.

  1. Configure wpa_supplicant for wlan0. You need to configure at least one network section. It don't have to always be reachable, though. If you do have another wifi you would like to connect to, you may put it into wpa_supplicant.conf. If you don't, you could do something like below:
ctrl_interface=/run/wpa_supplicant
ctrl_interface_group=wheel
update_config=1
ap_scan=1

network={
        ssid="DUMMY-NETWORK"
        key_mgmt=WPA-PSK
        psk="UnrealisticallyLengthyComplexDummyPassword-aoqwi82fgwo"
}

This basically keeps wpa_supplicant searching for a non-existing network. The silly ssid and password above prevents it from accidentally connecting to any actual network.

  1. Finally, configure hostapd as you would normally do, except that you should change interface name to interface=wlan0.ap.

Make sure you start wpa_supplicant before hostapd, especially if you're staring them on boot.

4. Use NetworkManager

If you are willing to switch to NetworkManager, create an hotspot with it should automatically resolve the issue.

However, unlike hostapd, NetworkManager does not allow you to add your AP to a bridge. To workaround this, you may consider create a virtual device, configure NetworkManager not to manage the virtual device, and create AP on the virtual device with hostapd. This is similar to the second solution above, except that instead of using wpa_supplicant, you would use NetworkManager, which replaces both wpa_supplicant and the network manager you would be using with it.

0

I used to try enabling sofap function on Intel AX200 and got nothing. But it seems that they are no longer support this function on this chip after saw the following information:

https://www.intel.com/content/www/us/en/support/articles/000023257/network-and-i-o/wireless-networking.html

Although it says on the Windows system, I believe it would be the same result with Linux. At least p2p connection is workable that I've tried on my platform.

0

I can set up AP in the 5 GHz band using an Intel AX200 based module in my laptop. The software configuration I have is following:

  • Operating system: Ubuntu Desktop 20.04.2 (LTS)
  • Linux kernel: 5.8.0-44-generic
  • Firmware: iwlwifi-cc-a0-55.ucode
  • hostapd: v2.9

I tested your hostapd.conf file successfully. However, it requires a minor tweak. You set the channel parameter to the frequency value 5180. This parameter expects the channel number as per hostapd.conf reference:

# Channel number (IEEE 802.11)
# (default: 0, i.e., not set)
# Please note that some drivers do not use this value from hostapd and the
# channel will need to be configured separately with iwconfig.
#
# If CONFIG_ACS build option is enabled, the channel can be selected
# automatically at run time by setting channel=acs_survey or channel=0, both of
# which will enable the ACS survey based algorithm.
channel=1

I set the channel to value 149, one of the available channels in CA and US regulatory domains (you can check that with iw list and iw reg get commands). It should work for you as well.

Moreover, from your hostapd debug output, I can see that you are trying to use Automated Channel Selection (ACS). I wouldn't expect it to be working yet, because iwlwifi is not mentioned in the list of supported ACS drivers in hostapd defconfig:

# Automatic selection is currently only done through initialization, later on
# we hope to do background checks to keep us moving to more ideal channels as
# time goes by. ACS is currently only supported through the nl80211 driver and
# your driver must have survey dump capability that is filled by the driver
# during scanning.
#
# You can customize the ACS survey algorithm with the hostapd.conf variable
# acs_num_scans.
#
# Supported ACS drivers:
# * ath9k
# * ath5k
# * ath10k
#
# For more details refer to:
# http://wireless.kernel.org/en/users/Documentation/acs

Not the answer you're looking for? Browse other questions tagged or ask your own question.