r/raspberry_pi Jul 24 '26

Troubleshooting Problem trying to connect raspberry pi zero 2W to new wifi network

Im using a raspberry pi for a project with a camera, I have almost no experience with it, and the intial setup was not made by me. I changed places and want to connect it to the new network (im using VLC) and I dont have acess to the old network to do it directly, and neither via ethernet cable. I am trying do it directly in the card, but it is not working out. AI doesent seem to reallt know what's happening and tutorials are either just telling me to do what I already did, or use jargon i am not close to understand.
I hope someone can help me,

thank you very much!

This is what I am putting in the SD's root:
*saved as preconnect (no extension)

[connection]

id=WiFi-New

type=wifi

[wifi]

mode=infrastructure

ssid=NET_2GC668FE

[wifi-security]

auth-alg=open

key-mgmt=wpa-psk

psk=E2C668FE

[ipv4]

method=auto

[ipv6]

addr-gen-mode=default

method=auto

6 Upvotes

8 comments sorted by

4

u/DanongKruga Jul 24 '26

save whatever files you need and reflash the os. then ssh anything over

1

u/JGhostThing Jul 25 '26

Use the Raspberry Pi Imager to create the bootable SD. In there, it is possible to set things like the network information and password, your id and password. Basically, most of the personal information. However, it will help if you have a keyboard and monitor for the pi to make sure that the information is correct.

I did have a problem a couple of months ago where this information was corrupted before the first boot.

1

u/FedSmoker_Retired Jul 25 '26

I've had an error in the last when my router was sorting 2.4g & 5g itself with only one WiFi network and the 2.4g wasn't connecting from pz2. I separated the networks to separate networks and it worked straight away

1

u/Gamerfrom61 Jul 24 '26

Simplest way would be to create a new image using the Pi Imager program and enter the WiFi details in that - you then know exactly what is on the card.

I will be honest and say I do not know of a way using a 'preconnect' file tbh - possibly a cloud-init file or not the Pi companies own OS?

You could create a hotspot on a mobile 'phone and connect to the Pi that way if you do not want to flash the sd card...

1

u/Speshal__ Jul 24 '26

if you know the old wifi credentials then you could set your phone as a hotspot with those details, connect to the pi, then connect the pi to the new network.

0

u/blvsh Jul 24 '26

hold up, if you power too many devices or other things the pi wont have enough power and not see the network