How to connect to Pi Zero W

I've flashed a Pi Zero W with 21.02. How can I connect to configure it? I know I can build a custom image with drivers for usb-ethernet, how can I also enable WiFi for the LAN interface? (anything I can paste under " Custom script to run on first boot" on the imagebuilder?)

Ultimately, this device will connect to 4G/5G over USB (via Android phone), and use built-in WiFi for LAN.

keyboard + monitor + ability to do some basic config editing files in /etc/config

Create a file called 99_wifi_on
in /extracted_imagebuilder_folder/files/etc/uci-defaults
with this contents

uci set wireless.@wifi-device[0].disabled="0"
uci set wireless.@wifi-iface[0].disabled="0"
uci commit wireless

and then add FILES="files" in your ImageBuilder command

This should add a file that on first boot enables wifi. You should see a OpenWrt wifi network with no password when it's fully powered up.

See this for a more rich file about enabling wifi on first boot

See this for including files in Image Builder images

Thanks for the tips. In case anyone else have the same problem, this is what I did:

  • Go to
  • Build an image for Pi Zero, add these packages to the ones already listed:
  • kmod-usb-net kmod-mii kmod-usb-core kmod-nls-base kmod-usb-net-cdc-ether kmod-usb-net-rndis

Connect a monitor/keyboard, enter commands:

  • uci set wireless.radio0.disabled=0
  • uci show wireless (to see changes)
  • uci commit
  • reboot

Then WiFi is enabled in the LAN zone, with no password.

Edit: Building image with extra packages is so you can use USB tethering for WAN, it's not possible to download those packages before you have a WAN connection.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.