cancel
Showing results for 
Search instead for 
Did you mean: 

Wi-Fi Bluetooth for Linux

NiHu_4608796
New Contributor

I'm trying to use band 13 in Australia. We can't see a network set to that band, we see this setting if we run "iw list", so we should be able to see them.

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] (20.0 dBm)
* 2484 MHz [14] (disabled)

What settings do we need to change to ensure that it works correctly?
I have attached the files I'm using for this. Are they correct?

0 Likes
7 Replies
YashM
Moderator
Moderator

Hi

Can you please try "wl commands"?

I used the clm_blob that you have attached and I see the following:

+ ./wl clmver
API: 12.2
Data: 9.14.6
Compiler: 1.29.4
ClmImport: 1.59.4
Creation: 2020-11-19 08:06:11

root@imx6ulevk:~# wl country AU
root@imx6ulevk:~# wl channels
1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 132 136 140 144 149 153 157 161 165
root@imx6ulevk:~# wl channel 13

root@imx6ulevk:~# wl chan_info
Channel 1 B Band
Channel 2 B Band
Channel 3 B Band
Channel 4 B Band
Channel 5 B Band
Channel 6 B Band
Channel 7 B Band
Channel 8 B Band
Channel 9 B Band
Channel 10 B Band
Channel 11 B Band
Channel 12 B Band
Channel 13 B Band

Channel 13 for Australia (AU) is present in the blob.

Thanks

0 Likes
NiHu_4608796
New Contributor

Hi Yash,

I've use wl tool that is here:
https://github.com/murata-wireless/cyw-fmac-utils-imx32
for our 32-bit system, but it does not run. Is there a better package available?
We have a 32-bit NXP IMX7Dual processor running Android, so we may be missing a required library.

I see this line of kernel debug come out
[ 44.232992] cfg80211: Regulatory domain changed to country: AU
How does the module get configured for the correct region? It seems likely to me that the module is not getting configured correctly. My understanding is that if configured for a global region, it should allow a scan to see the correct network anyway.

EDIT:

I've turned on a bit more debug (turning it all on lowers performance enough the whole chip stops working) and found some useful error logs.When I set the regulator code I "
No country codes configured for device
"
I see this gets sets from "brcmfmac_pdata" and requires platform data from the device tree(?).
What should this be configured to exactly? I don't see any examples of how to correctly configure this
0 Likes
raks_99
Moderator
Moderator

Hi  @NiHu_4608796 ,

We don't completely support iw tool.  We recommend using the wl tool.

You can find 32bit tool https://community.infineon.com/t5/AIROC-Wi-Fi-and-Wi-Fi-Bluetooth/Wireless-tool-wl-for-armhf-archite...

If the ones in that post doest work then you can try with the attached package.

If you face issues then you can post the output log. The dynamically linked binaries will need libnl shared libraries to be installed. But since you are running iw I assume you might already have them installed.

Thanks

 

0 Likes
NiHu_4608796
New Contributor

Hi @raks_99,

I have done this and get the device set to US by default. Changing to AU allows it to see the networks. However we need to fix the driver so this can be configured by the global settings so the device can detect it's operating environment correctly. By using the kernel driver I see this message coming out
[ 108.008580] brcmfmac: No country codes configured for device
[ 108.015354] brcmfmac: Translate country code returned err = -22

How do we configure these country codes in the driver?

In addition is there a country to set it to that is suitable for worldwide usage so that it will can connect to all networks but not broadcast on those that are not suitable for worldwide usage?

0 Likes
raks_99
Moderator
Moderator

Hi @NiHu_4608796 ,

Can you rephrase "However we need to fix the driver so this can be configured by the global settings so the device can detect it's operating environment correctly"?


At what point do you see the 'No country codes configured for device'? Is it after running the "wl country AU" command?

The iw and the cfg80211 subsystem will fetch the country code from regdb.
We use the clm blob file instead of the kernel's regdb. This is why you might observe different countries when you run 'iw reg get' and 'wl country'.

 

0 Likes
NiHu_4608796
New Contributor

Can you rephrase "However we need to fix the driver so this can be configured by the global settings so the device can detect it's operating environment correctly"?

Android has a different method of configuring wifi regions so I want it to work that way rather than load wl and run a script at startup. It feels like it's not far from working

At what point do you see the 'No country codes configured for device'? Is it after running the "wl country AU" command?

Yes, after running that command. It comes from
https://elixir.bootlin.com/linux/v4.14.257/source/drivers/net/wireless/broadcom/brcm80211/brcmfmac/c...  brcmf_translate_country_code

it seems that drvr->settings->country_codes needs to be filled, and this is filled from brcmfmac_pdata earlier in the driver. Is this trying to pull it from the device tree? There should be some config somewhere to fill this array.

 

 

 

0 Likes
raks_99
Moderator
Moderator

Hi @NiHu_4608796 ,

The cyfmac driver  will always have a different country code than the cfg80211 subsystem. 

I attached a patch that will hint the country code to the cfg80211 system.

Can you try this and let me know if it helped?

Thanks,

0 Likes