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.

MSP432E401Y: NDK Loopback of ICMP messages for localhost or own IP address?

Part Number: MSP432E401Y

Hi,

I tried to write ping and so far it works with the exception of its own IP address or the loopback address not doing anything. I get a reply timeout. 'Wiresharking' I noticed that no ICMP packages are send in case the own or the loopback address is being used in the sendto fcall. Actually I am not sure what is needed on the socket level to make this happen. Any suggestion on what I am missing?

br

Markus

  • Markus,

    ICMP support is included in the NDK. Why do you want to write your own ping on the MSP432E4 device?

    Todd

  • Hi Todd,

    thank you for your answer. As far as I can understand it I am using ICMP from within the ndk from TI. Our cmd line interface is UDP based for other reasons. If I type on it for example: ping "www.ti.com" I get the following:

    ping www.ti.com
     Pinging 95.100.52.109 5 times with 64 data bytes ...
     Reply from 95.100.52.109, 64 bytes, Seq=1, TTL = 55 in 11 msec
     Reply from 95.100.52.109, 64 bytes, Seq=2, TTL = 55 in 11 msec
     Reply from 95.100.52.109, 64 bytes, Seq=3, TTL = 55 in 11 msec
     Reply from 95.100.52.109, 64 bytes, Seq=4, TTL = 55 in 11 msec
     Reply from 95.100.52.109, 64 bytes, Seq=5, TTL = 55 in 11 msec

     Ping Statisctics: Package(s) send: 5 received: 5 lost: 0
     Reply Time(s) minimum: 11 ms maximum: 11 ms average: 11 ms

    This is what I expect. All good. However using one of the 127.x.x.x addresses for example 127.0.0.1 fails. It fails as well with its own IP address.

    Q1: Do I need to configure something in the ndk to make this work? My understanding is that localhost or 127.0.0.1 is a virtual port with no HW involved. As such it should be handled by the network stack. Actually it doesn't. Any idea on what I do overlook?

    Repeating the above with its own IP address does the following:

    ping 192.168.1.200
     Pinging 192.168.1.200 5 times with 64 data bytes ...
     Reply timeout
     Reply timeout
     Reply timeout
     Reply timeout
     Reply timeout

     Ping Statisctics: Package(s) send: 5 received: 0 lost: 5
     Reply Time(s) minimum: 0 ms maximum: 0 ms average: 0 ms

    The same thing happens if I use a virtual port IP's address 127.0.0.1. The ping command implemented is basically the one found in the example section of the ndk with some minor changes regarding the reporting and the cmd line options. That's it.

    br

    Markus

  • Markus,

    What version of the NDK are you using?

    Also you are modeling your ping command off of the one in ti/ndk/tools/console/conping.c? I tried this command on the latest version of the NDK and was able to ping the loopback address.

    Regards,

    Dalton

  • Hi Dalton,

    you are right. I am using the codebase of the conping.c example within the SDK. I am using the version (MSP432):

    simplelink_msp432e4_sdk_3_20_00_10

    I did read the release notes. I may have overlooked something.

    br

    Markus

  • Hi Markus,

    That version explains it. There was a bug with loopback transfers in that version that was fixed in NDK version 3.71. This version of the NDK is included in the 3.40 version of the simplelink sdk. Can you move to that version?

    Regards,

    Dalton

  • Hi Dalton,

    thank you for the clarification. We allready have some "patches" in the our SDK/NDK we use. I would prefer do download the NDK only and to diff the changes before deciding. I will try to get the ndk only. Thank you for your help. I will post success/failure after doing so.

    br

    Markus

**Attention** This is a public forum