> I am a newbie to networking and managed to port lwip stack to LPC17xx
> controller runninf freertos.
> I have requirement to send UDP data to a static destination IP Address.
> I have a task which tries to send a UDP Packet every one second.
> When I send data via broadcast, it works.
> udp_sendto(pcb, pb,IP_ADDR_BROADCAST,1235)
> Also from my PC if I ping to my board it all works fine
> But if I try to send data to a specific ip address (that of my PC) then it
> doesn;t work
> udp_sendto(pcb, pb,&destinationAddress,1235)
> Also I niotice that ping stop working.
Not sure about the ping breaking after the bad send, but did you make
sure your destination address byte order is correct? For instance, if
your target IP address is 192.168.1.1 (0xc0a80101), then you would set
destinationAddress like this:
I have made sure that the Destination IP Address has correct ordering.
The way I ensured is following:
1. I introduced a delay of 15 seconds before sending udp_sendto command.
2. Before the initial 15 seconds expires, I send a Ping from my PC and I get
3. After 15 seconds expires, I an see UDP data on my PC using wire shark.
Now, if I reset my controller and skip step 2, i.e. donot send ping, then
after 15 seconds I cannot see any UDP Packets.
I have been stuck with this issue for quite a while.
Any help regarding this will be deeply appreciated.