Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix checksum calculation neglect #5

Merged
merged 1 commit into from
Jun 1, 2015
Merged

fix checksum calculation neglect #5

merged 1 commit into from
Jun 1, 2015

Conversation

ska-la
Copy link
Contributor

@ska-la ska-la commented May 25, 2015

eliminate a checksum calculation problem..

@renatoaloi
Copy link
Owner

Hi! How can I replicate the problem?

On 5/25/15, Suchkov K.A. notifications@github.com wrote:

eliminate a checksum calculation problem..
You can view, comment on, or merge this pull request online at:

#5

-- Commit Summary --

  • fix checksum calculation neglect

-- File Changes --

M checksum.c (3)

-- Patch Links --

https://github.com/renatoaloi/EtherEncLib/pull/5.patch
https://github.com/renatoaloi/EtherEncLib/pull/5.diff


Reply to this email directly or view it on GitHub:
#5

Serial Link Comunicações e Serviços Ltda
(34) 9826-0777
seriallink.com.br

@ska-la
Copy link
Contributor Author

ska-la commented May 26, 2015

Yes, today it's not important. As I see you've introduced checksumDMA method (in TcpStack) which involved in returnHttp method, but.. In April i've got a working instance only after appling the patch. I see the checksum method still used at other places of code (inside TcpStack), as so be aware (keep in mind) that it mistakes when deal with odd data chunks and return correct result with even ones. I'd got wrong results with one and three bytes arrays, and correct result with 2,4,.. bytes arrays. Suppose, it can be reproduced with something like:
...
#include "checksum.h"
...
arr[] = {0xf2,0xb7,0x40};
printf("result: %X\n",checksum(arr,1,2));
printf("result: %X\n",checksum(arr,2,2));
printf("result: %X\n",checksum(arr,3,2));
...

@ska-la
Copy link
Contributor Author

ska-la commented May 26, 2015

I can't reproduce the problem on host computer - it works properly. I've tried to rollback to previous version and to test it on my Arduino board, but Ethernet Shield beign seamed broken. Perhaps, for nearest time i will be futile.. sorry! I have some notes, if it's not abuse i would like to speak out them. Ok?

@renatoaloi
Copy link
Owner

Nice! Good pick up! There are 3 or 4 different checksum functions, but I think it is heritage from Pascal Stang's code.

I will merge all this stuff we did at master branch this weekend. Thank you for the contribs!

Renato

renatoaloi added a commit that referenced this pull request Jun 1, 2015
fix checksum calculation neglect - SKA
@renatoaloi renatoaloi merged commit c349922 into renatoaloi:enc28coremerge Jun 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants