Hi,
I have a custom board based on the P1010RDB-PA and I have ported over to SDKv1.7. My rootfs image is based on fsl-core-image-minimal. I have added/enabled USB wireless adapter support and it is functional except for intermitten messages about setting the wireless regulatory domain. Once connected to an AP, at what seem to be random intervals, the connection is deauthenticated and then re-authenticated and associated to the AP again with messages associated to setting the country code with CRDA. Trying to manually set the country code with CRDA fails as well.
I believe I have included all of the build requirments for CRDA and wireless. I have upgraded the versions of crda & libnl:
The following has been added to the image:
wpa-supplicant v2.1
wireless-tools
linux-firmware-rtl-license
linux-firmware-rtl8192cu
linux-firmware-ralink
linux-firmware-ath9k
libgcrypt 1.5.3
libnl 3.2.25
iw 3.11
crda 3.13
python-m2crypto 0.22.3
Setting the Code with crda
root@-5020273:~# crda
COUNTRY environment variable not set.
root@-5020273:~# export COUNTRY=US
root@-5020273:~# crda
Failed to set regulatory domain: -7
Output of the deauthentication & reauthentication Messages
64 bytes from 74.125.227.226: seq=1663 ttl=51 time=53.061 ms
64 bytes from 74.125.227.226: seq=1664 ttl=51 time=52.921 ms
wlan0: deauthenticated from c0:25:5c:69:aa:e1 (Reason: 2)
cfg80211: Calling CRDA for country: US
cfg80211: Regulatory domain changed to country: US
cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm)
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
wlan0: authenticate with c0:25:5c:69:a1:e1
wlan0: send auth to c0:25:5c:69:a1:e1 (try 1/3)
wlan0: authenticated
wlan0: associate with c0:25:5c:69:a1:e1 (try 1/3)
wlan0: RX AssocResp from c0:25:5c:69:a1:e1 (capab=0x431 status=0 aid=14)
wlan0: associated
IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
cfg80211: Calling CRDA for country: US
cfg80211: Regulatory domain changed to country: US
cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm)
64 bytes from 74.125.227.226: seq=1666 ttl=51 time=58.529 ms
64 bytes from 74.125.227.226: seq=1667 ttl=51 time=54.385 ms
I have also attached my config file.
Any information or guidance is appreciated.
Thanks,
Matt
Original Attachment has been moved to: adx.config.zip
Hi Yensid,
Did you try the iw from the command line as:
iw reg set US
Do you have regulatory.bin?
Regards
Lunmin
Hi Lunmin,
Thanks for your reply.
Yes, I have tried iw reg set US. It does not change anything unfortunately. The regulatory.bin file is in /usr/lib/crda. The regulatory.bin file is built/supplied as part of CRDA in this case. Do I need to get it from another source?
root@5020273:~# iw reg set US
root@5020273:~# crda
COUNTRY environment variable not set.
root@5020273:~# export COUNTRY=US
root@5020273:~# crda
Failed to set regulatory domain: -7
root@5020273:~#
root@5020273:~# cd /
root@5020273:/# find -name regulatory.bin
./usr/lib/crda/regulatory.bin
root@5020273:/#
root@5020273:/#
root@5020273:/# ls -l /usr/lib/crda/
total 27
-rwxr-xr-x 1 root root 21464 Apr 15 19:45 libreg.so
-rw-r--r-- 1 root root 4344 Apr 15 19:45 regulatory.bin
Thanks,
Matt
Hi yensid,
Maybe you can try the regulatory.bin from
git:git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git
Regards
Lunmin
Hi Lunmin,
I added a recipe for wireless-regdb and built it into my image. I actually tried two different versions, the current version master-2015-04-06, and master-2014-11-18 since that matches the build used in CRDA. In both cases I have the original issue with messages from cfg80211 and the "Failed to set regulatory domain: -7" message from CRDA.
As a secondary, less desired approach, I build the kernel with the full db.txt database and CONFIG_CFG80211_INTERNAL_REGDB config set to use an internal regulatory database. This requried some additional chagnes to /net/wireless/reg.c as well. With these changes the regulatory domain is now set correctly when queried with iw reg get, but I still get the deauthtentication from wlan0 and messages from cfg80211 about setting the domain.
Using internal db.txt, built without crda:
root@5020273:~# iw reg get
country US: DFS-UNSET
(2402 - 2472 @ 40), (30, 0)
(5170 - 5250 @ 80), (17, 0)
(5250 - 5330 @ 80), (23, 0)
(5735 - 5835 @ 80), (30, 0)
(57240 - 63720 @ 2160), (40, 0)
root@5020273:~#
Using internal db.txt, built without crda: Still deauthenticated from wlan0 with the same messages:
root@5020273:~#
root@5020273:~# wlan0: deauthenticated from c0:25:5c:69:aa:e1 (Reason: 2)
cfg80211: World regulatory domain updated:
cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (2000 mBi, 0 mBm)
cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (2000 mBi, 0 mBm)
cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (2000 mBi, 0 mBm)
cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz), (2000 mBi, 0 mBm)
cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz), (2000 mBi, 0 mBm)
cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (2000 mBi, 0 mBm)
cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (2000 mBi, 0 mBm)
cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm)
wlan0: authenticate with c0:25:5c:79:78:71
wlan0: send auth to c0:25:5c:79:78:71 (try 1/3)
wlan0: authenticated
wlan0: associate with c0:25:5c:79:78:71 (try 1/3)
wlan0: RX AssocResp from c0:25:5c:79:78:71 (capab=0x431 status=0 aid=2)
wlan0: associated
cfg80211: Regulatory domain changed to country: US
cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (3000 mBi, 0 mBm)
cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz), (1700 mBi, 0 mBm)
cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz), (2300 mBi, 0 mBm)
cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (3000 mBi, 0 mBm)
cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (4000 mBi, 0 mBm)
Please let me know if you have any ideas
I've recently been able to look at this issue again. I have found that the regulartory domain setting is just a side effect of the deauthentication. I've enabled debugging from wpa-supplicant and used wireshark to capture the event that causes the disconnect. I'm still at a loss as to what is causing the deauthentication (Reason: 2) from the network.
To recap I have a board modeled after the P1010RDB, and am trying to get a USB wireless adapter working. Currently the adapter connects to the network fine, however it drops the connection and reconnects automatically while it shoudl be connected. This causes our cloud application to drop out.
The setup is:
Adapter Rosewill RNWD-N1501UB USB adapter
Ralink RT5370 chipset
Linux rt2800usb driver (rt2x00)
wpa-supplicant v2.4
I've attached the wpa-supplicant debug log showing one event and a wireshark capture showing multiple events, pinging google between the events.
If anyone has some information to share it would be greatly appreciated! Even if it is just to suggest a different usb wireless adatper
Thanks.