🛠 Se connecter au Wi-Fi (et comprendre les limites 2,4 GHz / WPA2)

Raspberry Pi Zero 2 W (2021) — Board Sheet · debutant · Schéma : IMG-zero-2w-debutant-2-connexion-wifi-24ghz.svg — Zero 2 W et sa routeur Wi-Fi, onde 2,4 GHz uniquement, cadenas WPA2, terminal affichant « iw wlan0 link ».

Objectives

Configure and diagnose the Wi-Fi connection on the Zero 2 W: the onboard radio combo (Cypress/Infineon class 43430 chip) is limited to 2.4 GHz 802.11n (35 Mb/s max) and WPA2 — no 5 GHz, no WPA3 (upstream bug open since 2021, raspberrypi/linux#4718). Knowing how to read link quality is the foundation of any reliable IoT project.

Hardware

Complete code

# Avec wpa_cli (Raspberry Pi OS Lite) :
sudo wpa_cli -i wlan0 scan
sudo wpa_cli -i wlan0 scan_results | grep -i "mon_reseau"
sudo wpa_cli -i wlan0 add_network
sudo wpa_cli -i wlan0 set_network 0 ssid '"mon_reseau"'
sudo wpa_cli -i wlan0 set_network 0 psk '"motdepassewifi"'
sudo wpa_cli -i wlan0 select_network 0

# Diagnostic du lien :
iw dev wlan0 link          # état + signal en dBm
iw dev wlan0 info          # canal, bitrate
ip -4 addr show wlan0      # adresse IP obtenue (DHCP ?)
ping -c 4 1.1.1.1          # connectivité hors DNS

Expected verification

iw dev wlan0 link displays Connected to with a signal: above -70 dBm is comfortable, below -85 dBm is marginal on 2.4 GHz. The ping to 1.1.1.1 succeeds. If the target network is WPA3, the scan sees it but the association fails indefinitely — this is the documented hardware limitation, not your password.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials