5

I have a Thinkpad T450s and KXStudio (Ubuntu+KDE) My connection drops very often, and I think the problem is related to frequent CRDA calls. I live in Germany, but for some reason my computer seems to really like the US (or rather the international prefix 00)!

Here is a typical output of dmesg:

[  404.422554] wlan0: deauthenticated from 78:8d:f7:28:5b:48 (Reason: 6)
[  404.433563] cfg80211: Calling CRDA to update world regulatory domain
[  404.435411] cfg80211: World regulatory domain updated:
[  404.435413] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[  404.435415] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[  404.435416] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[  404.435417] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[  404.435418] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[  404.435419] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[  404.435429] cfg80211: Calling CRDA for country: DE
[  404.437056] cfg80211: Regulatory domain changed to country: DE
[  404.437060] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[  404.437062] cfg80211:   (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  404.437064] cfg80211:   (5150000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  404.437066] cfg80211:   (5250000 KHz - 5350000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  404.437068] cfg80211:   (5470000 KHz - 5725000 KHz @ 40000 KHz), (N/A, 2698 mBm)
[  404.437069] cfg80211:   (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm)
[  414.946644] wlan0: authenticate with 78:8d:f7:28:5b:48
[  414.950643] wlan0: send auth to 78:8d:f7:28:5b:48 (try 1/3)
[  415.059726] wlan0: send auth to 78:8d:f7:28:5b:48 (try 2/3)
[  415.065667] wlan0: authenticated
[  415.066268] wlan0: associate with 78:8d:f7:28:5b:48 (try 1/3)
[  415.089862] wlan0: RX AssocResp from 78:8d:f7:28:5b:48 (capab=0xc11 status=0 aid=2)
[  415.105275] wlan0: associated
[  415.105430] cfg80211: Calling CRDA for country: US
[  415.110984] cfg80211: Regulatory domain changed to country: US
[  415.110992] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[  415.110996] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[  415.111000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[  415.111004] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[  415.111007] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[  415.111010] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[  415.111013] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[  415.111016] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm)
[  419.277506] wlan0: deauthenticating from 78:8d:f7:28:5b:48 by local choice (reason=3)
[  419.281900] cfg80211: Calling CRDA to update world regulatory domain
[  419.285000] cfg80211: World regulatory domain updated:
[  419.285003] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[  419.285005] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[  419.285007] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[  419.285008] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[  419.285010] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[  419.285011] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[  419.285024] cfg80211: Calling CRDA for country: DE
[  419.287014] cfg80211: Regulatory domain changed to country: DE
[  419.287017] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[  419.287018] cfg80211:   (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  419.287019] cfg80211:   (5150000 KHz - 5250000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  419.287020] cfg80211:   (5250000 KHz - 5350000 KHz @ 40000 KHz), (N/A, 2000 mBm)
[  419.287020] cfg80211:   (5470000 KHz - 5725000 KHz @ 40000 KHz), (N/A, 2698 mBm)
[  419.287021] cfg80211:   (57240000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 4000 mBm)

Here is a typical output of udevadm monitor --environment kernel:

KERNEL[316.218832] change   /devices/platform/regulatory.0 (platform)
ACTION=change
COUNTRY=DE
DEVPATH=/devices/platform/regulatory.0
MODALIAS=platform:regulatory
SEQNUM=2334
SUBSYSTEM=platform

UDEV  [316.219479] change   /devices/platform/regulatory.0 (platform)
ACTION=change
COUNTRY=00
DEVPATH=/devices/platform/regulatory.0
MODALIAS=platform:regulatory
SEQNUM=2333
SUBSYSTEM=platform
USEC_INITIALIZED=6216391

UDEV  [316.221855] change   /devices/platform/regulatory.0 (platform)
ACTION=change
COUNTRY=DE
DEVPATH=/devices/platform/regulatory.0
MODALIAS=platform:regulatory
SEQNUM=2334
SUBSYSTEM=platform
USEC_INITIALIZED=18676

KERNEL[319.092483] change   /devices/platform/regulatory.0 (platform)
ACTION=change
COUNTRY=US
DEVPATH=/devices/platform/regulatory.0
MODALIAS=platform:regulatory
SEQNUM=2335
SUBSYSTEM=platform

UDEV  [319.096341] change   /devices/platform/regulatory.0 (platform)
ACTION=change
COUNTRY=US
DEVPATH=/devices/platform/regulatory.0
MODALIAS=platform:regulatory
SEQNUM=2335
SUBSYSTEM=platform
USEC_INITIALIZED=92541

I have set in /etc/default/crda the country DE, but crda returns:

COUNTRY environment variable not set.

If I run export COUNTRY=DE and crda I get:

Failed to set regulatory domain: -28

But the problem is (I think) something else: why is CRDA called so often? By what? And why is it called for US?

5

I believe at least three things affect CRDA. First, as you already know, the file /etc/default/crda should have, in your case, one uncommented line:

REGDOMAIN=DE

Second, it is the module cfg80211 that is complaining in dmesg; let's try to fix it:

sudo -i
echo "options cfg80211 ieee80211_regdom=DE"  >  /etc/modprobe.d/cfg80211.conf
exit

Finally, since your wireless interface is "Managed," that is, managed by the router as to channels, bit-rate, etc., I strongly suspect that if the router or more especially its firmware, was built for use in the USA, the router sets a CRDA allowing only certain channels to be used. I suggest you update the firmware from the router manufacturers' German or at least European website to see if it helps. Reboot the router.

Reboot and see if connectivity has improved. CRDA is but one recommendation I make to help issues like yours. If your issue is not resolved, I will be happy to continue.

EDIT: I came across this, which may be helpful: https://bbs.archlinux.org/viewtopic.php?id=124574

Also, in my own case, all attempts to over-ride the CRDA failed in a USB wireless. The country code is evidently hard-coded in the device ROM. The only way I can connect is to check this in dmesg:

cfg80211: Calling CRDA for country: CN

And then set the same region:

sudo iw reg set CN

The USB connected immediately.

| improve this answer | |
  • Thanks. I run the command you suggested, and the connection seems to be more stable (it still does the same, but less often). So for now it's going in the right direction! – geodude May 9 '15 at 15:53
  • Is your router set to use TKIP? I recommend AES. – chili555 May 9 '15 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.