Ethernet Sheild UDP Limitation

Hello guys,

I have project I'm working on in which I wish to send UDP messages from an Arduino to another, but without the (optional) check sum in header. I have the w5500 ethernet sheild 2 and an arduino UNO. I tried reading up in the datasheet and I could find a thing about the check sum. Is there a way to somehow omit the check sum or even better, write my own header? Perhaps through editing the library or addressing some pointer and shifting it to the right address. I only ask for directions, let me do the hard work as I have been stuck in this issue for sometime now and can't seem to find a way out. Thanks in advance for your time and replies.

Cheers,
Hatim

1 Like

the implementation is in the W5500 not in the library.
what problem do you have with the header? it should be transparent for the application level

I want to get rid of the optional checksum field

why? you don't see it in application

I do not wish to use checksum in my application, is there a way that you know of to remove it? In theory and according to what I read about UDP checksum is optional, you could disable it if needed, and in my case I'm testing out my system on arduinos now but later I plan to use it on some prototype I'm developing. I need to skip the checksum in my application. If you know of a way please help.

when I used wire shark it is there

what problem do you try to solve?

There is no problem, I only am trying to do something challenging. I just want to remove checksum, only, that's the only thing I look to do. Its not a pressing issue or something critical or blocking my way. I just want to learn more about the UDP communication, and I'm testing it now with arduino. Given that according to everywhere on internet that checksum is removable from UDP packet header and that it's applicable in theory, can I do it in this chip or w5500 or from the code? I'm currently reading up the manual, but if there is somewhere you could direct me for help I would be thankful. If there's not I hope someone could help.

It is there in transmisson, but what you do with it on reception is completely up to you. You can just ignore it if you like.

1 Like

so it's hard wired into the chip, or possibly removable if I access the registers?

from Wiki

The checksum field may be used for error-checking of the header and data. This field is optional in IPv4, and mandatory in IPv6.[7] The field carries all-zeros if unused.

The field is always there. In an Arduino transmission i guess the UDP libraries calculate and include it automatically, and i guess it will be verified on reception of not zero (also automatically by the library, i'm not sure but check the UDP library's SRC to confirm)
You can not remove it from the header, those 2 bytes are part of the protocol, but if you set them to 'zero' it means that no checksum calculation has been sent.

1 Like

I now understand you, Is there a way to write a custom header? Thanks in advance

what do you mean by that ? I mean in some way, no there is not.
First of all, why ? are you using the Arduino to send UDP ? or to receive UDP ?
If you are using it to send, the CRC will be calculated automatically and will be correct therefore. You set the ports, the datalength is also calculated from what you provide.
On the reception end, if the CRC != 0 then it will be used to check the integrity otherwise not.

1 Like

Well, the end goal is the prototype I'm working on, and the documentation for that system mentioned only in the header to send message length and some id, but no mentioning of the checksum. They also said that the message length and the id are 4 bytes aligned and all headers are the same. So I assumed that since they want length it's already there in UDP, and they don't want checksum, it's as if they're not following the exact UDP after what I understood from you now. So, practically the system they use, I believe deviated from UDP protocol by replacing the check sum field with another requirement. So, I wondered if custom header is possible or removal of checksum and then I would have the id mentioned first thing in the message, but all in all it seems hard.

Are they expecting a UDP packet or not ?

[quote="hshamseldin, post:14, topic:1034019"]
They also said that the message length and the id are 4 bytes aligned and all headers are the same.
[/quote]hmmm.

You know what they say about 'assume'

Yes but why would they do that.

It must be possible, but the UDP library that you are using is creating the header, so you will have to make your own way of creating that.

1 Like

the implementation is in the W550 firmware. not changeable

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.