I have a simple code that uses UDP to switch the photon LED, it works on one of my Photons but the other one doesn’t work. I already tested this code on another network and it worked fine, but now I changed my working space so I connected to a new wifi. Now only one the photons can run the program but the other one doesn’t. I can see that my photon is connected o the wifi and it prints its local IP, the messages that are being sent aren’t recieved
Are both Photons running the same code and also on the same subnet as your phone?
Have you checked whether you can reach another UDP client (e.g. a simple NodeJS client running on a computer)?
Showing your code may also help.
I manage to connect by changing the local ip of the photon. Still don’t know why that helped, but at least is working
How did you do that?
Depending on the answer to the question above, the reason might be that in that new network the IP the Photon wanted to claim (if it ever was set to
WiFi.setStaticIP() in its previous life) was not free for the grab.
That’s why you should be very careful and reserved about using
WiFi.setStaticIP() and rather use your local router to do the IP distribution/reservation.