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.

TM4C1294NCPDT: ARP packet who has no response

Part Number: TM4C1294NCPDT

I configured my board following configuration [NDK only part].

Everything is allright when device is connected switch. But when connected Router, i can not forward packets to my device.

I see ARP packet continously [Who has 192.168.10.110? Tell 192.168.10.1. Device can not response this ARP message.

Can not comminicate device when conntected Router.  

Is there any valuable information i missed out ?


/* ================ Application Specific Instances ================ */
/* ================ NDK configuration ================ */
var Ndk = xdc.loadPackage('ti.ndk.config');
var Global = xdc.useModule('ti.ndk.config.Global');
var Ip = xdc.useModule('ti.ndk.config.Ip');
var Udp = xdc.useModule('ti.ndk.config.Udp');

Global.IPv6 = false;
Global.stackLibType = Global.MIN;
Global.networkOpenHook = "&netOpenHook";

/* automatically call fdOpen/CloseSession for our sockets Task */
Global.autoOpenCloseFD = true;

Global.pktSizeFrameBuf = 2048;

Global.pktNumFrameBufs = 60;
Global.memRawPageCount = 6;
Global.ndkThreadStackSize = 4096;
Global.lowTaskStackSize = 2048;
Global.normTaskStackSize = 2048;
Global.highTaskStackSize = 2048;

Ip.ResolveIP = true;
Ip.CallByIP = false;
Ip.autoIp = false;
Ip.address = "192.168.10.110";
Ip.mask = "255.255.255.0";
Ip.gatewayIpAddr = "192.168.10.1";
//Ip.ifIdx = 1;
Ip.socketTimeToLive = 64;
Ip.enableFiltering = true;
Ip.domainName = "tiva.net";
Global.netSchedulerOpMode = Global.NC_OPMODE_INTERRUPT;
Global.netSchedulerPri = Global.NC_PRIORITY_LOW;

  • I used TI-RTOS NDK . I configure as STATIC IP.

    I can try to DumpRouteTable method defined in console.c in ndk.

    There is no ARP entry and MAC info.

    Output is like that :

    in NDK API reference guide,

    A.7 Link Layer Information (LLI) Object

    • Static
    On the other hand, static entries are ARP entries that are manually configured by an application in the
    stack and they have no timeout associated with them. They remain valid until the application or user
    deletes them. No ARP request-reply transactions are performed here.

    How can i configure ARP enty via .cfg file or in the code , any example is appreciated.

  • Hi,

    Everything is allright when device is connected switch. But when connected Router, i can not forward packets to my device.

      I'm not really an expert on NDK and ARP. From the NDK perspective, if it works with a switch then it should work with a router. My understanding is that the device (running the NDK stack) will send a ARP request to the network to find out the MAC address associated with the IP address that it wants to talk with. I don't know the reason why your router is not responding to the ARP request. 

      What I will suggest you do is:

      - First run the TI-RTOS TCP echo example connecting to either a switch or a router directly. Will  both work? Log the wireshark captures.

    - Modify the example to use static address and connect to either a switch or a router?  You can unclick the box to obtain IP address automatically so you can enter your static address manually. Will both work? Log the wireshark captures.

    I also find below posts that may be helpful. 

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/597261/rtos-ndk-arp-messages/2204636?tisearch=e2e-sitesearch&keymatch=ndk%25252525252525252520arp#2204636

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/552991/ndk-for-tm4c129-arp-re-sending-timing-setting?tisearch=e2e-sitesearch&keymatch=ndk%25252525252520arp#

  • Hi , Thank you for your response.

    As you said, I implemented ti-rtos udp echo example. But there is no any changes.

    Everything is allright when device is connected switch. But when connected Router, i can not forward packets to my device.

    Router settings must be right, cause if i use a pc instead of my device[TM4C1294] , i can forward same packet to pc.

    At PC side , there is same application echo udp.

    What is thing missing ?

    Switch TEST :

    MY device static IP : 192.168.10.53 : UDP PORT 20200 , TEST PC IP : 192.168.10.51

    Wireshark pciture for UDP Echo TEST 

    Router TEST :

    MY device static IP : 192.168.10.53 : UDP PORT 20200 , TEST PC IP : 172.1.1.26

    Using port forwarding to send packet to my device.

    Wireshark pciture for UDP Echo TEST 

    This is LAN side. Who has packes.

    This is WAN side, Destination unreachable.

    My Router Settings :

  • If you run the stock udp echo example then the udp port is set to 1000. I think you need to change the port number on your router to 1000 to see if that works. Or change the echo program port number to between 20000-21000 to see if that makes a difference. Other than that, I don't know what else to suggest. Somehow, a firewall is still blocking. Bear in mind that the NDK stack and the MCU that runs NDK has no understanding who is a switch and who is a router. If it works when connecting to a switch then NDK is working in my opinion. Your issue seems to be more network related. You may need to consult with Planet router vendor for some guidance or your IT department if you are running on your company network. 

  • HI,

    There is no difference changing PORT number.

    At this time, Device static IP : 192.168.10.110 port 1000.

    I did check and snapshot WAN side and LAN side of Router.

    Router forward packet to device via port 1000. But device not received any packet. I confirmed debug break point.

    Router working good, but device not receive any packet from IP : 172.1.1.26. 

    What is the problem ? I think , this is about NDK  configuration i missed out.

    This is the WAN side snapshot, PC static IP : 172.1.1.26, port 20201

    This is LAN side snapshot, Devie static IP : 192.168.10.110, port 1000

  • In your screenshot it shows port 137. Why is that? Is this the frame for ARP or something else? I can't tell. 

    Can you try a non TI-RTOS Ethernet example from TivaWare? There are several Ethernet examples in TivaWare library. These examples use lwIP TCP/IP stack. Will you have the same problem? If you have the same problem then it is an indication of the network and router issue. If it runs ok with your router then it is NDK to investigate although I don't know the reason for it. Unless my understanding is not correct, I cannot understand why NDK will treat  ARP differently when connecting to a switch vs a router. 

    I will also suggest you try a different router to see if that makes a difference. If the issue is with router configuration, I will not be able to help as I'm not familiar with your particular router. 

  • This is LAN side. Who has packes.

    It looks the issue is that the TM4C device isn't responding to the ARP requests from the router.

    Given the TM4C device does respond to the ARP requests from a PC when the TM4C and PC are connected via a switch I think the ARP requests from the router are different in some way.

    Can you use wireshark to inspect the difference in ARP requests from the working switch test and non-working router test?

  • HI,

    Router working good, but device not receive any packet from IP : 172.1.1.26. 

    You can see LAN side snahshot. Packets are forwarding to 192.168.10.110. But TM4C device can not receive any packet.

    In the same LAN network i can send a packet via 192.168.10.51[another PC], at this time, TM4C device can receive all packet from LAN.

    Is there any configuration in NDK for routers.

  • This is the ARP request from router to TM4C device.

    This is ARP request and Response from TM4C Device when working on switch.

  • HI again,

    I did replaced TM4C device with another PC with same static ip 192.168.10.110. 

    This PC can receive from 172.1.1.26 [ Router forwarding].

     "Packets are forwarding to 192.168.10.110" said , cause PC already pluged and unplug to LAN. So Router can forwarding to 192.168.10.110.

    If i reset router, when only TM4C device in the LAN,  Who has ARP packets coming without any response.

    Received Snapshot above.

  • Hi,

    This is pcap file including ARP packet from LAN also Router.

    switch_router.zip

  • You can see LAN side snahshot. Packets are forwarding to 192.168.10.110. But TM4C device can not receive any packet.

    In the same LAN network i can send a packet via 192.168.10.51[another PC], at this time, TM4C device can receive all packet from LAN.

    What does this mean that if another PC [192.168.10.51] is on the network then the TM4C device can receive all packets from LAN. 

    I suggested you to run a non TI-RTOS Ethernet example from TivaWare library. Did you have a chance to try? I want to know if different TCP/IP stack has the same issue or this is specific about NDK or it is a network issue that I just don't have the knowledge to understand and resolve. Did you also try a different router,, not of Planet router?

  • This is pcap file including ARP packet from LAN also Router.

    Looking at that capture, in the case with the LAN the ARP Response from the TM4C device says the MAC address of the TM4C is the Ethernet *broadcast* address which isn't valid according to the IEEE specification:

    How is the MAC address set for the TM4C device?

    The default is the MAC address is read from the contents of the USER0,1 registers.

    On a TI launchpad TI allocate a MAC address and program that into the USER0,1 registers of the TM4C129 device.

    Whereas on a fresh TM4C129 device the USRR0,1 registers will be in the erase state of all ones which could explain your problem.

    LM flash programmer can be use to program the MAC address.

  • Hi again. 

    That is worked SUCCESFULLY. it is all about MAC address.

    Thank you very much for your valuable information. Also thanks to Charles.

    Let me explain how it works.

    In our custom UDP application, at the LAN side the ARP Response from the TM4C device says the MAC address of the TM4C is the Ethernet *broadcast* address which isn't valid according to the IEEE specification. it is right, because;

    EMAC did not initiated, i did forget  uncomment  "Board_initEMAC" function in custom udp application. I fixed it.

    // Board_initEMAC();

    UDP ECHO example is sending ARP Response at LAN side as exptected. 

    I might have swicthed the udp echo example with custom udp application when sending pcap file.

    Anyway, udp echo and custom udp application is not working with ROUTER.  but working with SWITCH.

    It looks the issue is that the TM4C device isn't responding to the ARP requests from the router.

    Then, i tried to run udp echo example with TM4C1294 launcpad with ROUTER, it is worked succesfully.

    I figure out that is about MAC Address as you said.

    My custom board [ Ex. MAC address = 11:22:33:44::55:66 ] is not working with  Router. But it works, when i replaced with launchpad MAC ADDRESS [ 00-1A-B6-03-5C-5E ].

    I know that MAC Address is worldwide unique, since millions of network devices exists and we need to uniquely identify each. MAC Address is a 12-digit hexadecimal number (6-Byte binary number), which is mostly represented by Colon-Hexadecimal notation. First 6-digits (say 00:40:96) of MAC Address identifies the manufacturer, called as OUI (Organizational Unique Identifier). IEEE Registration Authority Committee assign these MAC prefixes to its registered vendors. 

    In this case, i have a few questions.

    Is there any MAC filter in NDK ?

    Which code part, NDK can not response if there is no valid MAC address ?

    Also Router may not forward packets from LAN to WAN , it there is no valid MAC address ?   

    How can i genarate valid MAC address ?

  • My custom board [ Ex. MAC address = 11:22:33:44::55:66 ] is not working with  Router.

    Ranges of group and locally administered addresses indicates that MAC address is a multicast address, rather than a unicast address. That is probably why it doesn't work with the router.

    How can i genarate valid MAC address ?

    I found Random Locally Administered Unicast MAC Address which could be useful for testing purposes. Where a locally administered MAC address won't clash with a manufacturer's allocated MAC address.

  • Thank you very much.

    This is my last .configuration [NDK part only]

    I thought it would be good to be well noted.

    /* ================ Application Specific Instances ================ */
    /* ================ NDK configuration ================ */
    var Ndk = xdc.loadPackage('ti.ndk.config');
    var Global = xdc.useModule('ti.ndk.config.Global');
    var Ip = xdc.useModule('ti.ndk.config.Ip');
    var Udp = xdc.useModule('ti.ndk.config.Udp');
    var Icmp = xdc.useModule('ti.ndk.config.Icmp');
    var Emac = xdc.useModule('ti.ndk.config.Emac');
    var Route = xdc.useModule('ti.ndk.config.Route');

    Global.IPv6 = false;
    Global.stackLibType = Global.MIN;
    Global.networkOpenHook = "&netOpenHook";

    /* automatically call fdOpen/CloseSession for our sockets Task */
    Global.autoOpenCloseFD = true;

    Global.pktSizeFrameBuf = 2048;

    Global.pktNumFrameBufs = 60;
    Global.memRawPageCount = 6;
    Global.ndkThreadStackSize = 4096;
    Global.lowTaskStackSize = 2048;
    Global.normTaskStackSize = 2048;
    Global.highTaskStackSize = 2048;

    Ip.ResolveIP = false;
    Ip.CallByIP = false;
    Ip.autoIp = false;
    Ip.enableFiltering = false;
    Ip.address = "192.168.10.110";
    Ip.mask = "255.255.255.0";
    Ip.gatewayIpAddr = "192.168.10.1";
    //Ip.ifIdx = 1;
    Ip.socketTimeToLive = 64;
    Ip.enableFiltering = true;
    Ip.domainName = "tiva.net";
    Global.netSchedulerOpMode = Global.NC_OPMODE_INTERRUPT;
    Global.netSchedulerPri = Global.NC_PRIORITY_LOW;