iw reg set <Country> has no effect during device booting

Ask questions about Arch Linux ARM. Please search before making a new topic.

iw reg set <Country> has no effect during device booting

Postby Uname » Sun Nov 18, 2018 3:38 pm

Previous subject: /etc/conf.d/wireless-regdom has no effect

To set the Wi-Fi regulatory domain for my RPi 3B in order to use channel 13, I followed the instructions in https://wiki.archlinux.org/index.php/Wi ... figuration and uncommented the corresponding line in /etc/conf.d/wireless-regdom. But it does work at all and the REG domain (country) are not set even (still 00) after rebooting the device.

iw reg get gives:
http://fars.ee/406R

contents of /etc/conf.d/wireless-regdom:
http://fars.ee/j1Pt

dmesg:
http://fars.ee/eS8o

1. Using iw reg set <COUNTRY> manually does take effect (but it won't persist, by design).
2. My system is up-to-date.
3. I know the country can also be set through wpa_supplicant or elsewhere but I would like to make it more reliable (if any).
4. I am using netctl for network configuration (but it seems to be unrelated if i am right).

Could you please give me some advice on how to solve it or how to locate the problem?
Last edited by Uname on Mon Nov 19, 2018 9:15 am, edited 2 times in total.
Uname
 
Posts: 2
Joined: Sun Nov 18, 2018 3:21 pm

Re: /etc/conf.d/wireless-regdom has no effect

Postby Uname » Mon Nov 19, 2018 9:14 am

Update
---
I find it that /etc/conf.d/wireless-regdom is supposed to take effect through /dev/udev/rules.d/85-regulatory.rules which is provided by the package crda and in turn invokes the script /usr/bin/set-wireless-regdom.

By manually running /usr/bin/set-wireless-regdom, it does work (while not effective automatically). To further locate the problem, I added a few lines of logging code, now it is:
$this->bbcode_second_pass_code('', '#!/bin/bash

unset WIRELESS_REGDOM
. /etc/conf.d/wireless-regdom
echo Default RegDom is: $(iw reg get | grep country) > /dev/kmsg
[ -n "${WIRELESS_REGDOM}" ] && echo Changing RegDom to: "${WIRELESS_REGDOM}" > /dev/kmsg && iw reg set ${WIRELESS_REGDOM} && echo RegDom now is: $(iw reg get | grep country) > /dev/kmsg
').

The udev rule is (left intact):
$this->bbcode_second_pass_code('', '
# Runs CRDA for kernel wireless regulatory events.
# For more information see:
# http://wireless.kernel.org/en/developers/Regulatory/CRDA

KERNEL=="regulatory*", ACTION=="change", SUBSYSTEM=="platform", RUN+="/usr/bin/crda"
ACTION=="add" SUBSYSTEM=="module", DEVPATH=="/module/cfg80211", RUN+="/usr/bin/set-wireless-regdom"
')

Then after rebooting, dmesg gives:
$this->bbcode_second_pass_code('', '...
[ 11.089956] Default RegDom is: country 00: DFS-UNSET
[ 11.139165] Changing RegDom to: JP
[ 11.199910] cfg80211: Loaded X.509 cert...
[ 11.226076] RegDom now is: country 00: DFS-UNSET
...
')
The complete output is here: http://fars.ee/kU4m .

The problem now seems to be: iw reg set <Country> has no effect during this period. :|
Uname
 
Posts: 2
Joined: Sun Nov 18, 2018 3:21 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 7 guests