Getting WPA supplicant to work from first boot

This forum is for discussion about general software issues.

Getting WPA supplicant to work from first boot

Postby nightswan120 » Mon Feb 27, 2023 1:53 am

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?
nightswan120
 
Posts: 2
Joined: Mon Feb 27, 2023 1:36 am

Re: Getting WPA supplicant to work from first boot

Postby lategoodbye » Tue Feb 28, 2023 6:48 am

This is hard to say based on this little information. At first you should provide a dmesg so we can see if the wifi firmware has been successfully loaded.
lategoodbye
 
Posts: 124
Joined: Sat Dec 29, 2018 1:24 am

Re: Getting WPA supplicant to work from first boot

Postby nightswan120 » Sat Mar 04, 2023 4:44 am

I can't print a dmesg because I don't have a mini HDMI cable, hence why I'm trying to do the headless install. Might just end up having to buy a mini HDMI or ethernet to mini USB
nightswan120
 
Posts: 2
Joined: Mon Feb 27, 2023 1:36 am


Return to General

Who is online

Users browsing this forum: No registered users and 11 guests