[SOLVED] Wifi channel 13 not available

Questions about WIFI networks and devices
Forum rules
Before you post please read how to get help
marz12
Level 1
Level 1
Posts: 36
Joined: Tue Mar 11, 2014 3:29 pm

[SOLVED] Wifi channel 13 not available

Post by marz12 » Tue Dec 27, 2016 6:15 pm

Hello,

I have a PC with dual-boot : Linux Mint 18.1 Cinnamon / Windows 10
The wifi card is working properly on Windows.

On Linux Mint, it works ok when connecting on channel 5.
But channel 13 is not reachable.
The wifi card is a Qualcomm Atheros, on linux the driver is ath10k_pci.

I've tried

Code: Select all

sudo iw reg set FR
without any change.
It seems to be a quite common problem, but I couldn't solve it yet.

here are the results of wireless info:
http://pastebin.ubuntu.com/23696824/

If someone had an idea, it would be nice...
Last edited by marz12 on Fri Dec 30, 2016 11:03 am, edited 2 times in total.

supertuxkart
Level 4
Level 4
Posts: 374
Joined: Sat Jan 23, 2016 5:58 pm

Re: Wifi channel 13 not available

Post by supertuxkart » Tue Dec 27, 2016 6:28 pm

Well, channel 13 looks as not existing on your wifi.
Post :

Code: Select all

sudo iwlist logical_name_of_your_wifi channel
when it does not connect.

JeremyB
Level 20
Level 20
Posts: 11018
Joined: Fri Feb 21, 2014 8:17 am

Re: Wifi channel 13 not available

Post by JeremyB » Tue Dec 27, 2016 6:42 pm

Post result for

Code: Select all

cat /etc/default/crda
I have not noticed that before

marz12
Level 1
Level 1
Posts: 36
Joined: Tue Mar 11, 2014 3:29 pm

Re: Wifi channel 13 not available

Post by marz12 » Tue Dec 27, 2016 6:42 pm

Thanks for helping.

Sure, iwlist does not "see" channel 13:

Code: Select all

wlp2s0    31 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 36 : 5.18 GHz
          Channel 40 : 5.2 GHz
          ....

marz12
Level 1
Level 1
Posts: 36
Joined: Tue Mar 11, 2014 3:29 pm

Re: Wifi channel 13 not available

Post by marz12 » Tue Dec 27, 2016 6:48 pm

result of
cat /etc/default/crda

Code: Select all

REGDOMAIN=FR
result of
iw reg get

Code: Select all

country FR: DFS-ETSI
	(2402 - 2482 @ 40), (N/A, 20), (N/A)
	(5170 - 5250 @ 80), (N/A, 20), (N/A)
	(5250 - 5330 @ 80), (N/A, 20), (0 ms), DFS
	(5490 - 5710 @ 160), (N/A, 27), (0 ms), DFS
	(57000 - 66000 @ 2160), (N/A, 40), (N/A)
Thanks.

JeremyB
Level 20
Level 20
Posts: 11018
Joined: Fri Feb 21, 2014 8:17 am

Re: Wifi channel 13 not available

Post by JeremyB » Tue Dec 27, 2016 6:55 pm

Try installing a 4.8 kernel using the Mint Update Manager, using View/linux kernels. Once installed, reboot
I did find some activity in the linux-next.git log for ath10k that could be the solution

marz12
Level 1
Level 1
Posts: 36
Joined: Tue Mar 11, 2014 3:29 pm

Re: Wifi channel 13 not available

Post by marz12 » Wed Dec 28, 2016 5:16 am

OK, my kernel is now
4.8.0-32-generic x86_64

Still can't get channel 13.

there seems to be a problem loading the firmware:
dmesg | grep ath10k

Code: Select all

[    3.995451] ath10k_pci 0000:02:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[    4.501198] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:02:00.0.bin failed with error -2
[    4.501205] ath10k_pci 0000:02:00.0: Direct firmware load for ath10k/cal-pci-0000:02:00.0.bin failed with error -2
[    4.504397] ath10k_pci 0000:02:00.0: qca9377 hw1.1 target 0x05020001 chip_id 0x003821ff sub 11ad:08a6
[    4.504399] ath10k_pci 0000:02:00.0: kconfig debug 0 debugfs 1 tracing 1 dfs 0 testmode 0
[    4.504760] ath10k_pci 0000:02:00.0: firmware ver WLAN.TF.1.0-00267-1 api 5 features ignore-otp crc32 79cea2c7
[    4.569238] ath10k_pci 0000:02:00.0: board_file api 2 bmi_id N/A crc32 93da0176
[    6.353739] ath10k_pci 0000:02:00.0: htt-ver 3.1 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1
[    6.365924] ath10k_pci 0000:02:00.0 wlp2s0: renamed from wlan0
[   12.118768] ath10k_pci 0000:02:00.0: no channel configured; ignoring frame(s)!
I notice: qca9377 hw1.1

but there is no qca9377 hw1.1 (if I'm right)
ls /lib/firmware/ath10k/QCA9377/

Code: Select all

hw1.0
Not found hw1.1 either on https://github.com/kvalo/ath10k-firmwar ... r/QCA9377/

Still, the wifi card does connect properly to channel 5.

I keep searching.

JeremyB
Level 20
Level 20
Posts: 11018
Joined: Fri Feb 21, 2014 8:17 am

Re: Wifi channel 13 not available

Post by JeremyB » Wed Dec 28, 2016 7:02 am

The firmware errors have been around for some time. We can try setting the country code in one more place

Code: Select all

echo "options cfg80211 ieee80211_regdom=FR" | sudo tee /etc/modprobe.d/cfg80211.conf
Reboot

marz12
Level 1
Level 1
Posts: 36
Joined: Tue Mar 11, 2014 3:29 pm

Re: Wifi channel 13 not available

Post by marz12 » Wed Dec 28, 2016 7:40 am

Hello,

I tried it, but the result was I had no more wifi. So I removed /etc/modprobe.d/cfg80211.conf

According to this
http://askubuntu.com/questions/434376/a ... 13-anymore
I noticed that the package wireless-crda was not installed, so I got it. But nothing changed...

marz12
Level 1
Level 1
Posts: 36
Joined: Tue Mar 11, 2014 3:29 pm

Re: Wifi channel 13 not available

Post by marz12 » Wed Dec 28, 2016 10:32 am

trying
dmesg | grep ath
I get

Code: Select all

[    6.356350] ath: EEPROM regdomain: 0x69
[    6.356351] ath: EEPROM indicates we should expect a direct regpair map
[    6.356353] ath: Country alpha2 being used: 00
[    6.356353] ath: Regpair used: 0x69
This is described here:
https://sites.google.com/site/twisteroi ... -user-regd
Well, I'll need some more work before being able to patch and recompile the kernel, as suggested.

JeremyB
Level 20
Level 20
Posts: 11018
Joined: Fri Feb 21, 2014 8:17 am

Re: Wifi channel 13 not available

Post by JeremyB » Wed Dec 28, 2016 11:01 am

I wouldn't recompile an entire kernel for a small change in one module, just patch and compile the patched module

marz12
Level 1
Level 1
Posts: 36
Joined: Tue Mar 11, 2014 3:29 pm

Re: Wifi channel 13 not available

Post by marz12 » Wed Dec 28, 2016 3:10 pm

Okay.
As I never did that, I got some information there
http://askubuntu.com/questions/515407/h ... nel-module
I'll try it and give a feed back.
Thanks.

JeremyB
Level 20
Level 20
Posts: 11018
Joined: Fri Feb 21, 2014 8:17 am

Re: Wifi channel 13 not available

Post by JeremyB » Wed Dec 28, 2016 5:55 pm

Actually lets try something else, change the country code to Germany to see if there is an error in regdb

Code: Select all

sudo iw reg set DE
sudo sed -i 's/^REG.*=$/&DE/' /etc/default/crda
Reboot

JeremyB
Level 20
Level 20
Posts: 11018
Joined: Fri Feb 21, 2014 8:17 am

Re: Wifi channel 13 not available

Post by JeremyB » Wed Dec 28, 2016 6:13 pm

If you do want to download the source and make the changes, the link might not be accurate

To download the kernel source

Code: Select all

apt-get source linux-image-$(uname -r)
You will find a folder named linux-4.8 or whatever kernel is installed in the home directory

Copy the patch into the home directory and see if the patch command works

Code: Select all

patch -p1 < name-of-the patch
If that goes ok, then

Code: Select all

cd linux-4.8/drivers/net/wireless/ath
Copy the config file

Code: Select all

cp /usr/src/linux-headers-`uname -r`/.config ./
Then copy the module.symvers

Code: Select all

cp /usr/src/linux-headers-$(uname -r)/Module.symvers Module.symvers
Then you can run the make and make install

Code: Select all

make -C /lib/modules/$(uname -r)/build M=$(pwd) modules
make -C /lib/modules/$(uname -r)/build M=$(pwd) modules_install
I rarely use the make -C /lib/modules/$(uname -r)/build M=$(pwd) modules_install command as I usually make a backup of the original module and then copy the new one to where the original was.

Then sudo depmod -a only needs to be used if you are adding PCI or USB ID's to a module to support new devices and in your case it should not be needed

marz12
Level 1
Level 1
Posts: 36
Joined: Tue Mar 11, 2014 3:29 pm

Re: Wifi channel 13 not available

Post by marz12 » Thu Dec 29, 2016 6:27 am

It's a good idea to try easy solutions first, so I launched

Code: Select all

sudo iw reg set DE
sudo sed -i 's/^REG.*=$/&DE/' /etc/default/crda
(and then I edited manually /etc/default/crda with REGDOMAIN=DE because the sed command didn't work)

after reboot I tried
iw list
which gives

Code: Select all

(...)
Frequencies:
			* 2412 MHz [1] (20.0 dBm)
			* 2417 MHz [2] (20.0 dBm)
			* 2422 MHz [3] (20.0 dBm)
			* 2427 MHz [4] (20.0 dBm)
			* 2432 MHz [5] (20.0 dBm)
			* 2437 MHz [6] (20.0 dBm)
			* 2442 MHz [7] (20.0 dBm)
			* 2447 MHz [8] (20.0 dBm)
			* 2452 MHz [9] (20.0 dBm)
			* 2457 MHz [10] (20.0 dBm)
			* 2462 MHz [11] (20.0 dBm)
			* 2467 MHz [12] (20.0 dBm)
			* 2472 MHz [13] (disabled)
			* 2484 MHz [14] (disabled)
(...)
To patch the module, thank you for your advices, they'll be helpful.
I also found this solution with a little amount of changes to do (if I'm right)
https://forums.gentoo.org/viewtopic-t-9 ... art-0.html
Edit: but this will probably not apply for me, because I don't get the same KERN_DEBUG message. I'll try the other patches - when I'll find time to study them.

JeremyB
Level 20
Level 20
Posts: 11018
Joined: Fri Feb 21, 2014 8:17 am

Re: Wifi channel 13 not available

Post by JeremyB » Thu Dec 29, 2016 6:52 am

The idea from the gentoo forum might work but you are not using US for a country code and the US isn't allowed to use channel 12
Does cat /etc/timezone show accurate information

marz12
Level 1
Level 1
Posts: 36
Joined: Tue Mar 11, 2014 3:29 pm

Re: Wifi channel 13 not available

Post by marz12 » Thu Dec 29, 2016 8:37 am

cat /etc/timezone

Code: Select all

Europe/Paris
(Yes, I reverted from Germany, because it added some limitations)

According to the KERNEL_DEBUG messages and https://wireless.wiki.kernel.org/en/users/drivers/ath the chosen region is WOR9_WORLD (0x69).
This could be used to modify /linux-hwe-edge-4.8.0/drivers/net/wireless/ath/regd.c the same way as in Gentoo forum (or releasing all the rules). Quite dirty but possibly efficient.

marz12
Level 1
Level 1
Posts: 36
Joined: Tue Mar 11, 2014 3:29 pm

Re: Wifi channel 13 not available

Post by marz12 » Thu Dec 29, 2016 5:03 pm

Well, I'm trying to patch the atheros driver with patches used by https://sites.google.com/site/twisteroi ... -user-regd

following your advice (thanks):

Code: Select all

patch -p1 < 402-ath_regd_optional.patch
patching file drivers/net/wireless/ath/regd.c
Hunk #1 FAILED at 341.
Hunk #2 FAILED at 374.
Hunk #3 FAILED at 402.
3 out of 4 hunks FAILED -- saving rejects to file drivers/net/wireless/ath/regd.c.rej
patching file drivers/net/wireless/ath/Kconfig
Hunk #1 succeeded at 22 (offset -1 lines).
can't find file to patch at input line 62
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- a/.local-symbols
|+++ b/.local-symbols
--------------------------
File to patch: 
Looking into drivers/net/wireless/ath/regd.c : it is slightly different from expected, that seems to cause the fails. I could easily make the changes by hand.
But .local-symbols does not exist at all - at least I don't find it.
Don't know if this patch isn't too old.

Still searching, before trying last-hope-dirty-trick-lowering-every-rule....

Thanks.

supertuxkart
Level 4
Level 4
Posts: 374
Joined: Sat Jan 23, 2016 5:58 pm

Re: Wifi channel 13 not available

Post by supertuxkart » Thu Dec 29, 2016 5:50 pm

Well i still see you in difficulty.
I explain a work around to get through this problem.

If you got an old Android's smartphone, you can use the USB cable tethering for the connection.
The smartphone Wi-Fi is far better than the internal one, now i'm using it because it reaches every house's corner, instead the BCM 4313-43142-4312 are failing or got very low signal at six-ten meters distance.

So, disable the smartphone data connection, push for the Wi-Fi and then plug-in the USB cable in the computer and choose the USB cable tethering option, depending on your OS where to find it.
You will have a better and stable connection than any adapter, except if you're in front of the router.

JeremyB
Level 20
Level 20
Posts: 11018
Joined: Fri Feb 21, 2014 8:17 am

Re: Wifi channel 13 not available

Post by JeremyB » Thu Dec 29, 2016 5:59 pm

https://dev.openwrt.org/browser/trunk/p ... ixup.patch
May be the better patch to try but we could change the regd.c file at about line 96 should be

Code: Select all

/* Can be used by 0x66 and 0x69 */
static const struct ieee80211_regdomain ath_world_regdom_66_69 = {
	.n_reg_rules = 3,
	.alpha2 =  "99",
	.reg_rules = {
		ATH9K_2GHZ_CH01_11,
		ATH9K_5GHZ_ALL,
	}
I think if we add one line it will enable 12 and 13 for country code FR

Code: Select all

/* Can be used by 0x66 and 0x69 */
static const struct ieee80211_regdomain ath_world_regdom_66_69 = {
	.n_reg_rules = 3,
	.alpha2 =  "99",
	.reg_rules = {
		ATH9K_2GHZ_CH01_11,
		ATH9K_2GHZ_CH12_13,
		ATH9K_5GHZ_ALL,
	}
As the ATH9K_2GHZ_CH12_13, should allow 12 and 13

Post Reply

Return to “Wireless”