Discussion:
[lwip-users] Header Checksum error
Roberto Romo
2012-02-13 16:23:04 UTC
Permalink
Hi,

right now I'm trying to implement the lwIP stack into the SMT32F4 to program a kind of TCP chat between a µc and a PC.
With the Raw TCP.

I founded an example for a TCP-echo-client from st I think. When I compile it and run it on my µc everything is ok,
but when i capture the communication with  wireshark I see that the µc (IP: 192.168.1.5) sends an error:

- Header checksum: 0x0000 [incorrect, should be 0x0d6f (maybe caused by "IP checksum offload"?)

Here is an image from the program:
Loading Image...

I have to questions:

1) is this error in the stack? or in the example I got?
2) does anybody knows I could I get it away? 

I have already read the "Design and Implementation of the lwIP TCP/IP Stack" from Adam Dunkels and the " Raw/TCP - WIKI " and really helped
to build a small structure of what my project needs. Does anyone knows about more literature of implementations of the stack or an example for a "Chat"
(With this I mean that, messages could be send at random times from client or server)

(Sorry about my English)

Regards
Robert
Simon Goldschmidt
2012-02-13 16:42:13 UTC
Permalink
Post by Roberto Romo
I founded an example for a TCP-echo-client from st I think. When I compile
it and run it on my µc everything is ok,
but when i capture the communication with  wireshark I see that the µc
- Header checksum: 0x0000 [incorrect, should be 0x0d6f (maybe caused by
"IP checksum offload"?)
Is that so? Because from the image you attached, a packet from 192.168.1.4 *to* 192.168.1.5 has a zero checksum. No I assume that .4 is your PC which has checksum offloading enabled. In that case, it's perfectly normal to see checksum errors: wireshark gets the outgoing packets before the driver (or even hardware) has filled in the checksums.

However, communication should still work fine although wireshark reports an error. As a workaround, either disable checksum checks in the wireshark options or disable checksum offloading in your windows NIC's options.

Simon
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
FreeRTOS Info
2012-02-13 16:42:26 UTC
Permalink
Post by Roberto Romo
- Header checksum: 0x0000 [incorrect, should be 0x0d6f (maybe caused by "IP checksum offload"?)
http://blog.robertoromo.eu/wp-content/uploads/2012/02/checksum_error.png
I think wireshark is seeing/recording the packet *before* hardware has
added the checksum, hence it is not really an error. There is an option
somewhere in WireShark to request it to not report that particular
error/warning.


Regards,
Richard.

+ http://www.FreeRTOS.org
Designed for Microcontrollers.
More than 7000 downloads per month.

Loading...