Set wireless regulatory domain

Hi!

I recently upgraded from LEAP 42.1 to Tumbleweed.
I have noticed that my Wi-Fi doesn’t work on the channel 12,13,14 which I need because I am living in Hungary.

notebook:/home/pet3r # iwlist wlan0 freq
wlan0     20 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 36 : 5.18 GHz
          Channel 40 : 5.2 GHz
          Channel 44 : 5.22 GHz
          Channel 48 : 5.24 GHz
          Channel 149 : 5.745 GHz
          Channel 153 : 5.765 GHz
          Channel 157 : 5.785 GHz
          Channel 161 : 5.805 GHz
          Channel 165 : 5.825 GHz
          Current Frequency:2.447 GHz (Channel 8)

My regulatory domain isn’t set:


notebook:/home/pet3r # iw reg get
global
country 00: DFS-UNSET
        (2402 - 2472 @ 40), (N/A, 20), (N/A)
        (2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, NO-IR
        (2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, NO-IR
        (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, NO-IR
        (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, NO-IR
        (5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, NO-IR
        (5735 - 5835 @ 80), (N/A, 20), (N/A), NO-IR
        (57240 - 63720 @ 2160), (N/A, 0), (N/A)

global
country 00: DFS-UNSET
        (2402 - 2472 @ 40), (N/A, 20), (N/A)
        (2457 - 2482 @ 20), (N/A, 20), (N/A), AUTO-BW, NO-IR
        (2474 - 2494 @ 20), (N/A, 20), (N/A), NO-OFDM, NO-IR
        (5170 - 5250 @ 80), (N/A, 20), (N/A), AUTO-BW, NO-IR
        (5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS, AUTO-BW, NO-IR
        (5490 - 5730 @ 160), (N/A, 20), (0 ms), DFS, NO-IR
        (5735 - 5835 @ 80), (N/A, 20), (N/A), NO-IR
        (57240 - 63720 @ 2160), (N/A, 0), (N/A)

Setting it with

iw reg set HU

has no effect.

How can I set the regulatory domain properly?

I don’t have a direct answer, and I’ve never found the need to set my regulatory domain (living in NZ), so on my laptop with openSUSE 13.2 mine is unset. Anyway, when I do set it to NZ region (or HU for that matter), it does reflect the changes as expected.

I recommend opening a terminal and watching the kernel messaging with

dmesg --follow

or

journalctl -f

then make the change in another terminal. You shoud see ‘cfg’80211’ output like this

Jun 18 17:15:35 linux-hi6j.suse kernel: cfg80211: Calling CRDA for country: HU
Jun 18 17:15:35 linux-hi6j.suse kernel: cfg80211: Regulatory domain changed to country: HU
Jun 18 17:15:35 linux-hi6j.suse kernel: cfg80211:  DFS Master region: ETSI
Jun 18 17:15:35 linux-hi6j.suse kernel: cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
Jun 18 17:15:35 linux-hi6j.suse kernel: cfg80211:   (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
Jun 18 17:15:35 linux-hi6j.suse kernel: cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
Jun 18 17:15:35 linux-hi6j.suse kernel: cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
Jun 18 17:15:35 linux-hi6j.suse kernel: cfg80211:   (5490000 KHz - 5710000 KHz @ 160000 KHz), (N/A, 2700 mBm), (0 s)
Jun 18 17:15:35 linux-hi6j.suse kernel: cfg80211:   (57000000 KHz - 66000000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)

How does that compare to what you observe?

BTW, the crda package provides the udev rule (/usr/lib/udev/rules.d/85-regulatory.rules) for invoking the crda command when the regulatory domain is changed

KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/usr/sbin/crda"

Sorry for the late answer.

I got the following message:

jun 27 17:31:03 notebook systemd-udevd[32704]: Process '/usr/sbin/crda' failed with exit code 249. 
jun 27 17:31:28 notebook kernel: SFW2-INext-DROP-DEFLT IN=eth0 OUT= MAC=33:33:00:00:00:01:d4:ca:6d:b7:ff:fc:86:dd SRC=│
fe80:0000:0000:0000:d6ca:6dff:feb7:fffc DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=163 TC=0 HOPLIMIT=1 FLOWLBL=0 │
PROTO=UDP SPT=5678 DPT=5678 LEN=123                 

I can’t find any information about this error code.

You can try setting your regulatory domain this way…

Edit the file

/etc/default/crda

And set the REGDOMAIN to 00 which is the generic “world”

REGDOMAIN=00

Or, for that matter you can try any other country codes, you might try EU beside HU

HTH,
TSU

My current regdomain is 00, therefore I can not use channels 12-14

Setting REGDOMAIN in /etc/default/crda to HU and EU has no effect.

Although I doubt a problem should be in your regulatory domain database, the following MAN page describes how you can open it for inspection… You can then do a search for the country codes you’re using. Of course, if the ones you’re trying are missing, that would be a big surprise and a big reason why the codes aren’t working

http://linux.die.net/man/5/regulatory.bin

If necessary, the following describes how the CRDA works, and also includes instructions how to edit. I don’t know if this means simply editing the country codes or allows you to re-define or create new codes which would extend support to the channels you want to use.

https://wireless.wiki.kernel.org/en/developers/Regulatory

TSU