Configuring Wi-Fi

User can choose the device with Wi-Fi version, which needs to be configured before using Wi-Fi function.

The Wi-Fi feature is enabled by default, with the WLAN country code preset to "CN China". Before connecting to a Wi-Fi network, you need to ​modify the WLAN country code​ to match your location's regulatory requirements.

Set WLAN Country Code

The default WLAN country code is set to "CN China"​. Please ​configure an appropriate WLAN country code​ before connecting to Wi-Fi.

Raspberry Pi OS (Desktop)

In the Desktop version of the operating system, you can use the desktop menu to set WLAN country code.

Steps:

  1. Left-click the icon Raspberry-pi in the top-left corner of the desktop and select "Preferences"→"Raspberry Pi Configuration" in the menu.
1
  1. In the ​Raspberry Pi Configuration​ interface, select ​​"Localisation"​.
2
  1. Click "Set WLAN Country...", Set the value of Country in the pop-up "Wireless LAN Country" pane, and select it to match your location's regulatory requirements.
3
  1. Select "OK" to complete the setting.

Raspberry Pi OS (Lite)

In the Lite version of the operating system, you can use the command line to set WLAN country code.

Setps:

  1. Open the command terminal pane and execute the following command to open the Raspberry Pi Software Configuration Tool (raspi-config)interface.
sudo raspi-config
  1. Choose "5 Localisation Options" and press "Enter".
image-20240603162911039
  1. Select "L4 WLAN Country" and press "Enter".
image-20240603162932051
  1. Select a country code to match your location's regulatory requirements and press "Enter".
image-20240603162948734
  1. Press "Enter" in Wireless LAN country set to CN interface.
image-20240603163011702
  1. In the main interface of the pane, select "Finish" and press Enter to complete the setting and return to the command line.

Use The NetworkManager Tool To Configure Wi-Fi Connections

The operating systems of Desktop and Lite have enabled NetworkManager by default, which can be directly configured by using NetworkManager.

Raspberry Pi OS (Desktop)

In the Desktop version of the operating system, you can connect to Wi-Fi through the desktop icon.

Preparation:

Wi-Fi function is enabled.

Steps:

  1. Left-click the image icon in the upper right corner of the desktop, select the Wi-Fi name and click it in the pop-up Wi-Fi list.
image-20241126164417054
  1. Input the Wi-Fi Password in the pop-up Wi-Fi Network Authentication Required pane.
image-20240603163301060
  1. Click "Connect" to connect to the network. After the connection is completed, you can click icon to view Wi-Fi information.

Raspberry Pi OS (Lite)

In the Lite version of the operating system, it is supported to configure Wi-Fi through the command line.

Preparation:

  • Wi-Fi function is enabled.
  • The Wi-Fi name and password that can be connected are prepared, for example, the Wi-Fi name is SSID and the password is password.

Steps:

  1. Open the terminal and execute the following command to scan the list of connectable Wi-Fi name.
sudo nmcli device wifi
image-20240603163357740
  1. Execute the following command to connect the Wi-Fi.
sudo nmcli device wifi connect SSID password password

Where SSID is the name of the Wi-Fi and the second password is the password of the Wi-Fi.

  1. Execute the following command to set up automatic Wi-Fi connection.
sudo nmcli connection modify SSID connection.autoconnect yes
  • Where SSID is the name of the Wi-Fi.

Configure Wi-Fi Connection By Using raspi-config Tool

In both Desktop and Lite versions of the operating system, you can connect to Wi-Fi through the raspi-config tool.

Preparation:

  • Wi-Fi function is enabled.
  • The Wi-Fi name and password that can be connected are prepared, for example, the Wi-Fi name is EDATEC-WH and the password is password.

Steps:

  1. Open the terminal and execute the following command to open the Raspberry Pi Software Configuration Tool (raspi-config) interface.
sudo raspi-config
image-20240603163513757
  1. Select "1 System Options" and press "Enter", and then select "S1 Wireless LAN" in the interface.
image-20240603163527458
  1. Press "Enter", then input the Wi-Fi name in the Please enter SSID interface.
image-20240603163542484
  1. Press "Enter", then input the Wi-Fi password in the Please enter passphrase. Leave it empty if none interface.
image-20240603163558203
  1. Press "Enter" to connect Wi-Fi. When the Wi-Fi is connected successfully, select "Finish" and press "Enter" to complete the setting and return to the command line window.