Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:network:wifi:connect_client_wifi [2018/05/19 18:08] – created bobafetthotmail | docs:guide-user:network:wifi:connect_client_wifi [2022/08/18 04:23] – [Web interface instructions] bill888 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Connect to client | + | ====== Connect to client |
| + | This page will explain how to connect your OpenWrt device to another Wi-Fi network by using its own radio. Due to technical limitations, | ||
| - | This page will explain how to connect your OpenWrt device | + | If you want to actually set up a Wi-Fi repeater or keep devices connected |
| - | If you want to actually set up a wifi repeater or keep devices connected to this device in the same subnet as the devices connected to the other router, you will need to follow [[docs: | + | ===== Web interface instructions ===== |
| - | ==== Setup with Luci GUI ==== | + | \\ |
| - | As said above, the **LAN** interface must be set in a different subnet than the wifi network you are connecting to. In our example the wifi network we are connecting to is using **192.168.1.x** addresses, so we will need to change the IP address of the LAN interface first to **192.168.2.1** | + | Refreshed |
| + | \\ | ||
| - | {{: | + | As said above, the **LAN** interface must be set in a different subnet than the Wi-Fi network you are connecting to. In our example the Wi-Fi network we are connecting to is using **192.168.1.x** addresses, so we will need to change the IP address of the LAN interface first to **192.168.2.1** |
| + | |||
| + | /*** old LEDE17 image | ||
| + | {{: | ||
| + | ***/ | ||
| + | |||
| + | \\ | ||
| + | The **LAN** interface must be set in a different subnet than the Wi-Fi network you are connecting to. | ||
| + | |||
| + | * Do NOT wire the router to your main router. | ||
| + | * Reset the router to return to default openwrt settings. | ||
| + | * Connect a computer to a LAN port and log into LuCI web UI at 192.168.1.1. | ||
| + | * Set **LAN protocol** as **static address** (default setting) | ||
| + | * Assign an IP address in a **different** subnet (e.g. 192.168.2.1). Click Save. | ||
| + | * Click **Save and Apply**. | ||
| + | |||
| + | \\ {{media: | ||
| ---- | ---- | ||
| + | * Disconnect and connect again computer to the device to force change of IP address. | ||
| - | Disconnect and connect | + | \\ |
| + | \\ | ||
| + | \\ | ||
| + | |||
| + | We will now set up the client Wi-Fi network, the configuration needed to connect to another Wi-Fi network.\\ | ||
| + | \\ | ||
| + | Once you are logged into the router, | ||
| + | * go in the wireless networks page, and click on **Scan** button. | ||
| + | |||
| + | /*** old LEDE17 image | ||
| + | {{: | ||
| + | ***/ | ||
| + | \\ {{media: | ||
| + | \\ | ||
| + | \\ | ||
| + | |||
| + | * Choose the Wi-Fi network | ||
| + | |||
| + | \\ {{media: | ||
| + | \\ | ||
| + | \\ | ||
| - | We will now set up the client wifi network, the configuration needed to connect to another wifi network.\\ Once you are connected again to the wifi extender, go in the wireless networks page, and click on **Scan** button. | ||
| - | {{docs: | ||
| ---- | ---- | ||
| - | {{docs: | + | /*** old LEDE17 image |
| + | {{:docs: | ||
| + | ***/ | ||
| + | |||
| + | * Recommend to tick the ' | ||
| + | | ||
| + | * The firewall zone should already be set to wan/wan6 (default). | ||
| + | |||
| + | \\ {{media: | ||
| + | |||
| + | |||
| + | * If there is no *wan* firewall zone you need to create it, don't save the Wi-Fi configuration. | ||
| + | * Enter the Wi-Fi password, leave the "name of new network" | ||
| + | | ||
| + | |||
| + | \\ | ||
| + | \\ | ||
| ---- | ---- | ||
| + | /*** lede17 image | ||
| + | {{: | ||
| + | ***/ | ||
| - | If you have no " | + | You will land in the client Wi-Fi settings page. Edit as required.\\ |
| + | The most important settings are on the **Operating Frequency** line.\\ | ||
| + | * Set the **Mode** to **Legacy** if you are connecting to a Wi-Fi g network, or **N** if you are connecting to a Wi-Fi n (and so on).\\ | ||
| + | * Set the **Width** to the same value that you set on the Wi-Fi you are connecting to (to avoid bottlenecking the connection for no reason). | ||
| + | * Do **NOT** change the wifi channel number ! | ||
| + | \\ | ||
| + | \\ | ||
| + | \\ {{media: | ||
| + | \\ | ||
| + | Press **Save** \\ | ||
| + | Press **Save & Apply**. \\ | ||
| + | Configuration is now complete. | ||
| + | \\ | ||
| + | \\ | ||
| - | {{: | + | This is the final result. Note how the client |
| + | The wwan IP address is only visible | ||
| - | After you have done this, go back and repeat the other steps to add and save the wifi connection. | + | \\ {{media: |
| + | |||
| + | |||
| + | \\ | ||
| + | \\ | ||
| + | \\ | ||
| ---- | ---- | ||
| - | {{docs: | + | \\ |
| - | ==== Setup with CLI ==== | + | :!: This step should not be necessary if you had reset the router to OpenWrt defaults. |
| + | * Click on Network and then on Firewall, then click on the Add button, and set up the new zone as you see in the following screenshot (which is a default wan firewall interface), | ||
| - | Before doing any actual configuration, | + | /*** lede17 image |
| + | {{: | ||
| + | ***/ | ||
| + | \\ {{media: | ||
| - | < | + | /*** |
| + | Note that in " | ||
| + | ***/ | ||
| + | |||
| + | After you have done this, go back and repeat the other steps to add and save the Wi-Fi connection. | ||
| + | |||
| + | |||
| + | |||
| + | ===== Command-line instructions ===== | ||
| + | Before doing any actual configuration, | ||
| + | |||
| + | < | ||
| + | uci set wireless.@wifi-device[0].disabled="0" | ||
| uci commit wireless | uci commit wireless | ||
| - | wifi</ | + | wifi |
| + | </ | ||
| - | :!: if you have more than one wifi radio in your device, then you can use the others in this tutorial instead by substituting their number. For example to enable the second | + | :!: if you have more than one Wi-Fi radio in your device, then you can use the others in this tutorial instead by substituting their number. For example to enable the second |
| * Set the disabled option to 0 (to enable wireless) | * Set the disabled option to 0 (to enable wireless) | ||
| Line 49: | Line 141: | ||
| * Start wireless using the //wifi// command | * Start wireless using the //wifi// command | ||
| - | Now we can list networks in range using '' | + | Now we can list networks in range substituting your actual wireless interface for '' |
| - | + | <code bash> | |
| - | '' | + | iw dev |
| + | iw dev wlan0 scan | ||
| + | </ | ||
| - | < | + | Example output: |
| + | < | ||
| + | # iw dev wlan0 scan | ||
| BSS c8: | BSS c8: | ||
| TSF: 24324848870 usec (0d, 06:45:24) | TSF: 24324848870 usec (0d, 06:45:24) | ||
| Line 99: | Line 195: | ||
| * Pairwise ciphers: TKIP CCMP | * Pairwise ciphers: TKIP CCMP | ||
| * Authentication suites: PSK | * Authentication suites: PSK | ||
| - | * Capabilities: | + | * Capabilities: |
| + | </ | ||
| - | In the example, there are two networks, a Wifi g one called Violetta and a Wifi n one called GOinternet_EB20FB. | + | In the example, there are two networks, a Wi-Fi g one called Violetta and a Wi-Fi n one called GOinternet_EB20FB. |
| The device was configured to connect to the one called Violetta. | The device was configured to connect to the one called Violetta. | ||
| These are the uci values that were added or changed by the configuration procedure.\\ | These are the uci values that were added or changed by the configuration procedure.\\ | ||
| - | For SSID, BSSID, and encryption you must use the info you got from the wifi scan above.\\ | + | For SSID, BSSID, and encryption you must use the info you got from the Wi-Fi scan above.\\ |
| For an explanation of why these values were changed, please read the luci tutorial above.\\ | For an explanation of why these values were changed, please read the luci tutorial above.\\ | ||
| - | < | + | < |
| + | network.lan.ipaddr=' | ||
| network.wwan=interface | network.wwan=interface | ||
| network.wwan.proto=' | network.wwan.proto=' | ||