Fix Wireless Disconnects in Linux

By | 2013/10/22

If your Linux wireless constantly disconnects, it could be from repeated attempts related to something called CRDA. Trying the following below may help fix this for you!


The dmesg command will show something like this when a disconnect occurs:

[ 3088.520304] wlan0: deauthenticating from 00:xx:xx:xx:xx:xx by local choice (reason=3)
[ 3088.531710] cfg80211: Calling CRDA to update world regulatory domain
[ 3088.542515] cfg80211: World regulatory domain updated:
[ 3088.542519] cfg80211:     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 3088.542521] cfg80211:     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 3088.542524] cfg80211:     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 3088.542526] cfg80211:     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 3088.542528] cfg80211:     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 3088.542530] cfg80211:     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 3094.553232] wlan0: authenticate with 00:xx:xx:xx:xx:xx (try 1)
[ 3094.556240] wlan0: authenticated
[ 3094.556978] wlan0: associate with 00:xx:xx:xx:xx:xx (try 1)
[ 3094.559466] wlan0: RX ReassocResp from 00:xx:xx:xx:xx:xx (capab=0x431 status=0 aid=6)
[ 3094.559473] wlan0: associated

To fix the disconnects, set the regulatory domain to your location. For example the Debian file to edit is /etc/default/crda

sudo vim /etc/default/crda

Set REGDOMAIN= to your regulatory domain. I’m in the US, so mine is going to be US.

stmiller@bruckner:~$ cat /etc/default/crda 
# Set REGDOMAIN to a ISO/IEC 3166-1 alpha2 country code so that iw(8) may set
# the initial regulatory domain setting for IEEE 802.11 devices which operate
# on this system.
#
# Governments assert the right to regulate usage of radio spectrum within
# their respective territories so make sure you select a ISO/IEC 3166-1 alpha2
# country code suitable for your location or you may infringe on local
# legislature. See `/usr/share/zoneinfo/zone.tab' for a table of timezone
# descriptions containing ISO/IEC 3166-1 alpha2 country codes.

REGDOMAIN=US

Save that file, then enjoy uninterrupted wireless networking.