Unable to change Wi-Fi country code Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
iFelix18
Posts: 7
Joined: Sun Apr 19, 2020 11:09 am

Unable to change Wi-Fi country code

Post by iFelix18 »

Trying to change code via DietPi-Config I get the following error on RPi 4 Model B (aarch64):

Code: Select all

[FAILED] Country code "IT" could not been applied.
Please check the country code and try again.
If problems persist, this may be a limitation with the driver/chipset.
User avatar
Joulinar
Posts: 3215
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to change Wi-Fi country code

Post by Joulinar »

Hi,

many thanks for your message. I tried to replicate your issue but for me this is working well. I did it as well on RPi4B 64bit

Code: Select all

root@DietPi4:~# dietpi-config
[ SUB2 ] DietPi-Set_hardware > wificountrycode (it)
[  OK  ] DietPi-Set_hardware | Setting in /etc/default/crda adjusted: REGDOMAIN=IT
[  OK  ] DietPi-Set_hardware | Setting in /boot/dietpi.txt adjusted: AUTO_SETUP_NET_WIFI_COUNTRY_CODE=IT
[  OK  ] wificountrycode IT | Completed
[ SUB2 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[ SUB2 ] DietPi-Set_hardware > wifimodules (enable)
[ INFO ] DietPi-Set_hardware | Please wait, enabling WiFi modules...
[ INFO ] DietPi-Set_hardware | Checking for required APT packages: iw wireless-tools crda wpasupplicant
[  OK  ] DietPi-Set_hardware | All required APT packages are already installed.
[  OK  ] wifimodules enable | Completed
[  OK  ] DietPi-Config | Dropping connections, please wait...
[ INFO ] DietPi-Config | Restarting network, please wait...
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
iFelix18
Posts: 7
Joined: Sun Apr 19, 2020 11:09 am

Re: Unable to change Wi-Fi country code

Post by iFelix18 »

I made a fresh install. I have preconfigured the WiFi as explained here.

Changing the code this is what I am shown:

Code: Select all

[ SUB2 ] DietPi-Set_hardware > wificountrycode (it)
[  OK  ] DietPi-Set_hardware | Setting in /etc/default/crda adjusted: REGDOMAIN=IT
[  OK  ] DietPi-Set_hardware | Setting in /boot/dietpi.txt adjusted: AUTO_SETUP_NET_WIFI_COUNTRY_CODE=IT
[  OK  ] wificountrycode IT | Completed
[ SUB2 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[ SUB2 ] DietPi-Set_hardware > wifimodules (enable)
[ INFO ] DietPi-Set_hardware | Please wait, enabling WiFi modules...
[ INFO ] DietPi-Set_hardware | Checking for required APT packages: iw wireless-tools crda wpasupplicant
[  OK  ] DietPi-Set_hardware | All required APT packages are already installed.
[  OK  ] wifimodules enable | Completed
[  OK  ] DietPi-Config | Dropping connections, please wait...
[ INFO ] DietPi-Config | Restarting network, please wait...
[ SUB2 ] DietPi-Services > start
[  OK  ] DietPi-Services | start : cron
[ INFO ] DietPi-Config | Reloading networking data, please wait...
[  OK  ] DietPi-Config | Network restarted
After that I get the error reported in the first post. After rebooting, the code is "DE".
User avatar
Joulinar
Posts: 3215
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to change Wi-Fi country code

Post by Joulinar »

where do you have the error message? because the output looks fine
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
iFelix18
Posts: 7
Joined: Sun Apr 19, 2020 11:09 am

Re: Unable to change Wi-Fi country code

Post by iFelix18 »

I found the answer apparently. As explained here "the kernel module cfg80211 is able to get regulatory information by an acess point, if it is associated with it", and as explained here on the forum of the manufacturer of my access point "All the Deco EU version products use DE as country code". That's why I couldn't set a country other than DE.
User avatar
Joulinar
Posts: 3215
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to change Wi-Fi country code

Post by Joulinar »

ah interesting. thx for sharing
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply