HELP,I want to know how to configure Wireless Country Code on Raspberry Pi 3B+ ?

My native language is not English, so this question is translated
This is my first time using Raspberry Pi 3B+ to install OpenWrt, and while browsing the device help page of Raspberry Pi, I noticed this issue:

Original page link: [OpenWrt Wiki] Raspberry Pi
Wireless Country Code
Setting the Country Code under Network → Wireless in LuCI does not work with the Raspberry Pi, you will need to set the country code in the latest Raspberry Pi OS. Then you can go back to OpenWrt where the new country code will be used. Starting with Raspberry Pi 3 B+, the on-board WiFi won't even start if there is no country code.

After reading this passage, I still don't quite understand how to change the Wireless Country Code on the Raspberry Pi 3B+. Based on my understanding, does this mean that I need to install two systems (Raspberry Pi OS and OpenWrt) simultaneously and configure Wireless Country Code on Raspberry Pi OS, or choose Wireless Country Code when burning OpenWrt firmware using Raspberry Pi official tools (I may not be able to burn OpenWrt firmware using Raspberry Pi official tools, I haven't tried it yet). So what should I do? Please give me a detailed guide on how to change the Wireless Country Code on the Raspberry Pi 3B+.

I really need help.
Thank you to everyone who read this question or provided assistance.

Try these commands

iw reg set "YOUR-COUNTRY-CODE"
iw reg get
1 Like

Thank you for your answer. I will try these commands in the OpenWrt command line.

1 Like

These commands don't work on my Raspberry Pi 3B+ :sob:

iw reg set "YOUR-COUNTRY-CODE"
iw reg get

Can someone help me and explain in detail how to operate the solution provided by the official Wiki?
Thank you very much, everyone.

Original page link: [OpenWrt Wiki] Raspberry Pi
Wireless Country Code
Setting the Country Code under Network → Wireless in LuCI does not work with the Raspberry Pi, you will need to set the country code in the latest Raspberry Pi OS. Then you can go back to OpenWrt where the new country code will be used. Starting with Raspberry Pi 3 B+, the on-board WiFi won't even start if there is no country code.

Is this a new Raspberry Pi, or have you used it before ?
The Wi-Fi country code needs to be set in the hardware, and this can only be done from Raspbian / Raspberry Pi OS.
It only needs to be done once. Perhaps by loading Raspberry Pi OS onto a spare MicroSD card?

2 Likes

Yes, this is a new Raspberry Pi. I haven't used it before. According to what you said, does this mean that I need to use another MicroSD card, flash Raspberry Pi OS onto it, and boot it up. Then set the Wi Fi country code on the Raspberry Pi OS and start the OpenWrt system. But I don't think Raspberry Pi OS will make all systems on this Raspberry Pi execute according to the set Wi Fi country code like a computer's BIOS. But thank you for your answer, I will try. Wishing you a wonderful day.

1 Like

Yes. Boot Raspberry Pi OS, run raspi-config, under Localisation set Wi-Fi country code. Shut down Raspberry Pi OS, swap MicroSD card for OpenWrt one, start OpenWrt.

1 Like