This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
we are using the MSP401E401Y Launchpad to test lwIP.
When using the lwip Ethernet example the ICMP (ping) Response has the ICMP checksum set to 0 (the IP checksum is correct)
* on Linux I see the ping Response, but Wireshark Shows that the ICMP checksum is set to 0
* Windows does not Display a response
On both Systems I can open the Webpage from the demo with no issues (under the same IP address) .
How to get the ping Response to work?
Hello Sai,
was the Information sufficient, do you Need more Details?
Could you reproduce the behaviour?
Thanks,
Horst
Hello Sai,
thank you for your response. As per request, I did enable ICMP. However, as expeceted, the result was the same as before.
I do get a ping reply, but the ICMP checksum is set to 0x0000 (incorrect).
The response caputured with Wireshark:
It would be good, if you could look into it. Please let me know, if I can provide you with more Information.
Best regards,
Horst
Hello Sai,
as I have mentioned before, uncommenting the line you mentioned did not resolve the problem.
did you get a chance to setup a system and reproduce the behaviour? - Is there another way for me to get support from TI?
Thank you,
Horst
Hello Horst,
Apologize for not getting back earlier!
I think the issue is that lwIP is not generating checksum. In SimpleLink MSP432E4 SDK, the default lwIP configuration is used, which is for software to generate checksum for outgoing lwIP ICMP packets. For some reason this is not happening (I still have to figure out why).
Since MSP432E4 can generate this checksum in hardware, if we enabl this feature then checksum is generated for outgoing ICMP packets and ping is working (I tested in Windows).
To enable hardware to generate checksum for outgoing ICMP packets, use the following line of code in lwipopts.h.
//***************************************************************************** // // ---------- checksum options ---------- // //***************************************************************************** //#define CHECKSUM_GEN_IP 1 #define CHECKSUM_GEN_ICMP 0 //#define CHECKSUM_GEN_UDP 1 //#define CHECKSUM_GEN_TCP 1 //#define CHECKSUM_CHECK_IP 1 //#define CHECKSUM_CHECK_UDP 1 //#define CHECKSUM_CHECK_TCP 1
I made this change and windows accepts all the ICMP packets from MSP432E4. See screenshot below.
Hope this works for you!
Thanks,
Sai
indeed this works for me.
When disabling the ICMP checksum, the correct checksum is transmitted.
Note: actually Looking in the data in function msp432e4if_transmit (in msp432e4if.c) Shows that lwIP did generate the checksum, but somehow MSP432E4 did overwrite the checksum with 0x0000 when sending out the packet.
Thanks,
Horst
Hello Horst,
Yes you can! That would move the checksum generation for all those protocols to the Hardware.
I believe if you make the following changes, the hardware will manage verifying the checksum. I will have to confirm this though!
#define CHECKSUM_CHECK_IP 0
#define CHECKSUM_CHECK_UDP 0
#define CHECKSUM_CHECK_TCP 0
I will file a enhancement request to validate and make these changes part of the example generation process.
Thanks for looking into this and being patient with us!
Regards,
Sai
**Attention** This is a public forum