W5500 Sending Data to UDP server

Hello,

I have W5500 setup and running. I checked the MAC and IP and the configuration is correct, also when I try to ping the IP of the W5500 I get the reply, so I’m guessing the W5500 is up and running.

Now I have the issue that I want to send some packets to the UDP server, and I’m trying to use sendto(SOCK_UDP, data, count, ip, port)

However, It looks like I’m doing something wrong… Can someone please post an explanation on how to send UDP packets to certain IP:PORT or point me to the documentation where I can learn more about this?

Thank you in advance!

First, refer to ioLibrary Loopback code. (below link)

github.com/Wiznet/ioLibrary_Driver

check to loopback_udps code. and follow to ‘sendto’ inside code.

And wireshark tool download. This tool is udp packet capture possible.

Also you must find internet to udp packet basic information.

Thank you

Thank you Edward.

I’ve downloaded the Socket APIs Help (chm, html) from wizwiki.net/wiki/doku.php?id=pro … 0:allpages and from there I’ve created a small code that looks like this

	uint8_t result;
	uint8_t *testBuffer 	= "Wiznet Says Hi!";
	uint8_t address[4]		= { 10, 10, 0, 24 };

	//
    while(1)
    {
    	result = socket(0, Sn_MR_UDP, 3000, SF_IO_NONBLOCK);
    	DEBUG_PRINTF("socket Result: %d\r\n", result);

    	result = sendto(0, testBuffer, strlen(testBuffer), address, 300);
    	DEBUG_PRINTF("sendto Result: %d\r\n", result);

    	delay_ms(1000);
    }

And I’m getting those packets over the Ethernet and capturing them via Wireshark.