Fix/Change Radio Region Settings

Hello,

I'm currently running OpenWrt SNAPSHOT r8061-24d82c2e5c on my Zyxel NBG6817.

All is running fine. But there is one anoying thing:

@BOOT:
[ 34.742271] ath: EEPROM regdomain: 0x0
[ 34.742281] ath: EEPROM indicates default country code should be used
[ 34.742289] ath: doing EEPROM country->regdmn map search
[ 34.742303] ath: country maps to regdmn code: 0x3a
[ 34.742313] ath: Country alpha2 being used: US
[ 34.742321] ath: Regpair used: 0x3a
...
[ 50.524757] ath: EEPROM regdomain: 0x8114
[ 50.524768] ath: EEPROM indicates we should expect a country code
[ 50.524777] ath: doing EEPROM country->regdmn map search
[ 50.524788] ath: country maps to regdmn code: 0x37
[ 50.524800] ath: Country alpha2 being used: DE
[ 50.524808] ath: Regpair used: 0x37
[ 50.524814] ath: regdomain 0x8114 dynamically updated by user

After Boot:

[code]root@OpenWrt:~# iw reg get
global
country DE: DFS-ETSI
(2400 - 2483 @ 40), (N/A, 20), (N/A)
(5150 - 5250 @ 80), (N/A, 20), (N/A), NO-OUTDOOR, AUTO-BW
(5250 - 5350 @ 80), (N/A, 20), (0 ms), NO-OUTDOOR, DFS, AUTO-BW
(5470 - 5725 @ 160), (N/A, 26), (0 ms), DFS
(5725 - 5875 @ 80), (N/A, 13), (N/A)
(57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#1
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)

phy#0
country US: DFS-FCC
(2402 - 2472 @ 40), (N/A, 30), (N/A)
(5170 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
(5250 - 5330 @ 80), (N/A, 23), (0 ms), DFS, AUTO-BW
(5490 - 5730 @ 160), (N/A, 23), (0 ms), DFS
(5735 - 5835 @ 80), (N/A, 30), (N/A)
(57240 - 63720 @ 2160), (N/A, 40), (N/A)[/code]

In my LuCI settings (Wireless TAB - Advanced Settings - Country Code) there is set correctly "DE - Germany" for both radios.
BUT I'm allowed to choose any "US" channel. So the settings doesn't getting applied correctly.

As I'm using "auto" setting for channel selection there are issues in connecting to the routers wlan. esp. with android devices. cause they usually only connect to channels for their choosen country.

How can I fix/change this behavior? My guess is I have to modify the driver settings... But I don't know where. Or is there an easier way to set this values during the build process? I hope you guys have a hint for me.

Thanks in advance.
pwned

Maybe that firmware loading is an issue related to that problem (but I doubt cause wlan is working):

[ 21.062491] ath10k_pci 0000:01:00.0: assign IRQ: got 67
[ 21.062851] ath10k_pci 0000:01:00.0: enabling device (0140 -> 0142)
[ 21.062927] ath10k_pci 0000:01:00.0: enabling bus mastering
[ 21.063364] ath10k_pci 0000:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[ 21.237878] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA9984/hw1.0/firmware-6.bin failed with error -2
[ 21.237934] ath10k_pci 0000:01:00.0: Falling back to user helper

[ 26.294792] firmware ath10k!QCA9984!hw1.0!firmware-6.bin: firmware_loading_store: map pages failed
[ 26.493673] ath10k_pci 0000:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[ 26.493703] ath10k_pci 0000:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[ 26.504356] ath10k_pci 0000:01:00.0: firmware ver 10.4-3.5.3-00053 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps crc32
[ 28.782022] ath10k_pci 0000:01:00.0: board_file api 2 bmi_id 0:1 crc32
[ 34.648110] ath10k_pci 0000:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 512 raw 0 hwcrypto 1

Do you have US set anywhere?
Check all SSIDs.

If this means the WiFi chip EEPROM...

IF THIS IS THE WIFI CHIP, you [legally] cannot. You may have to workaround by reloading the WiFi after fully booting?

There are a few reports recently about users outside of the US having difficulties setting regulatory region.

Changing the reg data is not the right way to fix things.

Are you running the "stock" ath10k drivers, or the Candela Technologies drivers? What is your other wireless chip/driver?


For example:

2 Likes

Hi, thx for your answers guys!

@lleachii:

I have not set any wireless setting in any config by hand. If I boot the system after applying the compiled OpenWrt image the setting is US. I configure my wlan throug LuCI Gui settings and change US -> DE. After that I can see during reboot this switching US->DE. IW reg is showing this change only for "global". Not for phy#0 nor phy#1.
What do you mean with ALL SSIDs? I have two SSIDs. One for the 2.4 GHz and one for the 5 GHz wlan. Is there anything I do not see?

I have never programmed any EEPROM. So my guess is this is the normal setting/behaviour of this router with foreign operating systems?

Well I know that modifying this is illegal. But honestly I don't care. The US settings are wrong in any case here in Germany. I only try to fix this.
So far I've read is the only possibility I have to modify, compile and selfsign regulatory.bin. I would modify US settings to DE settings and put the file into the openwrt source tree.

@jeff:

I'm running the stock ath10k drivers. What do you mean with "other wireless chip/driver"? On the router there is a Qualcomm Atheros QCA9984? On my Android devices I don't know. My HP Notebook (Intel Dual Band Wireless-AC 7260) running Arch Linux has no problems to connect US Channels/Frequencies.

Maybe I have overseen any wireless related setting during the build process? Is there any related setting in the Linux kernel which I can/should make?

Screenshot%20from%202018-09-15%2013-18-38

  • I mean did you do this on all SSIDs???
  • You listed two, so you performed this step on both, correct?

Correct; but this may be irrelevant, check the setting above. I'm also not sure what you mean by "foreign Operating Systems."

:confused:
!?!? I suggest you check the Advanced Settings first. I agree wtih @jeff that changing the reg data is not* the right way to fix things.

  • Is there a pre-built firmware available on the downloads site to test?
  • Does it have this same issue?
1 Like

Well after digging arround I have found out what 5 GHz mean.
And I have to say I am not amused. -.-

If I use the shipped OpenWrt Version from Zyxel I will get:

36, 40, 44, 48
52, 56, 60, 64
100, 104, 108, 112
120, 124, 128

On Zyxel GUI there is the option DFS activated by default. Especially routers using frequencies/channels higher than 5.240 GHz/48 have to have DFS support.

If I use my own Build or Standard OpenWrt 18.06.1 then I will get (after setting US->DE):

36, 40, 44, 48
52, 56, 60, 64
100, 104, 108, 112
120, 124, 128, 136, 140, 144
149, 153, 157, 161, 165, 169, 173

I guess DFS is activated by default.

Actually here in Germany frequencies above 5725 MHz are not allowed. Especially frequencies above 5.8 GHz have to be inspected by public authority.
That's why is was wondering the router was choosing channels > 140.

I also have realized now that the channel list for US setting and DE setting are the same. BUT the dBm listing is different between!
I have learned the "iw phy phy0 info" is more precise. And I also have learned "iw reg get" means nothing. So sorry for this mistake.

At same time I have realized, that most Phones only using channels 36-48. That is really odd.
Because if I look arround in my neighbourhood most routers using Channel 48.

Anyway ... Frequencies above 5.725 GHz are not allowed and most Android Phones/Tablets are fixed to 36-48.
Is there a possibility to restrict/fix the auto-channel selection e. g. to 36-48 or 36-64?
The thing is a friend of mine has the same router. He was facing this problem with his Android devices getting no 5 GHz signal from the router.
So the only thing what I can recommend to him is to select one fixed channel. That is not a very smart solution if I could select between four channels.

Thanks for your help.
Kind regards, pwned

P.S. just for reference: https://www.bundesnetzagentur.de/DE/Sachgebiete/Telekommunikation/Unternehmen_Institutionen/Frequenzen/OeffentlicheNetze/RegionaleNetze/regionalenetze-node.html

1 Like