I'm attempting a headless install on my RPi Zero 2 W, but I'm having trouble connecting it to my Wi-Fi network. Here's what I tried:
I created and then set up /etc/wpa_supplicant/wpa_supplicant@wlan0.conf :
$this->bbcode_second_pass_code('', '
ctrl_interface=DIR=/var/run/wpa_supplicant
update_config=1
country = US
network={
ssid="wifi_network_name"
psk="wifi_password"
key_mgmt=WPA-PSK
}
')
Then, I created /usr/lib/systemd/system/wpa_supplicant@wlan0.service :
$this->bbcode_second_pass_code('', '
[Unit]
Description=WPA supplicant daemon (interface-specific version)
Requires=sys-subsystem-net-devices-wlan0.device
After=sys-subsystem-net-devices-wlan0.device
Before=network.target
Wants=network.target
[Service]
Type=simple
ExecStart=/usr/bin/wpa_supplicant -c /etc/wpa_supplicant@wlan0.conf -i wlan0 -D brcmfmac
[Install]
WantedBy=multi-user.target
')
Then to get WPA supplicant running at boot-up, I symlinked the service file to /etc/systemd/system/multi-user.target.wants, but my Pi isn't showing up on my network. Does anyone know what I might have done wrong?