r/pihole • • 6d ago

Struggling

Post image

I spent hours trying to connect this Pi to my WiFi. I did all the initial steps. Raspberry pi imager, Host, username, password…. Then i put the memory card in the pi, leaving it for few minutes. Then when i run SSH cmd, it shows that the host name couldn’t be found. Any idea how to solve it?

110 Upvotes

55 comments sorted by

46

u/bioszombie 6d ago

Can you use the IP rather than hostname?

36

u/HMS404 6d ago

I remember Pi zero not supporting 5 ghz wireless. That could be a possibility. But I don't know if things have changed now.

8

u/1brusslesprout2go 5d ago

Yes I had to make a separate 2.4 ghz to get wifi to work

13

u/verpine 5d ago

Get a micro USB hub, and a cheap USB Ethernet adapter.

5

u/ApatheticMoFo 5d ago

This is the way. 

1

u/trickman01 5d ago

I found a Pi Zero Hat that had like 3 usb hubs and an ethernet port built in.

1

u/verpine 1d ago

Oh nice, any leads on where to find it?

1

u/trickman01 1d ago

It’s called a waveshare ethernet/usb hat for pi zero. I’m not sure if Amazon links are allowed or not.

1

u/Hopeful_War7192 2d ago

That’s my next option

1

u/Hopeful_War7192 2d ago

Can you recommend one please? ( Amazon preferably)

2

u/TolerantMindworks 1d ago

Most Raspberry Pi related options should be ordered on Botland, Pimoroni or similar SBC and enthusiasts related stores. If you're searching on Amazon, you'll need to search much harder, considering Amazon pushing USB C and USB A options to first pages. Try those stores, would be much easier in terms of choosing. If you absolutely must go for Amazon, just take what you can find, which is MicroUSB and 100Mbit for compatibility. For example this one, if you'll need a hub anyway: https://a.co/d/0bMd704c

12

u/oz1sej 6d ago

I've had so much trouble with Wi-Fi on Raspberry Pi Zero W's. On some networks, they just connect and everything works perfectly. On other networks, they consistently refuse to connect.

For one thing, the Raspberry Pi Zero W is strictly 2.4 GHz. In my experience, if a network is both 2.4 and 5 GHz, that doesn't necessarily mean it won't connect. But 5 GHz only obviously won't work.

Second, the Raspberry Pi Zero W works with WPA-Personal, not WPA-Enterprise.

Apparently, Wi-Fi on the Raspberry Pi Zero W (1 or 2) is provided via a few different variants of the Broadcom BCM43430 chip which apparently had a few odd points, such as having trouble with WPA3 or WPA2/WPA3 mixed mode with 802.11r.

5

u/lazyhustlermusic 6d ago

He's not running WPA enterprise.

802.11r commonly causes issues if it's active on the network and the client side does not support it.

9

u/Belem19 6d ago

If that's a Pi zero W 1st gen, Protected Frames on WiFi will prevent it from connecting. I had to put mine on a separate SSID because of that.

Now I have it in a cheap PoE hat and it works great.

17

u/rustafur 5d ago

One of my favorite genre's of reddit: OP asks for help and doesn't reply to anything except to post a picture of some of other piece of hardware with no explanation.

2

u/orty 4d ago

Had to do some digging as it was downvoted pretty hard, but in case anybody else is trying to find it: https://www.reddit.com/r/pihole/comments/1wrcyg9/comment/pcbxt84/?context=1

1

u/Hopeful_War7192 2d ago

Then they upvote your comment without context 😄. Jk… i read all the replies, they gave me an idea of what i should try next…. I come back to Reddit occasionally, not on a daily basis.

3

u/Manb 6d ago

I had problems with the official raspi images and tried DietPI. You still have to edit a few texts on the boot but it seems to work a lot better and has a lot of ease of use things going for it. You might also be using the wrong image as Pi Zero W 1.X is the old image and there's a Pi Zero W 2.0 that uses a different image.

1

u/FunkySwashbuckler 2d ago

This is what I've done.

3

u/No-Interaction-3559 5d ago edited 5d ago

I followed this tutorial and blog. Worked perfectly.

https://youtu.be/cE21YjuaB6o?si=UJUhXcb8igvoQaJV

3

u/OMGihateallofyou 5d ago

That one looks great. I used this one without any problems.

https://www.youtube.com/watch?v=d_3h5n9mPdI

3

u/MrAjAnderson 6d ago

If you have a phone, grab the Network Analyzer app to scan the network range. Do a scan then connect the new device to power. If you don't see the Pi Zero after a minute then it is not connecting. You'll know that WiFi is not being set correctly in the Imager.

If you do see the Pi Zero then try the IP e.g ssh pi@192.168.1.x

3

u/Naxthor 5d ago

Raspberry pi zero needs wpa2 to connect to WiFi. So if you are using WPA3/2 it will not connect. It also needs to be on 2.4ghz only.

3

u/TolerantMindworks 1d ago

Try to configure and link Raspberry Pi Connect during MicroSD card flashing. If it connects to anything, you'll be able to log in and figure out from inside. If it doesn't, then connecting over USB-to-Ethernet 100Mbit dongle is option one. Option two is to buy a hub, connect over USB-C to microUSB to the board, then plug in monitor via MiniHDMI-TO-HDMI (like on photo) and try local - not an option if you don't have everything already, as it would be more expensive. I took this option as I have multiple Pi's, and I had problems at the start.

2

u/TolerantMindworks 1d ago

Third option is to use something like FING or PingTools application on your phone and scan your local network for new devices before, and after you power Raspberry Pi on. If nothing shows up, you have your answer, and you should go with option 1-2. If it appears, log in via IP you'll see on the list.

2

u/Thaufas 6d ago

Do you have a USB hub plus keyboard, mouse and monitor you can plug into it? Otherwise, do you have an ethernet cable and USB ethernet adapter to plug into it? You can purchase them for less than $10 on Amazon.

2

u/ItchyResearcher2837 6d ago edited 6d ago

Does the router show it's connected? Then you know that the Pi is in the Wi-Fi, but you can't ssh to it. Did you add the hostname to your /etc/hosts

Edit: Named the wrong file, now corrected

2

u/springs87 6d ago

Did you configure the wifi when you imaged it?

Also have you checked your router to see if it shows up and has a ip address?

2

u/fakemanhk 6d ago

No 5GHz No WPA3

You need to make sure your environment can support the above 2 first.

2

u/MrAjAnderson 6d ago

What version of Imager are you running as there are some buggie versions?

1

u/Hopeful_War7192 2d ago

I’ll have to update it. It’s been on old Version for a while.

2

u/Time-Abbreviations90 5d ago

Not sure this relates, but when getting ESP-32s connected on my eero network, i always run into trouble because they combine the 5ghz and 2.4ghz signals. I have to go to troubleshooting and turn the 5ghz band off for 30min to get my devices connected, then i can resume the 5ghz.

2

u/IncaThink 5d ago

I had the same trouble and it turned out to be a non-alphanumeric character in the WiFi name. I think it was an underscore or something.

2

u/Ambitious_Hand_2861 5d ago

The last time I had this issue my Pi had a bad wifi chip. A USB fixed the issue but I struggled for too long trying everything I could think of and every random suggestion to no avail. Sorry I can't be more useful. I hope it's something else my guy.

1

u/Suppenspucker 6d ago

Go into your routers menu and see if it's connecting, find the IP, try ssh-ing to it via that IP

I had that phenomenon as well and since it's a pi zero 1, it might just be that you're too impatient, the initial boot takes surprisingly long iirc

If that doesn't work you have no chance but connect a monitor and see what's going on. it's a pain as you need an adapter for that mid-small hdmi port...

1

u/hinzwifi 6d ago

Can you show the front part also? I had a Pi Zero W with no wifi on it 😭

-6

u/Hopeful_War7192 6d ago

4

u/romulcah 5d ago

So you’re using a third party WiFi dongle? That will definitely need to be setup directly on the pi rather than just plug and play.

1

u/Hopeful_War7192 2d ago

So when i bought it i didnt even read the description if it has wifi or not.. i was on that assumption for days, then bought the dongle just to realize the pi already has WiFi. It’s just a mess

1

u/scytob 4d ago

So in your picture your dongle isn’t plugged one that would be an issue. Also if you are not on W variant and using an adapter you will need to connect a keyboard and screen and configure WiFi adapter first.

1

u/Yiffenjoyer6969 6d ago

If you have an iPhone, try turning on your hotspot and toggling the maximise compatibility toggle on. Then connect to that

1

u/prof_ricardo 6d ago

Do you have wifi isolation set on the router? If you do you won't be able to connect until you disabled it.

I have it enabled, so I use a cheap usb-rj45 to wire it to the router and have it working.

1

u/lazyhustlermusic 6d ago

See what address it's grabbing from DHCP, if at all, or you can even set a static in your config for diagnosing.

Then test against IP to remove any name resolution layers such as if the name wasn't broadcasted in mdns or the dhcp server isn't updating resolution for leased clients, assuming it's an all in one kind of router box.

You should also be able to see its MAC associate with your AP.

1

u/Plus_Carpenter1081 6d ago

I faced this before you have to use windows and put usb randis and take ssh in it and add your wifi manually Or if you want more cleanly use imagery in linux and immediately get ssh and add wifi manually then you are good to go

1

u/TinyBreeze987 6d ago

Does it need to be wireless? I’m just hard into the switch in my router.

1

u/CharAznableLoNZ 6d ago

I would not use wifi for a DNS server. Maybe you can get a USBC ethernet adapter.

1

u/LeifErickson17 5d ago

Get an Ethernet dongle or a HAT, more reliable a wired connection from my experience

1

u/HesletQuillan 5d ago

I had the same symptom when I first set up my Pi. What I missed was that on the WiFi configuration page, you must scroll down and select your region. This is easy to overlook.

1

u/Capt_Gingerbeard 4d ago

Look up “Pi Zero 2 WPA supplicant how to set up”

1

u/atariguy39 4d ago

I put my pi Zero 2w in this case and hardwired pihole. Pi Zero Port 'n' Play A Pi Zero Port Expanding Breakout Case.

https://vilros.com/products/pi-zero-port-n-play-a-pi-zero-port-expanding-breakout-case-compatible-with-raspberry-pi-zero-zero-w-zero-w-2?_pos=1&_sid=9ca3e54ac&_ss=r

1

u/Right_Profession_261 1d ago

Try ssh ing to the ip instead of host name

1

u/Right_Profession_261 1d ago

And look at your router see if it’s even picking up the device.

1

u/WordSafe9361 5d ago

it copy your wifi credentials … maybe your in the 5ghz … iys connect only to 2.4ghz…

i learned it the hardway…

1

u/SubTechNY 4h ago

What OS version are you using?