Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-quick-start:basic_wifi [2018/07/21 16:11] – Fix typo: pysical -> physical hazcatdocs:guide-quick-start:basic_wifi [2024/12/11 14:36] – update and simplify to be more accurate palebloodsky
Line 1: Line 1:
-======Enabling a Wi-Fi access point on your LEDE device======+======Enabling a Wi-Fi access point on OpenWrt======
  
-Devices that have ethernet ports have Wi-Fi turned off by default. +Devices with Ethernet ports have Wi-Fi turned off by default for security reasons. This page contains basic settings to enable Wi-Fi.
-This is a basic description, how to enable a first WiFi network and most important, how to properly configure your country code such that your WiFi network complies with the legal regulation of your country.+
  
-===== On web admin GUI ======+===== Setup with the web GUI ======
  
-  - Open the admin GUI on http://192.168.1.1 +  - Connect to LuCI at http://192.168.1.1, and login with your "root" password. 
-  - Login with your "root" password +  - Go to **Network → Wireless**. This page lists a separate Wi-Fi configuration for each physical radio (most devices will have one for 2.4 GHz and one for 5 GHz). 
-  - Go to the menu Network → Wireless. This page list a separate WiFi configuration section for each of your physical radios, (many devices you will have a first radio for 2.4 GHz and a second one for 5 GHz). +  - For each Wi-Fi network, click ''Edit'' (if not there click ''Add'' to create a networkto configure: 
-  - For each of your radios, you can create a WiFi network by clicking ''Add''+      In **General Setup**, select the ''Country Code'' where your OpenWrt device is installed. This is to ensure your radios meet local regulations. Note this was formerly in the **Advanced** tab. 
-    - On the first WiFi network that you configure, go to the **Device Configuration** and open the tab **Advanced Settings**: in the ''Country Code'' field, select the correct county code, where your LEDE device is installed. This is important to ensure your LEDE device meets legal regulations in your country(all other configured radios will use the same device settings) +      * In **General Setup**, enter an ''ESSID''the name for your Wi-Fi network. 
-    - For each WiFi network, in the "Interface Configuration" section, configure your WiFi settings, at least customizing the following settings: +      * In **Wireless Security**, select an ''Encryption'' method, "WPA2-PSK" or "WPA3-PSKis recommended. 
-      * In the tab **General Setup**, define a custom ''ESSID'' (the name of your WiFi network) +      * In **Wireless Security**, enter a ''Key'', the password devices use to connect to your Wi-Fi network. 
-      * In the tab **Wireless Security**, activate some ''Encryption'' (e,g, "WPA2-PSK"+      * As needed, configure other settings such as a different Cipher, KRACK mitigation, or additional Wi-Fi networks
-      * In the tab **Wireless Security**, activate a ''Cipher'' (e.g. "Force CCMP AES") +  - Click ''Save & Apply''
-      * In the tab **Wireless Security**, in ''Key'', define a personal secret phrase, which clients need to useto successfully connect to your WiFi network. +  - Finally, click ''Enable'' on each radio you would like to activate.
-      * If needed, configure further settings according to your needs. often the default settings like **auto** are sufficient for general usage+
-  - Click ''Save & Apply'' when done.+
  
-Troubleshooting: +===== About the Country Code ======
-  * If you have configured 5GHz WiFi and have just enabled it, but the 5 GHz WiFi does not seem to start up, consider the following: If your device supports WiFi channels > 100, your LEDE device first must scan for weather radar on these channels, before you can actually use such channels for WiFi. This may take 1-10 minutes onetime after first reboot depending on your WiFi situation and depending on the number of device-supported channels > 100. You may also experience 1 minute delay on each automatic channel change, as the same scan delay is required for regulation compliance.+
  
-===== On SSH command line=====+To comply with your local regulatory laws, the correct country code for the radios on your device must be set. The default 00 (Rest of the World) country code limits operation to the limited set of channels and transmission power that are allowed anywhere in the world. You will typically have more available channels and higher power levels when you set the country code to your own. Be aware that setting the wrong country code could get you in trouble with local authorities because selecting a channel or transmitting at higher power than is allowed could interfere with other equipment, like radar. You can also interfere with your neighbor's devices.
  
-This is not a complete howtoto create a WiFi network on the command line.\\ +On Linux based devices, like OpenWrt, the database of regulatory domains comes from the [[https://git.kernel.org/pub/scm/linux/kernel/git/wens/wireless-regdb.git/tree/db.txt|wireless-regdb]]. In there is the list of countries sorted alphabetically by their [[wp>ISO 3166-1 alpha-2]] with allowed frequencieschannel bandwithand transmission strength (dBm) or power (mW).
-It just shows you the important stepto initially set your country code for proper WiFi on the command lineto meet legal regulations of your country:+
  
-  * Connect with SSH to your LEDE device. +If you plan to set your country code using the web GUI, do that from the dropdown, but if you intend to do it via command line, take note of your [[wp>ISO 3166-1 alpha-2]] code on the link.
-  * Execute ''uci show wireless'' to see all the wireless configuration and how many Wi-Fi chips (called “radio” in the config) there are on the device +
-  * Find out your country in a list of ISO/IEC 3166 alpha2 country codes. There is a list on the wikipedia article about ISO 3166-1 alpha-2 +
-  * Execute ''uci set wireless.radio0.country='XX' '' to set the country code XX for radio0 device, and adjust this command to set the same country code for all wireless radios in the device.+
  
 +===== Troubleshooting =====
 +  * If you have configured 5 GHz Wi-Fi and have just enabled it, but it does not start up immediately, consider the following: If your device supports Wi-Fi channels >100, your OpenWrt device first must scan for weather radar on these channels, before you can actually use such channels for Wi-Fi. This will take 1-10 minutes once after first reboot depending on your Wi-Fi situation and depending on the number of device-supported channels >100. You may also experience 1 minute delay on each automatic channel change, as the same scan delay is required for regulation compliance. For more information see [[:docs:techref:dfs|DFS]].
 +  * Network / Wireless / Edit / Interface Configuration / General Setup / Network should be left to the "lan" default or to another interface where there is an active DHCP server, DO NOT select "wan" or "wan6" as that's the upstream interface for the Internet.
 +
 +===== Using the command line =====
 +
 +This is not a complete howto on how to create a fine tuned Wi-Fi network on the command line. It just shows you the important steps to initially set the basics for properly enabling the Wi-Fi on the command line, to meet the legal regulations of your country:
 +
 +  * Connect with SSH to your OpenWrt device: ''$ ssh root@192.168.1.1''
 +  * Execute ''uci show wireless'' to see all the wireless configurations and how many Wi-Fi chips (called “radio” in the config) there are on the device. Identify the radio number (0, 1, 2, etc) that are you aiming to configure, e.g., ''radio0'', ''radio1'', ''radio2''.
 +  * Execute ''uci set wireless.radio**N**.country='XX' '' to set the country code XX for each (N = 0, 1, 2) radio devices your router may have. Refer to the first section of this page.
 +  * Execute ''uci set wireless.radio**N**.disabled='0' '' to enable all the said radio(s).
 +  * Commit the changes executing: ''uci commit wireless''.
 +  * Reload the wifi interfaces: ''wifi reload''.
 +  * Wait a couple of minutes to allow the radio(s) booting, and for 5 GHz DFS scanning. Enjoy.
  
  • Last modified: 2024/12/11 22:58
  • by palebloodsky