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

[BUG]: PI 4 doesn't connect to wifi #901

Open
1 task done
thewh1teagle opened this issue Aug 4, 2024 · 11 comments
Open
1 task done

[BUG]: PI 4 doesn't connect to wifi #901

thewh1teagle opened this issue Aug 4, 2024 · 11 comments
Labels
bug Something isn't working

Comments

@thewh1teagle
Copy link

thewh1teagle commented Aug 4, 2024

What happened?

It may be an issue with Raspbian itself.
I just flashed raspbian lite 64 to RPI4, pre configured the wifi and boot.
It doesn't connect to the wifi.
I verified that the name & password are correct.
I'm not sure how to diagnose it to know better if it's an issue with rpi imager.

I can access the shell with keyboard & hdmi.

Update:
I re-flashed without configure the WIFI in rpi-imager.
Then I configured manually the WIFI through sudo raspi-config and it connected successfully. Something is invalid in rpi-imager.

Version

1.8.5 (Default)

What host operating system were you using?

Windows

Host OS Version

Windows

Selected OS

Bookworm 64

Which Raspberry Pi Device are you using?

Raspberry Pi 4B, 400, and Compute Modules 4, 4S

What kind of storage device are you using?

USB SSD

OS Customisation

  • Yes, I was using OS Customisation when the bug occurred.

Relevant log output

July 4th 2024

@thewh1teagle thewh1teagle added the bug Something isn't working label Aug 4, 2024
@archfrog
Copy link

archfrog commented Aug 8, 2024

I'm having the same problem, with Bookworm 64, but I'm am a Debian noob. So I switched to Ubuntu Server 24.04 and it works with the exact same OS customizations as was used for Debian.

This just to tell the developers that the problem probably lies with the Raspbian OS support as Ubuntu works as it should. If I try to use raspi-config to specify the already correct wireless SSID and key, I get some obscure error (on Bookworm).

@archfrog
Copy link

archfrog commented Aug 8, 2024

Just stumbled across this passage while checking out some RPi kiosk software:

"RPi OS bookworm dropped wpa_supplicant.conf support for configuring WiFi and moved to Network Manager."

Guess that explains why configuration of WIFI in RPI Imager no longer works on Bookworm.

@Vizzyy
Copy link

Vizzyy commented Aug 10, 2024

I'm pretty sure this is related... but I just wasted like 5 hours troubleshooting (countless reflashes of bookworm, bullseye, separate machines, sdcards, etc) being unable to SSH into a fresh RPI OS image (via rpi-imager, setting a default user, enabling ssh).

Headless SSH works the INITIAL boot, but then any following boot I am not able to SSH until I first sign into the pi locally (via monitor and keyboard), and then I am able to headless ssh from another machine. Clearly there is something going on with Network Manager that does not initialize the connectivity unless the user is already logged in.

I was able to fix this by leveraging the nmtui CLI-GUI tool to edit my preconfigured connection setup through rpi-imager. There is a checkmark for Available to all users that needs to be enabled. For me this was already enabled by rpi-imager, and so I had to disable it and then reenable it and now I am finally able to ssh headlessly every boot.

My money is on rpi-imager doing something wonky with this preconfigured connection setup during the flashing.

@XECDesign
Copy link

Guess that explains why configuration of WIFI in RPI Imager no longer works on Bookworm.

Nope, it should still work.

Output of sudo journalctl from the non-working system would help figure out what's going on.

For me this was already enabled by rpi-imager, and so I had to disable it and then reenable it and now I am finally able to ssh headlessly every boot.

Has the content of /etc/NetworkManager/system-connections/preconfigured.nmconnection changed after you've made that change?

@remohoeppli
Copy link

I see the same issue.

Here's an output of the journalctl.
image

My /etc/NetworkManager/system-connections/preconfigured.nmconnection does contain a configuration.

I tried the latest Debian Bookworm 64-Bit Lite and Full version. I hope this helps.

@XECDesign
Copy link

Thank you. Another potentially useful data point. Was it working in the 2023-10-10 image and then broken in the 2023-12-05 image?

@GierAffe
Copy link

After writing the image to a micro sd card (or usb etc), a firstrun.sh file should have been created on the boot partition. There is a line:

if [ -f /usr/lib/raspberrypi-sys-mods/imager_custom ]; then
   /usr/lib/raspberrypi-sys-mods/imager_custom set_wlan '[my ssid]' '[my psk]' '[my country code]'

can you check if the psk is correct?
In a linux shell, the command wpa_passphrase [ssid] [passphrase] will generate your psk. Do you get the same hash? If not, does it work if you replace the psk in the firstrun.hs file with the one you generated by hand?

You can also check if the file /etc/NetworkManager/system-connections/preconfigured.nmconnection has been generated (which it should).

@ryepup
Copy link

ryepup commented Aug 17, 2024

just ran into this using 2024-07-04-raspios-bookworm-arm64-lite.img.xz, rpi-imager v1.7.2, and a PI 5. I'm using Ubuntu 22.04 LTS, and have installed rpi-imager via apt install.

I did not have a /etc/NetworkManager/system-connections/preconfigured.nmconnection file, and used raspi-config to get connected.

I think my problem is that Ubuntu 22.04 LTS package repositories are delivering a really old version of rpi-imager. My firstuse.sh did not have anything about raspberrypi-sys-mods.

@manjushsh
Copy link

+1 for rpi 5

@tdewey-rpi
Copy link
Collaborator

just ran into this using 2024-07-04-raspios-bookworm-arm64-lite.img.xz, rpi-imager v1.7.2, and a PI 5. I'm using Ubuntu 22.04 LTS, and have installed rpi-imager via apt install.

I did not have a /etc/NetworkManager/system-connections/preconfigured.nmconnection file, and used raspi-config to get connected.

I think my problem is that Ubuntu 22.04 LTS package repositories are delivering a really old version of rpi-imager. My firstuse.sh did not have anything about raspberrypi-sys-mods.

As a general point, I strongly recommend that users do not use apt install on platforms other than Raspberry Pi OS.

v1.7.2 was released before Raspberry Pi 5, and before the Bookworm release - so it's perfectly expected that it would fail to configure for new hardware and new software.

--

Are any of these failing PSKs using non-ASCII characters?

@archfrog
Copy link

As a general point, I strongly recommend that users do not use apt install on platforms other than Raspberry Pi OS.

You mean apt install rpi-imager, not apt install in general, right?

Are any of these failing PSKs using non-ASCII characters?

Not here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants