---
title: "UDP data packet on W5500"
url: "https://maker.wiznet.io/forum/10049"
markdown_url: "https://maker.wiznet.io/forum/10049/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "JimMartz"
created: "2014-03-14T20:29:21+09:00"
last_activity: "2020-05-26T01:24:01+09:00"
language: "en"
views: 1770
replies: 4
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# UDP data packet on W5500

## Question

Asked by JimMartz on 2014-03-14 in Ethernet Chips.

All,

I am looking at the code for the UDP receive function, UDPRecv.
It is taking the first 6 bytes as being the destination IP address?
I thought the header was like this:
2 bytes, source port
2 bytes, destination port
2 bytes, data length
2 bytes, check sum
Then the data.

Is the W5500 changing the UDP header, or am I missing something here?

Thanks,
Jim

## Replies

### Reply 1 by ventosus, 2014-03-16

Yes, the W5500 (and also W5200 and W5100) return a custom UDP packet info structure.

I think the W5500 manual misses this information, but the W5200 manual has it, look it up there.

UDP data is specially structured in the RX memory, like this:

PACKET-INFO
4 bytes: destination IP address
2 bytes: destination port number
2 bytes: byte size (N) of data packet
DATA-PACKET
N bytes: real data

### Reply 2 by hjjeon0608, 2014-03-16

Hi,

W5x00 series all have the same UDP header frame.

[![](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/e071c19b7a4280041cc5e4bda428a6741c40c58c.jpg) 780×233 46 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/1X/e071c19b7a4280041cc5e4bda428a6741c40c58c.jpg)

Best regards.

### Reply 3 by JimMartz, 2014-03-17

Thanks for the reply.
I got the W5200 manual and that answered a few questions I had.
The whole section 5 of the W5200 data sheet is missing from the W5500 manual,
I hope this gets included in the W5500 datasheet for people like me that have not
used a previous wiz chip.

Thanks,
Jim

### Reply 4 by luckyluka, 2020-03-16

Hi!

I am a bit confused about this UDP checksum.
Does W5500 generate it? If not, who does?

Below is a screenshot of a of package sent by w5500. Checksum is definitely present.
Where is it generated? Can it be configured?

[![image](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/5/51baab6814b43bb090bfaf33c7b28ad37d116605.png) image1056×574 24.2 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/5/51baab6814b43bb090bfaf33c7b28ad37d116605.png)

Thank you.

---

Source: https://maker.wiznet.io/forum/10049
