Desperate for Help: Raspberry Pi 4 WiFi Issues with OctoPi – 2 Days of Extensive Troubleshooting

What is the problem?

My Raspberry Pi 4 running OctoPrint is unable to establish a WiFi connection. Despite recognizing the WiFi network and seemingly attempting to connect, it fails to obtain an IP address or establish a stable connection.

What did you already try to solve it?

  • Edited wpa_supplicant.conf with correct WiFi details, both in plain text and hashed PSK format.
  • Ensured correct SSID and password, including their case sensitivity.
  • Added key_mgmt=WPA-PSK to the WiFi configuration.
  • Reconfigured /etc/network/interfaces for manual network management.
  • Rebooted the Raspberry Pi after each configuration change.
  • Checked router settings for MAC address filtering or similar restrictions.
  • Verified the country code in wpa_supplicant.conf.
  • Attempted to connect to different WiFi networks for testing.
  • Checked for potential conflicts with dhcpcd and /etc/network/interfaces.
  • Consulted online forums and guides for additional troubleshooting tips.

I've also started over multiple times re-deploying the image via the raspberry imaging tool. I'm on the verge of sending the raspberry pi back. I literally give up with this issue. posting on here is my last attempt.

Have you tried running in safe mode?

I have not yet tried running OctoPrint in safe mode. Given that the issue seems to be with the basic WiFi connection of the Raspberry Pi and not specifically with OctoPrint’s functionality, I wasn't sure if safe mode would be relevant. However, I am open to trying this if it could provide further insights.

Did running in safe mode solve the problem?

As mentioned, I haven't tried this yet, but I am willing to give it a go based on recommendations.

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog... no bundle, no support, unless the reason you couldn't retrieve the bundle is your network issues (24.7 KB)

Additional information about your setup


Sep 22 01:24:29 octopi dhcpcd[503]: wlan0: starting wpa_supplicant
Sep 22 01:24:29 octopi dhcpcd-run-hooks[536]: wlan0: starting wpa_supplicant
Sep 22 01:24:29 octopi dhcpcd[425]: wlan0: connected to Access Point ' Sep 22 01:24:29 octopi dhcpcd[425]: wlan0: waiting for carrier Nov 25 21:42:04 octopi dhcpcd[792]: wlan0: removing interface Nov 25 21:42:10 octopi dhcpcd[543]: wlan0: starting wpa_supplicant Nov 25 21:42:10 octopi dhcpcd-run-hooks[557]: wlan0: starting wpa_supplicant Nov 25 21:42:11 octopi dhcpcd[432]: wlan0: connected to Access Point '
Nov 25 21:42:11 octopi dhcpcd[432]: wlan0: waiting for carrier
Nov 25 21:56:29 octopi dhcpcd[876]: wlan0: removing interface
Nov 25 21:56:29 octopi dhcpcd[1283]: wlan0: starting wpa_supplicant
Nov 25 21:56:29 octopi dhcpcd-run-hooks[1290]: wlan0: starting wpa_supplicant
Nov 25 21:56:30 octopi dhcpcd[1280]: wlan0: connected to Access Point `'
Nov 25 21:56:30 octopi dhcpcd[1280]: wlan0: waiting for carrier

I'm done.. I don't know why this refuses to connect

Update: Friend of mine suggested I try and connect it to hotspot of my mobile phone and it connected. So not sure what's going on .. Maybe it doesn't support 5Ghz

Well well.. I'm connected to WIFI but only over 2.4Ghz.. To be honest, a WIFI connection is a connection nevertheless.. I didn't have to avoid using special characters etc in the p/w nothing. So the problem was I was trying to connect to 5Ghz.. Not sure why it wouldn't connect to 5Ghz as if you scan for SSID's etc it shows networks that are 5Ghz.. So not sure.. If anyone could share some insight into what prevents connection to 5Ghz that would be appreciated.


Not sure if I have any insight (yet, I'll try it when I get a chance*) but I use 2.4Ghz on my RPi 4 and don't notice any performance issues. OctoPrint web interface is snappy, camera stream is smooth, SSH sessions send data faster than I can read it and only very large file transfers are a bit slower than they would be at 5GHz.

* Since WiFi is currently my only connection to my RPi 4B, I'll have to find an HDMI cable with the funky connector or move to wired before I can perform any WiFi experiments.

Thanks for the response. To be fair, I think 2.4Ghz will be good enough. Besides it's not an option as I can't connect to 5.

Just noticed though when I connect the raspberry PI 4 to the printer the screen LCD of the printer comes on and it looks a little washed out ? #

Correction, It's only washed out because the printer isn't on.. The LCD Screen is being powered on by simply connecting the printer to the RP4 ?

When powered on the LCD displays appears normal and not washed out. Anyway is the way a way round this to circumvent the LCD remaining on ? Bit of a strange one ...

Using some of the code from and replacing most of the switchwifi code with I can switch my WiFi connection (on the fly) from an SSH session connected via WiFi!

So, to answer your original question... Still no insight as to why yours doesn't work because mine works on both 2.4Ghz and 5GHz. Note: My WiFi router is configured as an Access Point and my DHCP server is on my IPFire firewall. Not sure if that makes any difference.

You haven't mentioned what printer you have but search this forum for "backpowering" and you find numerous topics with solutions.

1 Like

Sorry I'm using an Ender 3 Neo..

The Pi is pushing 5v to the printer. You can stop that by putting tape on the proper pin on the USB cable (please Google that). Or you can modify the cable to remove the 5v wire (cut it). I don't think it will harm anything, but it's probably not a good idea to have that 5v back feeding to your printer. I have mine taped.

I can't not get mine to connect either and I am trying to connect to a 2.4ghz wifi. I've fought with this for hours as well following many of the steps as the OP. I can still not connect. This seems to be something with the implementation of the Octoprint OS. Native Rasbian, FPP, and other OS packages don't have this issue. I have 3 other pi's that took 2 sec's to get connected. Wifi on this is just not a option until someone can fix this.

Connected to Lan cable i get a quality of 50/70 on the wifi ssid in ssh that I am trying to connenct to. On reboots I also get a phantom wifi IP address. Which seems to indicate that maybe it's trying to broadcast it's own SSID.

Any advice on how you got it to connect would be great.

There is no "Octoprint OS". There are two OctoPi images which are Raspberry Pi OS Lite (Bullseye) with OctoPrint and some camera applications already installed.

If you use the Raspberry Pi Imager (latest is 1.8.4), then you can set the WiFi credentials, country code, and other stuff before you write the image.

Please provide us with details on what images you have tried with failure and what images you have tried with success.

If you google "raspberry pi wifi troubleshooting" there will be numerous topics that will help including commands to use to gather data. If you still need our help, then please provide us with the troubleshooting links you used and the output from the commands in that link.

If using an OctoPi image still doesn't work, then install an image that does work and you can use the octoprint_deploy script to install OctoPrint on that image.

So could an incorrect country code produce the failure to connect on 5g?

It seems like it may.

I agree that an incorrect country code might produce a failure to connect. See for more information (but not a definitive answer).