I have written a program on my laptop where I am creating a server and connecting some ESP32 as clients. Server sees when a new client is available and I have communication between them. Now, I am trying to run the same program on a Raspberry but I am getting a server IP 127.0.1.1 which is not correct obviously. Why is that? When I am running the program on my laptop everything works fine. What am I missing? First time working with Raspberry.
That’s difficult to understand without any code. What method are you using to get your IP? On which RPI are you? Are you using Websockets or the built-in Network libary? Check if your network interface is on, enabled and NOT in Promiscous mode, by running in Terminal iwconfig.
Problem solved. I was using new Server command to server
myServer = new Server(this, 5204);
println(Server.ip());
so was getting the 127.0.1.1 which is loopback IP (but I didn’t knew that ) when I understood how exactly the loopback works I solved my problem by connecting at the IP RPI got. Everything now works almost fine. Stupid question I know.