On 4/7/2020 8:15 AM, Hemant Kapoor wrote:
Hello,

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:

        destinationAddress.addr = htonl(0xc0a80101);

Just a thought...

Patrick


_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to