Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set Wireless LAN (raspi-config - Pi4B) #1970

Open
Godrigos opened this issue Sep 8, 2024 · 8 comments
Open

Can't set Wireless LAN (raspi-config - Pi4B) #1970

Godrigos opened this issue Sep 8, 2024 · 8 comments

Comments

@Godrigos
Copy link

Godrigos commented Sep 8, 2024

I tried in two fresh installs and after activation, basic configuration and enabling SSH, when I use raspi-config to set my wifi I get the following error:

Traceback (most recent call last): File "/usr/sbin/netplan", line 23, in <module> netplan.main() File "/usr/share/netplan/netplan/cli/core.py", line 50, in main self.run_command() File "/usr/share/netplan/netplan/cli/utils.py", line 241, in run_command self.func() File "/usr/share/netplan/netplan/cli/commands/set.py", line 50, in run self.run_command() File "/usr/share/netplan/netplan/cli/utils.py", line 241, in run_command self.func() File "/usr/share/netplan/netplan/cli/commands/set.py", line 72, in command_set libnetplan.create_yaml_patch(yaml_path, value, tmp) File "/usr/share/netplan/netplan/libnetplan.py", line 501, in create_yaml_patch _checked_lib_call(lib.netplan_util_create_yaml_patch, File "/usr/share/netplan/netplan/libnetplan.py", line 79, in _checked_lib_call raise LibNetplanException(err.contents.message.decode('utf-8')) netplan.libnetplan.LibNetplanException: Error parsing YAML: did not find expected ',' or '}'

And no wifi connection.

System data:
NextcloudPi v1.55.0
Raspberry Pi 4B 8 gb
Linux nextcloudpi 6.6.45-current-bcm2711 #2 SMP PREEMPT Fri Aug 16 20:53:33 UTC 2024 aarch64 GNU/Linux

@Peppeeeerrrr
Copy link

Peppeeeerrrr commented Sep 18, 2024

Hi, I had the same problem here with an RP4B too. I installed the older version of ncp v1.54.0 as the wifi seemed to work back then. The configuration through raspi-config didn't work out neither but I managed to activate the wifi installing and running armbian-config. I guess doing the same thing on the latest version of ncp should work too, it seemed to me a good way to get around the issue.

@Godrigos
Copy link
Author

Thanks for the tip. Will try it later.

@theCalcaholic
Copy link
Collaborator

@Peppeeeerrrr Thank you, seems like a good workaround.

The issue itself is very likely an upstream issue with Armbian for the RPi.

@Godrigos If you are able to confirm that the workaround works for you, we can close this issue (and I'll ask the Wiki team to add it to the NCP wiki).

@Godrigos
Copy link
Author

Unfortunatly, even if I can install the armbian-config, it does not present options for wifi configurations, there is a warning that missing drivers may limit the configuration options.

@Godrigos
Copy link
Author

Godrigos commented Sep 21, 2024

I solved my issue with an ugly long cable, lol. But no wifi.
Thanks for the attention guys.

@3kimm0
Copy link

3kimm0 commented Oct 3, 2024

Sad. I need wifi acces too. I dont want use cable, coz this pi4 is hiddne uder bed :D
Solved. Install network-manager and Wifi is enabled, so I can connect nextcloudpi to WiFi :) Hope it help someone else

@andrei7c4
Copy link

Sad. I need wifi acces too. I dont want use cable, coz this pi4 is hiddne uder bed :D Solved. Install network-manager and Wifi is enabled, so I can connect nextcloudpi to WiFi :) Hope it help someone else

You probably now have NTP broken. See this question: https://unix.stackexchange.com/questions/788787/unable-to-get-ntp-systemd-timesyncd-working-over-wifi

@marco-aa
Copy link

marco-aa commented Jan 17, 2025

Hello all, Hello @3kimm0

my workaround for Raspi 4B (maybe Pi 5 #2016 ) WLAN setup on

"NextcloudPi v1.55.3 is up to date"
"v24.11.1 for Raspberry Pi 4 running Armbian Linux 6.6.63-current-bcm2711"

Check with iwconfig and/or networkctl if wlan0 module is loaded / installed

sudo iwconfig
lo no wireless extensions.
end0 no wireless extensions.
wlan0 IEEE 802.11 [...]

sudo networkctl
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 end0 ether routable configured
3 wlan0 wlan [...]

if it's not listed/ installed

sudo apt install  firmware-brcm80211
sudo reboot

and check again, if successfull

add netplan config
sudo nano /etc/netplan/10-netplan-wlan0.yaml
take care about yaml spacing/format

# Added by Armbian
#
# Reference: https://netplan.readthedocs.io/en/stable/netplan-yaml/
#
# Let systemd-networkd manage all Ethernet devices on this system, but be configured by Netplan.

network:
  version: 2
  renderer: networkd
  wifis:
    wlan0:
      dhcp4: true
      dhcp6: false
      access-points:
        "YourWLAN-SSID-Name":
          auth:
            key-management: "psk"
            password: "YourStrongSecretPW"

sudo chown root:root /etc/netplan/10-netplan-wlan0.yaml
sudo chmod 600 /etc/netplan/10-netplan-wlan0.yaml

check your new config
sudo netplan try
if ok
sudo netplan apply

should look like this
sudo networkctl
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 end0 ether routable configured
3 wlan0 wlan routable configured

check ip adress / dhcp

ip a

Based on the default metric 600 for wlan0 your lan access is preferred.
Disconnect lan cable or take down lan to check/use wlan0 - take care open session will be uselesse/closed
sudo networkctl down end0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants