DominikN / ESP32-to-ESP32

ESP32 to ESP32 communication example using Arduino framework. Secure, P2P, low latency connection between devices is established. Button connected to the first ESP32 controlls LED connected to second ESP32.
MIT License
56 stars 18 forks source link

Sending UDP messages #4

Open francescaromana opened 2 years ago

francescaromana commented 2 years ago

Hi,

I am working on a project and I need two ESP32 to communicate over the network sending simple UDP packets. I have been able to do this using WIFiUDP library, but everything works only if the two microcontrollers are in the same network (I can't do port forwarding for project's reasons).

To solve this issue I thought of using VPN and I found Husarnet that works really well. I have been able to create the network and add the two ESP32 to it, the problem is that the controllers see each other and get the IPv6 and name of the peer, but WiFiUDP methods to send the packets only work with IPv4 or host name. Since I don't have the IPv4, I tried to use the host name but it seems it does not work since I get the error "could not get host from dns: 11".

What am I doing wrong? How can I solve the problem?

alissaav commented 4 months ago

Hi! I'm having the exact same problem as you, did you find a way to solve it?