Step-by-Step UDP implementation

Hi guys,

Does anyone here have UDP step-by-step guide or something like that to help me ??
My device can use DHCP method or an IP fix into the LAN.
It is ping answering …

If I have a Desktop software sending UDP packets … how should I proceed to align this software to get my devices’s answers, a hand shake, for instance ?

Any help will be appreciate.

Thank you so much my friends.


if you say only that I do not believe that someone can help you.
MPU which controls the W5500?
Are you referring to a specific hardware?
The W5500 is on a module?
For test you can use any tcp terminal software also to understand what you’re sending.
I personally use this [url][/url] it was free, it can be set as client and/or server and is also a serial terminal.

Hi coccoliso, thank you for your answer and help. And really sorry about my poor question …

I am using a microchio PIC18F to control the W5500.
I implement the DHCP files (downloaded from ioLibrary driver) and it is working very well.

Yes, it is my hardware … uC + W550 + memory e2prom + MAC Address
Using directly W500 chip on my board.

As a serial device … I am using TERATERM …
I am downloading the hercules to see it, thank you for your tip.

Do you have some guide or clues about how set the UDP on W5500 ?? I read on the manual … and it is looking like simple … as its manual show us, just send the UDP packet with some special characteristics… is it right ??

If I want to send a specif asnwer when I get the UDP packet … is it possible ?

thanks a lot for your time.

excuse the delay in replying but I read your answer to my question just now. :confused:
Since you’re already using the standard libraries can look here [url][/url]
In the bottom of the page you can find a link to some examples [url][/url]
For UDP client server see source loopback.c [url][/url] you find loopback_udps function… start from here. :wink:

Once on the official website you could find two zip they had in them all they needed ( and now strangely they disappeared or at least it is hard to find and also for PIC I left those to implement a library but is written in BASIC ([url][/url])

As for your needs you can also look at the example of DHCP (or DNS is the same) where you can find the UDP client side that sends the request and waits for a response from the server. For a UDP server must open a socket for listening and can use the above function of loopback.c to process the response. Warning! Keep in mind that the state of the socket never pass in ready as in TCP… so in UDP then open it and enough.
See here for pratical “macro” steps… w5500_udp_function.pdf (142 KB)

I attach the two zip that I downloaded at the time (838 KB) and (1.87 MB) but please note that they are quite dated so if you find them updated is definitely better

Coccoliso …

No worries about delay …
I did my research and UDP now is Ok.

Thank you for your others replies … It was important.
And thank you for your last answer … I used the files you sent me to confirm what I did.

My next step will be TCP and encryption.

DO you ever tried something like AES before in C ?

Thank you so much,

I never tried to communicate SSL still trying to see if this is enough [url][/url] .


thank you for the link you sent me … I will try it and let you know.

My big question about secure is …

Is it worth do it (secure) using Aes and others ?
The reason of my question is …

If anyone just listen the channel along the time … after some period of time … they can reproduce the package wth the commands, etc even with no knowledge, just repeating the answers.

Am i right ??

It is different from TLS where nobody can heard the channel.

Thank you for you help as always … and I will try the link you sent me.