Cant reconnect to headless rpi due to changed wifi router

I had my rpi4 as headless configuration, connecting over ssh to it. It itself was connecting via wifi.

Recently I had to change my router, and so the wifi credentials it has are no longer valid.

Now Im a bit pulled how to reconnect to it. I tried ethernet, directly to the new router but I think ethernet gets overridden (as per dietpi.txt)?
# - If both Ethernet and WiFi are enabled, WiFi will take priority and Ethernet will be disabled.

What can I do?

Connect keyboard and monitor locally to check what happens. Usually ethernet should still working if not disable manually. Keep in mind, RPI will get a different IP address while connected via ethernet.

Next, was it not possible to adjust WiFi settings on the new router to fit old configuration. Quite unusual that you would need to accept default of this new device.

Unfortunately, I have no keyboard/monitor here. Besides, HDMI is disabled on it.

As for adjusting wifi settings, I briefly thought about that but there a few quite other devices and wanted to avoid annoying other people.

So you’re saying my approach with ethernet should work?

Can be enabled without issues on RPi

Depends on your current settings, which we don’t know.

Connect your RPi via ethernet and check your router if a new device is showing up.

I tried that before posting. FWIW, the two LEDs on the port were green and yellow

as an alternative you could create a mobile hotspot on a mobile phone with the old wifi configuration data. This way you could try to connect using a laptop or tablet or another wifi device

1 Like

Do you happen to know which config file thats in?

you can run dietpi-config and change it there.

It’s explained while selecting headless mode :wink:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ DietPi-Config β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                                                        β”‚
β”‚ Using the Headless option will:                                                        β”‚
β”‚  - Disable HDMI and composite output                                                   β”‚
β”‚  - Disable the framebuffer                                                             β”‚
β”‚  - Lower energy consumption by 0.1+ Watts                                              β”‚
β”‚  - Improve RAM performance by 1-5% (VideoCore shares RAM bandwidth)                    β”‚
β”‚    Source: https://www.raspberrypi.org/forums/viewtopic.php?p=105008#p105008           β”‚
β”‚                                                                                        β”‚
β”‚ Re-enabling HDMI requires a reboot. If you need emergency HDMI output, edit the        β”‚
β”‚ following files on first partition of the SDcard from external system:                 β”‚
β”‚  - In config.txt, set "hdmi_ignore_hotplug=0" and comment/remove the                   β”‚
β”‚ "max_framebuffers=0" line.                                                             β”‚
β”‚  - In dietpi.txt, set "AUTO_SETUP_HEADLESS=0".                                         β”‚
β”‚                                                                                        β”‚
β”‚                         <Ok>                             <Cancel>                      β”‚
β”‚                                                                                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

I was able to solve my issue by editing /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf on another computer.

In the former I adjusted the routers ip adress and gateway, in the latter I added the new credentials

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