OpenWrt Forum Archive

Topic: Radio region 'auto' setting - how to change?

The content of this topic has been archived on 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi Folks,

Can someone help me understand some strange behavior on the WRT3200ACM.  Related to the region setting of the radios.

It's been well documented in many forum threads that the MWLWIFI driver for the 3200ACM will ignore the UCI setting for radio region.  According to the driver author this is because the driver will automatically set the region somehow.

https://github.com/kaloz/mwlwifi

All WRT3200ACM devices are programmed with device power table. Mwlwifi driver will base on region code to set country code for your device and it will not allow you to change country code.

Firstly, how is this even possible?
Secondly, it sets the regions incorrectly for my router, which is based in the UK, but ends up with these settings regardless of what I enter through UCI.

root@LEDE:~# iw reg get
global
country 98: DFS-UNSET
        (2402 - 2472 @ 40), (N/A, 20), (N/A)
        (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW
        (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW
        (5490 - 5710 @ 160), (N/A, 23), (0 ms), DFS
        (57240 - 63720 @ 2160), (N/A, 40), (N/A)

phy#2
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#1
country FR: DFS-ETSI
        (2402 - 2482 @ 40), (N/A, 20), (N/A)
        (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW
        (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW
        (5490 - 5710 @ 160), (N/A, 27), (0 ms), DFS
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)

phy#0
country FR: DFS-ETSI
        (2402 - 2482 @ 40), (N/A, 20), (N/A)
        (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW
        (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW
        (5490 - 5710 @ 160), (N/A, 27), (0 ms), DFS
        (57000 - 66000 @ 2160), (N/A, 40), (N/A)

Thirdly, how can I override this 'feature' of the firmware to correctly set the region of my radios?  Can I edit the 'device power table' somehow for this purpose?  I'm not trying to do anything against regulations, I just want all 3 radios set to UK region as they should be.

This had a knock-on effect on DFS, because there is a 3rd radio in the 3200ACM which can be used as an AP, but it has a different driver to the main radios, and for similar reasons ends up with a US region setting (also ignores UCI) which creates a region mis-match and seemingly breaks DFS making the DFS channels unusable.  The only current work-around is to disable the 3rd radio by unloading the driver, which then miraculously re-enables DFS on the primary radios.

Thanks!

(Last edited by seb101 on 13 Mar 2018, 13:36)

I don't know specifically about the 3200, but the "automatic" region would be based on the manufacturer flashing in a unit-specific calibration table for the intended country of sale.  This table is somewhere in flash and is treated as read-only by OpenWrt.

But in theory this could be flashable if you could find the location of the table in EEPROM?

Are there tools that I can use to dump EEPROM to search for it?

dump mtd partitions with dd. There was some stuff that may be of interest here, see post by ValCher1961.

The discussion might have continued from here.