Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:configurations:setting-the-wi-fi-country-code

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
products:sbc:common:configurations:setting-the-wi-fi-country-code [2026/02/03 01:43]
gray update by using AI
products:sbc:common:configurations:setting-the-wi-fi-country-code [2026/02/23 21:29] (current)
gray old revision restored (2025/10/13 07:51)
Line 1: Line 1:
 ====== Wi-Fi Country Code Configuration Guide ====== ====== Wi-Fi Country Code Configuration Guide ======
-===== 1. Introduction ===== 
  
-By default, the Wi-Fi module's Country Code is set to ''00'' (global). +===== 1. Introduction ===== 
-Wi-Fi channels and transmit power levels are regulated differently in each country. +By default, the Wi-Fi module'**Country Code** is set to ''00'' (global).   
-To ensure proper functionality and legal compliance when using the device in a specific country, you must set the Country Code to match your location.+Wi-Fi channels and power levels are regulated differently in each country.   
 +To ensure proper functionality and legal compliance when using the device in different country, you may need to set the Country Code to match your current location.  
  
-Setting the correct country code can prevent issues where certain Wi-Fi networks are not visible or connections are unstable.+This can prevent issues where certain Wi-Fi networks are not visible or the connection is unstable.
  
 ===== 2. Firmware and Configuration Path ===== ===== 2. Firmware and Configuration Path =====
 +On **Ubuntu-based systems**, the firmware and configuration files for Broadcom Wi-Fi modules are located in the following directory ''/lib/firmware/brcm/''.
 +This is the standard path used across the system.
  
-On Ubuntu-based systems, the firmware and configuration files for Broadcom Wi-Fi modules are located in the following directory: ''/lib/firmware/brcm/''. 
-This is the standard system path. 
  
 ===== 3. Identifying the Configuration File ===== ===== 3. Identifying the Configuration File =====
- 
 The configuration file for a specific Wi-Fi module follows the naming convention: ''config_xxxxx.txt''. The configuration file for a specific Wi-Fi module follows the naming convention: ''config_xxxxx.txt''.
  
-Here, xxxxx corresponds to the firmware filename of the specific Wi-Fi module. +where **xxxxx** corresponds to the module'firmware filename.
-Examples+
  
-    AP6275S (VIM4) - config_bcm43752a2_ag.txt+=== Examples ===
  
-    AP6275P (Edge-2L) - config_bcm43752a2_pcie_ag.txt+  * AP6275S(VIM4) ''config_bcm43752a2_ag.txt''   
 +  * AP6275P(Edge2) - ''config_bcm43752a2_pcie_ag.txt''   
 +  * AP6398S(VIM3/3L) - ''config_bcm4359c0_ag.txt''
  
-    AP6398S (VIM3/VIM3L) - config_bcm4359c0_ag.txt +==== 4. Temporary Method: Using iw (for Testing) ==== 
- +This is the quickest way to change the country code. It'perfect for testing if a specific setting resolves your issue, **but the change will be lost after you reboot the device.**
-===== 4. Temporary Method: Using iw (for Testing) ===== +
- +
-This is the quickest way to change the country code. It'useful for testing if a specific setting resolves an issue. Howeverthis change is not persistent and will be lost after reboot+
-Set the Country Code +
- +
-Open a terminal and run the iw reg set command with the two-letter ISO country codeFor example, to set the country to Italy (''IT''):+
  
 +=== Set the Country Code === 
 +Open a terminal and run the iw reg set command with the two-letter ISO country code. For example, to set the country to Italy (IT):
 ``` ```
 sudo iw reg set IT sudo iw reg set IT
 ``` ```
- +Verify the Change 
-==== Verify the Change ==== +You can immediately check if the setting was applied using the iw reg get command:
- +
-You can immediately check if the setting was applied:+
  
 ``` ```
 sudo iw list | grep MHz sudo iw list | grep MHz
 ``` ```
 +The output should show the frequency those are allowed in the set country.
  
-The output should show the frequency ranges allowed in the country you set. +If this temporary setting fixes your Wi-Fi problemyou should proceed to the permanent method below.
- +
-If this temporary setting resolves your Wi-Fi issue, proceed to the permanent method below.+
  
 ===== 5. Permanent Method: Editing the Config File (Recommended) ===== ===== 5. Permanent Method: Editing the Config File (Recommended) =====
- +You can change the Country Code by editing the appropriate configuration file.
-You can permanently change the Country Code by editing the appropriate configuration file.+
  
 === Example: Setting Country Code for Italy (IT) === === Example: Setting Country Code for Italy (IT) ===
  
-First, consult the reference document to find the correct ccode and regrev values for your country and hardware: 
 [[dl>resources/development/wifi/get-ccode-regrev.xlsx|Check ccode and regrev correspondence]] [[dl>resources/development/wifi/get-ccode-regrev.xlsx|Check ccode and regrev correspondence]]
  
 <WRAP important > <WRAP important >
-For VIM4 and Edge-2L, the ''regrev'' value for all countries is ''0''. For example, the United States is configured as ''US/0''.+For VIM4 and Edge2, the regrev value for all countries is 0, such as the United states: US/0.
 </WRAP> </WRAP>
  
Line 70: Line 61:
 ``` ```
  
-2. Modify the file to specify the desired **ccode** and **regrev** values.+2. Modify the file content to specify the desired **ccode** and **regrev** values.  
 + 
 For Italy, the configuration should be: For Italy, the configuration should be:
  
Line 79: Line 71:
  
 === IMPORTANT === === IMPORTANT ===
- +The correct values for ccode and regrev are specific to your Wi-Fi module and country.   
-The correct values for **ccode**and **regrev** are specific to your Wi-Fi module model and target country. +You must consult the appropriate regulatory documentation or tables for your hardware.   
-You must consult the appropriate regulatory documentation or tables for your hardware. +Using incorrect values may result in improper device operation.
-Using incorrect values may cause improper device operation or violate local regulations.+
  
  
 ===== 6. Apply and Verify the Changes ===== ===== 6. Apply and Verify the Changes =====
  
-==== Step 1: Reboot the System ====+=== Step 1: Reboot the System ===
 After saving the configuration file, reboot the device for the changes to take effect. After saving the configuration file, reboot the device for the changes to take effect.
  
Line 94: Line 85:
 ``` ```
  
-==== Step 2: Verify the Setting ====+=== Step 2: Verify the Setting ===
 After rebooting, confirm that the new Country Code has been applied by checking the kernel messages: After rebooting, confirm that the new Country Code has been applied by checking the kernel messages:
  
 ``` ```
-dmesg | grep -i Country+dmesg | grep Country
 ``` ```
  
Line 112: Line 103:
  
 ==== Summary ==== ==== Summary ====
-  * Identify and edit the correct ''config_*.txt'' file under ''/lib/firmware/brcm/''. +  * Edit the correct ''config_*.txt'' file under ''/lib/firmware/brcm/'' 
-  * Set the proper ''ccode'' and ''regrev'' values based on your hardware and country. +  * Set proper ccode and regrev 
-  * Reboot the device and verify the change via ''dmesg''.+  * Reboot and verify via dmesg
  
Last modified: 2026/02/03 01:43 by gray