I have a question about the LWIP UDP Discovery.
I can't get my Hercules to respond to a locator request using the LWIP library. I'm unsure as to what I need to do to get the Hercules to respond to the request.
Pretending I know the IP address of the target device, if I use a packet sender to send a UDP message on port 23 containing FF 04 02 FB, I will get a response if the LocatorConfig function has the following snippet of code commented out:
void LocatorConfig(unsigned char *macArray, const char *appTitle)
{
...
//udp_connect(pcb, IP_ADDR_ANY, 23);
}
When this is commented out, I get the discovery response I expect when using packet sender to send ff 04 02 fb to port 23 using a UDP send tool to communicate with a known IP address.
However, I only know the IP address because it is printed out in debug mode.
I figure IP_ADDR_ANY would allow me to send the discovery message from any IP address, but I get no response when connect is run in LocatorConfig.
How do I properly do discovery to discover the DHCP offered IP address without cheating in debug mode by viewing the printed output on the serial console? Is there a tool I need to use? What is the udp_connect function doing that disables the response?
Josh Karch