Open ghost opened 8 years ago
Kudos for the detailed analyses :+1:
I have my regulatory domain set to a country.
How/where can/should you do that?
This is what I get from iw reg get
Do you happen to know some good tutorials on the use of iw
? I'm actually pretty clueless about it and the help info is quite daunting (to me) with loads of things in it that don't ring a bell and the man
page seems to be pretty useless.
I've been having some issues (maybe related to wpa_supplicant
) and getting (and/or setting) the right info with the right tools (iw
and ip
) seems like something I should learn.
Things work fine on my PC which uses a wired network connection, but the issues are on my laptop which has a wireless device and plugging in my rtl8812AU device doesn't make things easier :wink:
I'm not sure that the driver reacts correctly to iw reg set, but it has an "iwpriv channel_plan" command (see include/rtw_mlme_ext.h and core/rtw_mlme_ext.c) though I'm not sure it does the "right" thing either.
If you look at os_dep/linux/ioctl_linux.c you'll see that "iwpriv channel_plan" is implemented by rtw_wx_set_channel_plan which in turn calls rtw_set_chplan_cmd.
This is in core/rtw_cmd.c and it checks that the parameter is valid by using the macro rtw_is_channel_plan_valid, defined in include/rtw_mlme_ext.h as
#define rtw_is_channel_plan_valid(chplan) (chplan<RT_CHANNEL_DOMAIN_MAX || chplan == RT_CHANNEL_DOMAIN_REALTEK_DEFINE)
RT_CHANNEL_DOMAIN_MAX is defined in include/rtw_mlme_ext.h, where you can see the valid values for the "iwpriv channel_plan" parameter while the definitions of the various plans are in core/rtw_mlme_ext.c
I investigated because I see with iw list that various channels are disabled while they shouldn't in my regdomain (ES). Using the iwpriv I see some of them enabled (at least for x seconds, I suppose for DFS but I'm not an expert on wifi issues). BTW, I'm currently using your repository (the 4.3.14 branch, the 4.3.21 doesn't work with my adapter) but there should be no significant difference wrt regdomains to diederikdehaas' one
Oh, and I investigated just because I couldn't see my access point, which had the channel set to auto and it selected one of the disabled one. I just set it manually and now I can connect, but I wonder why the driver doesn't allow me to use channels that are available here.
@uminokoe yes, it is listed (0bda:881a) but somehow it fails during initialization and it enters in a loop, but I didn't investigate too much. I don't absolutely need to see all channels but it bothers me that it doesn't use all legally available channels. The change I see in 4.3.21 is that RT_CHANNEL_DOMAIN* is now RTW_CHPLAN* but the rest seems to be the same (just had a cursory glance).
I commented out that line, iw list shows all channels up to 140 as available (52-140 with radar detection). Put the AP in auto mode, it selected channel 104 but the wifi stick cannot see it (and it is there: my mobile connects to it just fine). I tried channel 52 (also with radar detection) and it doesn't work either.
I could not get 5Ghz to work. After reading this post I change the channel to 36, and it now works. Thanks.
I have my regulatory domain set to a country. This is what I get from
iw reg get
:For the same country, the matching record in
db.txt
from https://www.kernel.org/pub/software/network/wireless-regdb/ is shown below:However, when I run
iw list
, the output shows that some channels are disabled. Some channels have the flag "(no IR)", so those channels cannot be used, too.In addition, if I interpreted the regulatory domain regulation (records in
db.txt
) correctly, channels 12 and 13 in 2.4GHz should be available for use. However, this is what I get fromiw list
:As a result, if the adapter attempts to use the disabled / no-IR channels (no matter in station mode or AP mode), the operation will fail. I have been able to reproduce this issue on version 4.3.22-beta and 4.3.21.