[solved] RPI 4 headless + wifi

This is for ARMv8 based devices

[solved] RPI 4 headless + wifi

Postby MochaBrowser » Wed Mar 01, 2023 11:02 pm

Hi !

Trying to get a 4Gb RPi 4 set up with aarch64 headless with WiFi only.

Is netctl still the default tool for WiFi in alarm ? I've read that in this blog, but not sure if it's still accurate since I see $this->bbcode_second_pass_code('', '/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service')
Should I follow the advice from the blog, or set up systemd-networkd instead ?

Thanks !
Last edited by MochaBrowser on Thu Mar 02, 2023 4:28 pm, edited 3 times in total.
MochaBrowser
 
Posts: 7
Joined: Wed Mar 01, 2023 10:35 pm

Re: RPI 4 headless + wifi

Postby graysky » Thu Mar 02, 2023 8:31 am

I just setup the wireless systemd-netcontig profile and wpa_supplicant. Enable both services and they pull in whatever they want.

https://wiki.archlinux.org/title/Systemd-networkd
https://wiki.archlinux.org/title/Wpa_supplicant
graysky
Developer
 
Posts: 1870
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: RPI 4 headless + wifi

Postby MochaBrowser » Thu Mar 02, 2023 1:43 pm

Thanks !
$this->bbcode_second_pass_quote('', '
')systemd-netcontig

I suppose you mean systemd-networkd ?

[edit]
systemd-networkd is already properly enabled by default, the symlinks already exist.
Last edited by MochaBrowser on Thu Mar 02, 2023 2:35 pm, edited 1 time in total.
MochaBrowser
 
Posts: 7
Joined: Wed Mar 01, 2023 10:35 pm

Re: RPI 4 headless + wifi

Postby MochaBrowser » Thu Mar 02, 2023 2:15 pm

For wpa_supplicant :
https://wiki.archlinux.org/title/Wpa_supplicant#At_boot_(systemd)

Is there anyway to install iwd to the sd-card, to use instead of wpa_supplicant ?

Thanks !

[edit]
found https://wiki.archlinux.org/title/QEMU#Chrooting_into_arm/arm64_environment_from_x86_64 but not worth the trouble I guess
MochaBrowser
 
Posts: 7
Joined: Wed Mar 01, 2023 10:35 pm

Re: RPI 4 headless + wifi

Postby MochaBrowser » Thu Mar 02, 2023 3:39 pm

According to this, manually creating symlinks might not work.

How did you enable the wpa-supplicant service ?

[edit]
For reference, went the symlink route, seems to work.

Thanks !
MochaBrowser
 
Posts: 7
Joined: Wed Mar 01, 2023 10:35 pm

Re: RPI 4 headless + wifi

Postby karog » Thu Mar 02, 2023 5:13 pm

$this->bbcode_second_pass_quote('MochaBrowser', 'H')ow did you enable the wpa-supplicant service ?


For my headless RPi zero w all I did was
$this->bbcode_second_pass_quote('', '
')wpa_passphrase "${SSID}" "${PASS}" > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
systemctl enable wpa_supplicant@wlan0
karog
 
Posts: 304
Joined: Thu Jan 05, 2012 7:55 pm
Top

Re: [solved] RPI 4 headless + wifi

Postby MochaBrowser » Thu Mar 02, 2023 5:30 pm

How did you run systemctl , without being already booted ?

The goal is to set up WiFi before even booting the Pi. I did the following (will write in the How-to section later)

-------------------------------------------------------------------------

Edit systemd-networkd-wait-online.service to not wait for ethernet :

$this->bbcode_second_pass_code('', '
# mkdir root/etc/systemd/system/systemd-networkd-wait-online.service.d
# nano root/etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf

[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any
')

Set up WiFi :
$this->bbcode_second_pass_code('', '
# wpa_passphrase <SSID> <pwd> > root/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
')

Optionally add `country=XX` to `wpa_supplicant-wlan0.conf`

Enable `wpa_supplicant` :
$this->bbcode_second_pass_code('', '
# ln -s /usr/lib/systemd/system/wpa_supplicant@.service root/etc/systemd/system/multi-user.target.wants/wpa_supplicant@wlan0.service
')

Configure `systemd-networkd`

$this->bbcode_second_pass_code('', '
# nano root/etc/systemd/network/wl.network

[Match]
Name=wl*

[Network]
DHCP=yes
')
------------------------------------------------------------------------

except that right now, I have the problems described here, so might need adapting :
MochaBrowser
 
Posts: 7
Joined: Wed Mar 01, 2023 10:35 pm


Return to ARMv8 Devices

Who is online

Users browsing this forum: No registered users and 3 guests