How to make permanent WiFi connection on RPi3 and recent Manjaro minimal?

Hello everybody!

I was able to connect my RPi 3B to wi-fi, but after reboot the connection is not restored. Does anybody know how to fix that?

What was tried:
1. ARM Manjaro Minimal 19.06 for RPi3B
Was able to connect, reconnect after reboot, but wasn't able to update even with instructions from here, thus dropped this version.
1.1. Option, which allowed to connect, but didn't keep connection after reboot:
wifi-menu as suggested here. However, it returned the failed connection.
First, needed to disable the wi-fi via sudo ip link set dev wlan0 down, then connect to network with wifi-menu
1.2. Option, which allowed to connect and keep connection after reconnect:
As suggested here and here

sudo -i 
wpa_passphrase SSID PASS > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf

Than, create file /etc/systemd/network/00-wireless.network with content:

[Match]
Name=wlan0
[Network]
DHCP=yes

After that, run:

rm /etc/resolv.conf
systemctl enable systemd-networkd
systemctl enable wpa_supplicant@wlan0.conf
systemctl enable systemd-resolved
systemctl start systemd-networkd
systemctl start systemd-resolved
ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
systemctl start wpa_supplicant@wlan0.conf
reboot

And it worked fine up to the moment, when I needed to upgrade the system, since all mirror returned 404 error. Instructions from here didn't work - results in pacman-mirrors error. On some other forum met the statement, that update is impossible, since pacman-mirrors is far too old.

2) ARM Manjaro Minimal 19.12 for RPi4
Tried just for fun on RPi 3B. Surprisingly, it started, but has no wifi-menu.
I repeated all actions as for previous version, but it gets problem at systemctl start wpa_supplicant@wlan0.conf. It doesn't want to connect to WiFi. The systemctl status wpa_supplicant@wlan0.conf demonstrates the dependency problem, but doesn't says what exctly.
I assumed it is a qproblem with the driver and was able to connect to wi-fi via sudo wpa_supplicant -B -Dnl80211 -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant-wlan0.conf. Then, it connects to wi-fi, but doesn't reconnect after reboot.
Attempted to update:

  • connected RPi to the local Wi-Fi network
  • downloaded the most recent pacman-mirrorlist to laptop
  • connected to it via WinSCP and transferred fresh pacman-mirrorlistand installed it with sudo pacman -U ./pacman-mirrorlist*.tar.xzand sudo pacman-mirrors -g
  • after several trials (404 errors) I was able to run sudo pacman -Syyuu

Extra update via sudo pacman -Syu linux-rpi4-mainlinedidn't help too. Need manually run sudo wpa_supplicant -B -Dnl80211 -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant-wlan0.conf after each reboot.

Also, another issue: right after I connect to Wi-Fi with wpa_supplicant, it can't find any mirror if I run sudo pacman -Syyuu. Returns the error error: failed retrieving file '*.db' from _somehost_ : Couldn't resolve host: _somehost_.
The error disappears if I ping any site : ping -c 10 www.google.com.

Is there a way to make this reconnect permanent and fix these issues?

P.S. Is there a plan to make a Manjaro ARM minimal 20.xx images for RPi for standalone download?

Solution:
Just build the image with networkmanager package. Can be found here

If can't include, first connect to internet with Ethernet and sudo pacman -S networkmanager and unplug the Ethernet.
Then:

sudo systemcctl enable NetworkManager
sudo systemcctl start NetworkManager
sudo nmcli radio wifi on     # turn on wifi
nmcli device wifi list  # list all available networks
sudo nmcli device wifi connect <SSID|BSSID> password <password>

It automatically reconnects after reboot before user logon.

P.S. Is there a way to ask developers make networkmanager as part of stock image in minimal edition?

No.
The minimal edition is suppose to be a minimal system to get the device booting. NetworkManager would add several hundred MB's of dependencies.
Users are free to install it themselves if they need functionality from it.

1 Like

OK, understood.

Then, probably off-topic, but is there a way to use buildarmimg in more automated way, rather than manual downloading of each extra package for later use with -i key during building?

I mean, use something like

buildarmimg -d rpi3 -e minimal -v 20.02.1 -i wget,networkmanager

and let it automatically download fresh versions, rather than:

mkdir ./extra_packages
cd ./extra_packages
wget http://ftp.osuosl.org/pub/manjaro-arm/repo/stable/extra/aarch64/networkmanager-1.22.8-1-aarch64.pkg.tar.xz
wget http://ftp.osuosl.org/pub/manjaro-arm/repo/stable/extra/aarch64/wget-1.20.3-2-aarch64.pkg.tar.xz
cd ..
sudo buildarmimg -d rpi3 -e minimal -v 20.02.1 -i ./extra_packages/*

Yes. Edit the local profile you are using.
Should be at /usr/share/manjaro-arm-tools/lib/profiles/arm-profiles/.
There you can add the package in the list and the tools will install it when you run the command for that edition.

This topic was automatically closed after 90 days. New replies are no longer allowed.

Forum kindly sponsored by