6

I'm attempting to create a 5GHz access point running off of Ubuntu 20.04. My wireless adapter is the Intel Corporation Cannon Point-LP CNVi.

Side note: 2.4GHz access points work all day long, but I require 5GHz.

I've verified that the adapter supports AP as well as 5GHz frequencies using iw list:

Supported interface modes:
         * IBSS
         * managed
         * AP
         * AP/VLAN
         * monitor
         * P2P-client
         * P2P-GO
         * P2P-device

--

Frequencies:
            * 5180 MHz [36] (22.0 dBm)
            * 5200 MHz [40] (22.0 dBm)
            * 5220 MHz [44] (22.0 dBm)
            * 5240 MHz [48] (22.0 dBm)
            * 5260 MHz [52] (22.0 dBm) (no IR, radar detection)
            * 5280 MHz [56] (22.0 dBm) (no IR, radar detection)
            * 5300 MHz [60] (22.0 dBm) (no IR, radar detection)
            * 5320 MHz [64] (22.0 dBm) (no IR, radar detection)
            * 5340 MHz [68] (disabled)
            * 5360 MHz [72] (disabled)
            * 5380 MHz [76] (disabled)
            * 5400 MHz [80] (disabled)
            * 5420 MHz [84] (disabled)
            * 5440 MHz [88] (disabled)
            * 5460 MHz [92] (disabled)
            * 5480 MHz [96] (disabled)
            * 5500 MHz [100] (22.0 dBm) (no IR, radar detection)
            * 5520 MHz [104] (22.0 dBm) (no IR, radar detection)
            * 5540 MHz [108] (22.0 dBm) (no IR, radar detection)
            * 5560 MHz [112] (22.0 dBm) (no IR, radar detection)
            * 5580 MHz [116] (22.0 dBm) (no IR, radar detection)
            * 5600 MHz [120] (22.0 dBm) (no IR, radar detection)
            * 5620 MHz [124] (22.0 dBm) (no IR, radar detection)
            * 5640 MHz [128] (22.0 dBm) (no IR, radar detection)
            * 5660 MHz [132] (22.0 dBm) (no IR, radar detection)
            * 5680 MHz [136] (22.0 dBm) (no IR, radar detection)
            * 5700 MHz [140] (22.0 dBm) (no IR, radar detection)
            * 5720 MHz [144] (22.0 dBm) (no IR, radar detection)
            * 5745 MHz [149] (22.0 dBm)
            * 5765 MHz [153] (22.0 dBm)
            * 5785 MHz [157] (22.0 dBm)
            * 5805 MHz [161] (22.0 dBm)
            * 5825 MHz [165] (22.0 dBm)
            * 5845 MHz [169] (disabled)
            * 5865 MHz [173] (disabled)
            * 5885 MHz [177] (disabled)
            * 5905 MHz [181] (disabled)

I've set my country code as US using iw reg set US, output of iw reg get:

global
country US: DFS-FCC
    (2400 - 2472 @ 40), (N/A, 30), (N/A)
    (5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
    (5250 - 5350 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
    (5470 - 5730 @ 160), (N/A, 23), (0 ms), DFS
    (5730 - 5850 @ 80), (N/A, 30), (N/A)
    (57240 - 71000 @ 2160), (N/A, 40), (N/A)

phy#0 (self-managed)
country US: DFS-UNSET
    (2402 - 2437 @ 40), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-80MHZ, NO-160MHZ
    (2422 - 2462 @ 40), (6, 22), (N/A), AUTO-BW, NO-80MHZ, NO-160MHZ
    (2447 - 2482 @ 40), (6, 22), (N/A), AUTO-BW, NO-HT40PLUS, NO-80MHZ, NO-160MHZ
    (5170 - 5190 @ 160), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS
    (5190 - 5210 @ 160), (6, 22), (N/A), AUTO-BW, NO-HT40PLUS
    (5210 - 5230 @ 160), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS
    (5230 - 5250 @ 160), (6, 22), (N/A), AUTO-BW, NO-HT40PLUS
    (5250 - 5270 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
    (5270 - 5290 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
    (5290 - 5310 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
    (5310 - 5330 @ 160), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
    (5490 - 5510 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
    (5510 - 5530 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
    (5530 - 5550 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
    (5550 - 5570 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
    (5570 - 5590 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
    (5590 - 5610 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
    (5610 - 5630 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, PASSIVE-SCAN
    (5630 - 5650 @ 240), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, PASSIVE-SCAN
    (5650 - 5670 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, NO-160MHZ, PASSIVE-SCAN
    (5670 - 5690 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-160MHZ, PASSIVE-SCAN
    (5690 - 5710 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40MINUS, NO-160MHZ, PASSIVE-SCAN
    (5710 - 5730 @ 80), (6, 22), (0 ms), DFS, AUTO-BW, NO-HT40PLUS, NO-160MHZ, PASSIVE-SCAN
    (5735 - 5755 @ 80), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-160MHZ
    (5755 - 5775 @ 80), (6, 22), (N/A), AUTO-BW, NO-HT40PLUS, NO-160MHZ
    (5775 - 5795 @ 80), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-160MHZ
    (5795 - 5815 @ 80), (6, 22), (N/A), AUTO-BW, NO-HT40PLUS, NO-160MHZ
    (5815 - 5835 @ 20), (6, 22), (N/A), AUTO-BW, NO-HT40MINUS, NO-HT40PLUS, NO-80MHZ, NO-160MHZ

For a little while, channels 36, 40, 44, 48, 149, 153, 157, 161, and 165 were all showing as flagged "no IR", meaning you cannot initiate radiation ie. create an access point off this channel. They weren't flagged no IR in the beginning, and now they aren't flagged again, I'm not sure what changed exactly.

My hostapd.conf file:

ssid=ap_test
wpa_passphrase=123456789

country_code=US

interface=wlp0s20f3
driver=nl80211

wpa=2
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP

hw_mode=a
ieee80211n=1
require_ht=1
ieee80211ac=1
require_vht=1

channel=153

When I attempt to run hostapd using "hostapd hostapd.conf.test" I receive the following output (as well as the same output for all of the other 5GHz channels):

Configuration file: hostapd.conf.test
wlp0s20f3: interface state UNINITIALIZED->COUNTRY_UPDATE
Channel 153 (primary) not allowed for AP mode, flags: 0x20073 NO-IR
wlp0s20f3: IEEE 802.11 Configured channel (153) not found from the channel list of current mode (2) IEEE 802.11a
wlp0s20f3: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)
wlp0s20f3: interface state COUNTRY_UPDATE->DISABLED
wlp0s20f3: AP-DISABLED 
wlp0s20f3: Unable to setup interface.
wlp0s20f3: interface state DISABLED->DISABLED
wlp0s20f3: AP-DISABLED 
wlp0s20f3: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlp0s20f3 wasn't started
nl80211: deinit ifname=wlp0s20f3 disabled_11b_rates=0

I attempted to utilize DFS to make use of the DFS (radar detection) channels, but it doesn't work either (and DFS might not even be usable for my purposes anyways):

Configuration file: hostapd.conf
wlp0s20f3: interface state UNINITIALIZED->COUNTRY_UPDATE
wlp0s20f3: interface state COUNTRY_UPDATE->DFS
wlp0s20f3: DFS-CAC-START freq=5720 chan=144 sec_chan=0, width=0, seg0=0, seg1=0, cac_time=60s
DFS start_dfs_cac() failed, -1
Interface initialization failed
wlp0s20f3: interface state DFS->DISABLED
wlp0s20f3: AP-DISABLED 
wlp0s20f3: Unable to setup interface.
wlp0s20f3: interface state DISABLED->DISABLED
wlp0s20f3: AP-DISABLED 
wlp0s20f3: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlp0s20f3 wasn't started
nl80211: deinit ifname=wlp0s20f3 disabled_11b_rates=0

From what I can tell, I SHOULD be able to use the channels not flagged no-IR, but it still gives me the no-ir flag error when attempting to use these channels. Are they improperly flagged on my end or are they actually not allowed to be used?

From what I understand this could be a limitation of the Linux firmware, and I would need to patch my kernel to get it to work as I want it to. Just looking for some more clarity on this issue. I'm completely at a loss and looking for any kind of direction on this.

Update: iw list is now showing the channels as no-ir once again. Again, don't know what changed to cause this to happen:

Frequencies:
            * 5180 MHz [36] (22.0 dBm) (no IR)
            * 5200 MHz [40] (22.0 dBm) (no IR)
            * 5220 MHz [44] (22.0 dBm) (no IR)
            * 5240 MHz [48] (22.0 dBm) (no IR)
            * 5260 MHz [52] (22.0 dBm) (no IR, radar detection)
            * 5280 MHz [56] (22.0 dBm) (no IR, radar detection)
            * 5300 MHz [60] (22.0 dBm) (no IR, radar detection)
            * 5320 MHz [64] (22.0 dBm) (no IR, radar detection)
            * 5340 MHz [68] (disabled)
            * 5360 MHz [72] (disabled)
            * 5380 MHz [76] (disabled)
            * 5400 MHz [80] (disabled)
            * 5420 MHz [84] (disabled)
            * 5440 MHz [88] (disabled)
            * 5460 MHz [92] (disabled)
            * 5480 MHz [96] (disabled)
            * 5500 MHz [100] (22.0 dBm) (no IR, radar detection)
            * 5520 MHz [104] (22.0 dBm) (no IR, radar detection)
            * 5540 MHz [108] (22.0 dBm) (no IR, radar detection)
            * 5560 MHz [112] (22.0 dBm) (no IR, radar detection)
            * 5580 MHz [116] (22.0 dBm) (no IR, radar detection)
            * 5600 MHz [120] (22.0 dBm) (no IR, radar detection)
            * 5620 MHz [124] (22.0 dBm) (no IR, radar detection)
            * 5640 MHz [128] (22.0 dBm) (no IR, radar detection)
            * 5660 MHz [132] (22.0 dBm) (no IR, radar detection)
            * 5680 MHz [136] (22.0 dBm) (no IR, radar detection)
            * 5700 MHz [140] (22.0 dBm) (no IR, radar detection)
            * 5720 MHz [144] (22.0 dBm) (no IR, radar detection)
            * 5745 MHz [149] (22.0 dBm) (no IR)
            * 5765 MHz [153] (22.0 dBm) (no IR)
            * 5785 MHz [157] (22.0 dBm) (no IR)
            * 5805 MHz [161] (22.0 dBm) (no IR)
            * 5825 MHz [165] (22.0 dBm) (no IR)
            * 5845 MHz [169] (disabled)
            * 5865 MHz [173] (disabled)
            * 5885 MHz [177] (disabled)
            * 5905 MHz [181] (disabled)

1 Answer 1

1

It's about time to add another tag: 'intel'.

TL;DR; most likely it will NOT work. You will NOT be able to use your (or any) Intel wifi adapter to create a 5GHz AP.

I have struggled with a similar problem since ~2020 EOY. iw reg set should have done the job, but it didn't change anything besides the 'global' section. I ended up using USB adapters with RTL chipsets.

Recently I acquired another mini-PC and started building another Linux router. It came with an Intel wifi card preinstalled. And it was failing too - I was getting the same iw phy output (5GHz frequencies) as you are. As I was unsure of what I was reading, I tried to figure out each line of the output trying to make sense why it doesn't work. I even published it as a post. Unfortunately, it didn't help me much.

Then I found a SO question mentioning something about modprobe iwlwifi lar_disable=1. I did that too, but there was no effect.

Turns out, Intel pulled the plug on this flag back in the EOY 2019, here's the commit: f06021a.

Now the explanation.

  • Observation: It appears that Intel wifi cards hold the region setting inside their ROM (some users claim that Linux 5GHz AP stopped working after they received a Windows driver update in a dual-boot system).
  • Fact: Intel wifi drivers use LRA to automatically detect the region (country) and set it (and corresponding reg. restrictions) in the card's firmware. That's the self-managed part of your iw reg get output.
  • Fact: LAR (Location Aware Regulatory) listens to beacons sent by surrounding WiFi devices and, simply put, tries to mimic their region settings (country code)
  • Fact: very often this automation doesn't work and the WiFi card enters the Global mode (country code 00) (like in my case) or misinterprets the regional information and sets it to an irrelevant one (like in your case)
  • Fact: the self_managed bit also means you have limited ability to intervene with the automated mechanism.
  • Fact: Linux users used to bypass this LAR's misbehaviour by disabling it at the driver level: modprobe -r iwlwifi; modprobe iwlwifi lar_disable=1; iw reg set <CountryCode>
  • Fact: the lar_disable driver's flag has been removed
  • Fact(?): Intel does not officially support their WiFi cards being used in AP mode in the 5GHz band
  • Assumption: this might explain why some users see inconsistent region settings: iwlwifi picks on neighbours' routers broadcasting misconfigured regional information. If users have neighbours with devices brought from all around the world, the iwlwifi might sometimes think it's in Germany, sometimes - in China or Indonesia, sometimes - US and so on.

It appears that Intel flipped a finger at the Linux users and we don't have a say in this. There are lots of Intel community threads opened regd. this, lots of similar threads all around the internet (bugzilla, SO/SE, reddit, etc.) and Intel simply hides behind the "please contact your computer's manufacturer" curtain.

There is a very slim chance it might work IF you buy a new wifi card and it has never been / never will be touched by a Windows driver. However, that's just an assumption based on other users' experiences rather than a fact.

So it's more or less safe to say that Linux + Intel WiFi (iwlwifi) + 5GHz AP will no longer work unless by some unlikely accident, LAR manages to function properly


EDIT

I've just ran an airodump-ng scan at my home to see what beacons all the surrounding WIFI APs are broadcasting

# airodump-ng --beacons wlp58s0mon --manufacturer --uptime --band a -w /tmp/wifi_dump_5GHz.pcap
# airodump-ng --beacons wlp58s0mon --manufacturer --uptime -w /tmp/wifi_dump2.pcap

Turns out, some (most) of them don't broadcast any country code, some of them broadcast DE (Netgear repeater), some of them - CN (Xiaomi), some - US (IDK, DLink?). None of them are set to LT (the country they are being used in). I own all of them, and there is no way to change the regulatory settings (country code). So you don't have to be surrounded by foreigners to have LAR confused. You just have to be surrounded by foreign WiFi hardware...

3
  • FTR I'm now shopping for a non-Intel Linux-compatible PCIe wifi card. Unfortunatelly... Because up until this incident I strongly believed that Intel + Linux == LOL (LotsOfLove)
    – netikras
    Sep 23, 2023 at 21:01
  • 1
    "It's about time to add another tag: 'intel'." – No, it's not. Sep 23, 2023 at 23:14
  • 1
    As a client, they're great. Good cards for AP mode are apparently uncommon.
    – Journeyman Geek
    Sep 24, 2023 at 8:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .