🛠 Routeur de voyage : installer OpenWrt sur la Zero 2 W

Raspberry Pi Zero 2 W (2021) — Board Sheet · avance · Schéma : IMG-zero-2w-avance-3-routeur-voyageur-openwrt.svg — Zero 2 W sous OpenWrt en point d'accès dans une chambre d'hôtel, laptop connecté en USB gadget, uplink Wi-Fi 2,4 GHz.

Objectives

Move away from Raspberry Pi OS: the Zero 2 W is officially supported by OpenWrt (64-bit target bcm27xx/bcm2710, device "rpi-zero-2") — the first 64-bit Zero in the range, which unlocks these aarch64 images. Goal: a travel router — the laptop connects via the USB gadget port, the Zero 2 W bridges to the hotel Wi-Fi, and traffic exits behind its own NAT/firewall.

Hardware

Complete code

# 1) Télécharger l'image bcm27xx/bcm2710 (profil rpi-3) pour OpenWrt 23.05.x,
#    puis flasher la SD :
sha256sum openwrt-23.05.5-bcm27xx-bcm2710-rpi-3-squashfs-sysupgrade.zip
unzip openwrt-*.zip
sudo dd if=openwrt-*.img of=/dev/sdX bs=4M status=progress conv=fsync

# 2) Premier boot : OpenWrt écoute en 192.168.1.1 sur eth0 (ici via g_ether,
#    config.txt/cmdline.txt déjà réglés comme au tuto ethernet-gadget) :
ssh root@192.168.1.1

# 3) Config minimale du mode client+AP (uci) :
uci set wireless.radio0.channel='auto'
uci commit wireless
# Interface WAN en client du réseau de l'hôtel (via l'interface Wi-Fi),
# LAN côté gadget USB — puis redémarrer le réseau :
/etc/init.d/network restart

# 4) Sur le laptop : navigateur vers 192.168.1.1 (LuCI) pour piloter le routeur.

Expected verification

"ubus call system board" indicates "model: Raspberry Pi Zero 2 W" and the aarch64 architecture. The laptop connected via USB obtains an IP in 192.168.1.x, "ping 1.1.1.1" exits via the hotel uplink, and LuCI displays the traffic. The benefit for travel: all devices behind the Zero 2 W share a single network identity and a firewall that YOU control.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials