You are not logged in.

#1 2021-01-25 00:32:47

weilinear
Member
Registered: 2017-12-28
Posts: 12

Country setting for Intel Wifi

I recently got a Intel NUC (nuci5beh) with Intel Corporation Cannon Point-LP CNVi [Wireless-AC] (rev 30) wifi card (from lspci). I was trying to use hostapd to create a wifi hotspot with 5GHz but it always fails (2.4GHz works). I was searching online and found that my wifi has regulartory configuration as Global which disables all the 5G frequencies for AP mode. Surprisingly, the installation media I got works perfectly (it is also on kernel 5.10) with US as the country for the phy#0 (self-managed) when I call iw reg get.

I would like to ask what would be the correct way to set the country. I have tried all the things I could find online including
1. sudo iw reg set US
2. in /etc/modprobe.d/: options cfg80211 ieee80211_regdom="US"
3. /etc/default/crda: REGDOMAIN=US
4. COUNTRY=US crda (this fails with error -7)

And from all those above changes my iw reg get is always like this:

$ iw reg get                                                                                                                                                                                                                                                                                                                                                           [16:29:11]
global
country US: DFS-FCC
	(2400 - 2483 @ 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 00: 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), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40MINUS, PASSIVE-SCAN
	(5190 - 5210 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40PLUS, PASSIVE-SCAN
	(5210 - 5230 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40MINUS, PASSIVE-SCAN
	(5230 - 5250 @ 160), (6, 22), (N/A), NO-OUTDOOR, AUTO-BW, IR-CONCURRENT, NO-HT40PLUS, PASSIVE-SCAN
	(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, IR-CONCURRENT, NO-HT40MINUS, NO-160MHZ, PASSIVE-SCAN
	(5755 - 5775 @ 80), (6, 22), (N/A), AUTO-BW, IR-CONCURRENT, NO-HT40PLUS, NO-160MHZ, PASSIVE-SCAN
	(5775 - 5795 @ 80), (6, 22), (N/A), AUTO-BW, IR-CONCURRENT, NO-HT40MINUS, NO-160MHZ, PASSIVE-SCAN
	(5795 - 5815 @ 80), (6, 22), (N/A), AUTO-BW, IR-CONCURRENT, NO-HT40PLUS, NO-160MHZ, PASSIVE-SCAN
	(5815 - 5835 @ 20), (6, 22), (N/A), AUTO-BW, IR-CONCURRENT, NO-HT40MINUS, NO-HT40PLUS, NO-80MHZ, NO-160MHZ, PASSIVE-SCAN

Where essentially I still have all 5GHz band disabled for AP mode (with the NO IR).

iw list | grep MHz                                                                                                                                                                                                                                                                                                                                                   [16:30:09]
			* 2412 MHz [1] (22.0 dBm)
			* 2417 MHz [2] (22.0 dBm)
			* 2422 MHz [3] (22.0 dBm)
			* 2427 MHz [4] (22.0 dBm)
			* 2432 MHz [5] (22.0 dBm)
			* 2437 MHz [6] (22.0 dBm)
			* 2442 MHz [7] (22.0 dBm)
			* 2447 MHz [8] (22.0 dBm)
			* 2452 MHz [9] (22.0 dBm)
			* 2457 MHz [10] (22.0 dBm)
			* 2462 MHz [11] (22.0 dBm)
			* 2467 MHz [12] (22.0 dBm)
			* 2472 MHz [13] (22.0 dBm)
			* 2484 MHz [14] (disabled)
			Supported Channel Width: 160 MHz
			short GI (80 MHz)
			short GI (160/80+80 MHz)
			* 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)
		 * short GI for 40 MHz

Last edited by weilinear (2021-01-25 04:37:24)

Offline

#2 2021-01-25 02:30:09

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: Country setting for Intel Wifi

Offline

#3 2021-01-25 03:27:40

weilinear
Member
Registered: 2017-12-28
Posts: 12

Re: Country setting for Intel Wifi

@loqs Thanks! It looks like I'm SoL.. I was trying to set up the 5GHz hotspot .. and it seems downgrading the kernel with lar_disable will cause the driver unstable, and with recent kernel will have a "global" country code..

However, how comes the installation media could have it correctly?

Last edited by weilinear (2021-01-25 04:34:38)

Offline

#4 2021-01-25 18:02:15

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: Country setting for Intel Wifi

Possibly a difference in the kernel version or  firmware version.

Offline

#5 2021-01-25 20:44:54

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: Country setting for Intel Wifi


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#6 2021-01-25 23:40:37

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: Country setting for Intel Wifi

Tarqi wrote:

You have used that method to successfully override the region detected and enforced by iwlwifi LAR?

Offline

#7 2021-01-25 23:44:24

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: Country setting for Intel Wifi

I have used that method to successfully set the country-code to my country. That's all I know.

Edit: For an ath5 chip, not for Intel.
Edit2: And i can use 2,4 or 5 GHz and the channels within my country without further problems.
Edit3: Without setting the country, the chip is "without" a region (generic, default).

Last edited by Tarqi (2021-01-26 00:03:34)


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#8 2021-01-26 06:07:27

weilinear
Member
Registered: 2017-12-28
Posts: 12

Re: Country setting for Intel Wifi

I have the country_code in hostapd and it has no effects.. I also tried to compile hostapd with the detection disabled in the code, but still it seems the driver won't allow this. I tried all firmware versions and nothing works. I guess it might be a combination of firmware+kernel version that will make it work. I will probably just buy a Qualcomm chip to swap out the intel one to use hostspot.

Offline

#9 2021-01-26 16:09:16

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: Country setting for Intel Wifi

Same here, I have an intel .m2 card which should replace the ath05 usb-stick, but overall it was a terrible experience, so I stayed by the usb one. Now I'm looking for a .m2 card as an built-in replacement for the usb-stick, ideally with dual-radio (qualcomm / atheros), but this seems to be impossible to buy in the consumer-market. If you find one, just let me know, please. Thanks.


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#10 2022-01-07 22:51:09

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: Country setting for Intel Wifi

Late, but for the record:  iwlwifi does not support 5 GHz AP mode.

Last edited by Tarqi (2022-01-07 23:14:36)


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#11 2022-09-04 17:51:11

zanny
Member
From: Baltimore
Registered: 2012-10-05
Posts: 84
Website

Re: Country setting for Intel Wifi

This is the top thread that shows up when searching for info on this on Arch - there's a patch now for hostapd to get the LAR to trigger so you can run a 5ghz AP and I packaged it on the AUR here. With this alternate hostapd Intel cards scan before setup so their country codes hopefully update correctly to let you use 5ghz again.

Offline

#12 2022-09-18 11:06:49

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: Country setting for Intel Wifi

I've tried the patch but it does not work. Channels with "No IR" are still disallowed, selecting a channel without that flag leads the driver to crash.


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#13 2022-09-24 05:48:15

zanny
Member
From: Baltimore
Registered: 2012-10-05
Posts: 84
Website

Re: Country setting for Intel Wifi

The point of the patches is to get your Intel phy to have the right country code if the LAR works. If its still not working even with the patches it could mean there are no wifi networks advertising your country code near you for a scan to pick up. If you need to circumvent the LAR it requires reverting the kernel patch that removed the option to disable it.

Last edited by zanny (2022-09-24 05:49:14)

Offline

#14 2022-09-25 00:15:47

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: Country setting for Intel Wifi

I'm sorry, but I don't get it. What does it mean, "if the LAR works"? As linked in #10, there is no support for LAR. And like written, if I choose a channel which should be allowed, the driver crashes. Can you please explain what has to be done to get this working, or how to determinate "if the LAR works"?

Last edited by Tarqi (2022-09-25 00:18:19)


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#15 2022-09-25 00:33:04

loqs
Member
Registered: 2014-03-06
Posts: 17,197

Re: Country setting for Intel Wifi

zanny wrote:

If you need to circumvent the LAR it requires reverting the kernel patch that removed the option to disable it.

Would that be enough?  https://git.kernel.org/pub/scm/linux/ke … b2b038e153 indicates it was removed to stop breakage caused when the driver / firmware is using LAR.  So I would infer it could also require older firmware and possibly reverting other kernel commits.

Offline

#16 2022-09-25 01:36:38

zanny
Member
From: Baltimore
Registered: 2012-10-05
Posts: 84
Website

Re: Country setting for Intel Wifi

iwlwifi only doesn't support 5ghz mode in the global default reg zone. If your card doesn't use LAR you should be able to manually set its region with:

iw reg set

But that card must be really old.

In terms of what it takes to reintroduce the LAR killswitch, I have no idea, I haven't tried to do it myself, just in my research it seems feasible unless the firmware will blow up if you do it now, in which case you might need to use an older firmware blob.

Last edited by zanny (2022-09-25 01:37:10)

Offline

#17 2022-09-25 19:21:05

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 179
Website

Re: Country setting for Intel Wifi

Ok, I've played around a bit:

Device: https://www.intel.com/content/www/us/en … tions.html (CNVi, the slot should be PCIe x2 I hope)

[277390.634345] iwlwifi 0000:00:0c.0: loaded firmware version 46.9d0122c0.0 9000-pu-b0-jf-b0-46.ucode op_mode iwlmvm
[277390.678788] iwlwifi 0000:00:0c.0: Detected Intel(R) Wireless-AC 9462, REV=0x312

So, the conclusion seems to be to throw away the card and use an atheros/qualcomm one, all that kernel stuff seems way to much effort. Suggestions, or better ideas?

Last edited by Tarqi (2022-09-25 20:02:38)


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

Board footer

Powered by FluxBB