Page 1 of 1

I can't send a broadcast message using UDP socket

Posted: Thu Dec 21, 2023 7:00 am
by LuvKira
I'm using an ESP32-C3 configured to work as a Wifi station. To send a message to any IP, I used the "sendto" function that returns the length of the sent data. First, I try to send a UDP message to a device in the same network. It was successful. However, some interesting things happened when I used it to send a message to the broadcast IP address. The "sendto" function still returned the length of the sent data, but I checked with Wireshark and nothing was sent. Please let me know what is going wrong with my project and how to handle it.
The following is the send function that I use