9 years, 4 months ago.

Ping on Arch Max does not work

Hi,

Ping on Arch Max does not work. On the Arch Pro it works just fine. Both boards have the same Ethernet Transceiver chip, the DP83848J.

While the Arch Max cannot be pinged, it just works fine with the TCP server/client, NTP, etc., as expected.

Is this a bug?

Kind regards, Jack.

Question relating to:

mbed IP library over Ethernet ethernet, ip, mbed

1 Answer

9 years, 4 months ago.

Hi, this is due to conflict with hardware checksum generation of STM32. You need to patch lwIP modification from ST.

Modify EthernetInferface/lwip/core/ipv4/icmp.c file like following.

in icmp_input() function

    /* adjust the checksum */
    if (iecho->chksum >= PP_HTONS(0xffffU - (ICMP_ECHO << 8))) {
      iecho->chksum += PP_HTONS(ICMP_ECHO << 8) + 1;
    } else {
      iecho->chksum += PP_HTONS(ICMP_ECHO << 8);
    }

modify it like below

    /* adjust the checksum */
    /*
    if (iecho->chksum >= PP_HTONS(0xffffU - (ICMP_ECHO << 8))) {
      iecho->chksum += PP_HTONS(ICMP_ECHO << 8) + 1;
    } else {
      iecho->chksum += PP_HTONS(ICMP_ECHO << 8);
    }
    */
    iecho->chksum = 0;

For more information regarding this issue, googling with keyword "CHECKSUM_GEN_ICMP".

Accepted Answer

Hi Hill,

thanks a lot, it is working now! I'm very happy with your help!

Regards, Jack.

posted by Jack Berkhout 14 Jul 2015