I have an ESP-32 in Soft AP mode. I am trying to stream some data via UDP to a station and have hard-coded the recipient's IP address to 192.168.4.2.
I have set the max connections to 1. This works i.e. only one station can connect at a time. However, the first station that connects gets IP address 192.168.4.2 and the second one gets 192.168.4.3.
How do I configure the DHCP server to always assign 192.168.4.2 to the any station that connects i.e. limit the start and stop of the client IP address range to 192.168.4.2 - 192.168.4.2?
On a related note, I see these info message in the monitor console:
- I (20683) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.2
On another related note, how do I send a broadcast UDP message to all stations ? If I try "192.168.4.255" or "255.255.255.255" as the recipient's IP address, this locks up the ESP32. My guess is that it's going into some kind of infinite loop because the broadcast mask includes its own IP address (192.168.4.1).