As written I am unable to connect my RPI to the internet.
What happened is I took the RPI from the office (where it was working) and took it home (to a new wifi).
To save myself the headache, before I left the office I ssh'ed into the rpi and edited the wpa_supplicant.conf file. Once I got home I was unable to ssh and ping. This is what I have done to remedy the situation.
To attempt connection, I have:

  1. taken out the SD card and connected it to my computer, and edited the wpa_supplicant.conf file. The contents are:
crt_interface=DIR=/var/run/wpa_supplicant GROUP=netdev


Let the host name of this RPI be: pi.
I have tried to ping, i.e. ping pi.local which returns ping: cannot resolve pi.local: Unknown host.

Another way I have tried to get the IP address of the rpi is to do:
sudo nmap -sn
This command also does not list the rpi as a connected device.
What have I done wrong?

Another thing I have tried is to connect the rpi to a monitor to use the GUI.
Yes, I have edited the config.txt file and uncommented hdmi_force_hotplug=1 and hdmi_drive=2
A problem with this method is that the monitor goes blank once the boot is mounted.

Any ideas on what I can do?
I would prefer to not have to flash a new image..

Is this helps, I see that I have an issue.txt file which contains:

Raspberry Pi reference 2022-09-22
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, stage2

Should I edit the cmdline.txt file?

  • Remove scan_ssid=1 and key_mgmt=WPA-PSK they are optional parms and WiFi won't work if they're wrong.
    – Dougie
    Oct 16, 2022 at 18:09
  • What Pi? What OS? How did you edit wpa_suppliccant? What does ip a and ip l show?
    – Milliways
    Oct 16, 2022 at 21:58

1 Answer 1


The 1st line should be
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

The permissions MUST be -rw------- 1 root root

NOTE You can have multiple network sections for home & work (I have 9)
See How to set up networking/WiFi

  • Hey @Milliways, thank you for the response! I will try your suggested solution out in a few hours. However, I am unsure what you mean by: "The permissions MUST be -rw------- 1 root root" What do you mean by that - can you please expand? Oct 18, 2022 at 15:23
  • @NicholasFrańczak I asked for clarification in a Comment which you have not supplied. It is difficult to see how you modified the file if you don't understand Linux permissions.
    – Milliways
    Oct 19, 2022 at 2:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.