2

Context: I'm trying to set up pihole as per these two tutorials. I'm using a Raspberry Pi Zero W.

I created an SSH file which I added to the sd card. I also created a wpa_supplicant.conf file as per the instructions here, which I then copied to the sd card. I then put it into the pi and hooked it up to power, which should've sufficed for it to connect to wifi. However, when running nmap -sn, the Pi is nowhere to be found (the devices that show up, which are probably two phones, my computer, and the router itself, refuse my attempts to ssh into them). Does this mean that the Pi is not connected to the network?

Due to presumably unrelated reasons, I'm not able to access my router via my browser. I can reset it to factory settings, which wouldn't be too annoying, but I'm concerned about the pre existing wpa_supplicant.conf file. Assuming I reset the router, create a new network, and make a new wpa_supplicant.conf file, will it overwrite the preexisting one? Moreover, is it possible to navigate to the .conf file through my laptop using a card reader? It would be nice to check whether I actually inputted the correct information. My attempts so far have proven futile.

For reference, I made my wpa_supplicant file cd ing into my Desktop, writing touch in my terminal, opening the file in TextEdit, and writing:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=AS

network={ ssid="<network_name>" psk="password" }

I then saved and dragged the file into my sd card.

Thanks in advance!

Ingo
  • 42,961
  • 20
  • 87
  • 207
Reveillark
  • 121
  • 1
  • 3

1 Answers1

1

It is difficult to understand with your description what may be the problem. I assume it is mainly due to the installation of pihole. I suggest to verify first your network environment by using a default Raspberry Pi OS (32-bit) Lite. Follow the official documentation to enable SSH (Secure Shell) and WiFi by Setting up a Raspberry Pi headless. This must work and you are able to correct your network environment.

A new wpa_supplicant.conf in the boot partition will overwrite the existing one on the next boot up.

If you have another SD Card available the you can use it to setup your pihole. If it doesn't work then you can boot the RasPi with the default SD Card and attach the pihole SD Card with a USB card reader to it. So you are able to access all partitions on it and modify its configuration files, like etc/wpa_supplicant/wpa_supplicant.conf or what you want.

You do not tell us what operating system do you use to create the wpa_supplicant.conf. If it is MS Window$ then it may be possible that the editor you are using does not store the file with the correct line endings. MS Window$ uses CR+LF (carriage return and line feed, two bytes), Unix uses only LF (one byte). To be on the save side you should ensure that wpa_supplicant.conf only uses LF.

Ingo
  • 42,961
  • 20
  • 87
  • 207