I’ve created Blynk local server and its working fine on LAN local ip also Im able to connect it on WAN at blynk app with port 9443. Everything seems perfect till here.
Also esp32 hardware is connected and working fine on LAN with port 8080 But when I try to connect esp32 hardware to wan ip/public ip it doesn’t connect at all. I’ve tried with port 9443, 8080, 80, 443 & 8440 but couldn’t connect.
So my issue is that I need to connect hardware esp32 to wan ip of local server.
You need to treat your Local Server as if it was a Cloud server… just based in your premises.
If you are running the device outside of your network, then you first need to connect to the internet through another AP via WiFi.begin(), then setup Blynk.config() to connect to your WAN IP. And you also need to have port forwarding setup in your router to redirect the incoming WAN port request to the internal LAN IP of your server.
I meant are you using two separate, independent ISP sources to get on-line, one for the Server and one for the ESP32… or the same ISP connection? If the same one then you do NOT use the WAN IP, rather the LAN IP of the Server.
I already knew this as During testing I discovered this and was trying on different ISPs. Everything works fine on LAN IP(Blynk app, hardware) but on WAN IP Blynk app is connecting as intended but hardware can’t connect.
None of the hardware gets connected on WAN IP, I mentioned ESP32 specifically as I’m testing on that.
Hardware gets connected on LAN IP with Port 8080 and works fine. For WAN IP I’ve tried 9443, 8080, 80, 443 & 8440 so far. (port forwarding is done on port 9443 port in router)
You’ve highlighted the correct issue I think. I tried to check ports which are open on my router with online tool and it tells only 9443 port is open and not 8080. However I’ve added same rule for 8080 as for 9443.
Got it worked. I setup a custom server.properties file, attached it with server and changed the http.port to 8440 required in my case and it worked perfectly fine for LAN and WAN ips.