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.

NDK Telnet Stack shutting down on its own

Other Parts Discussed in Thread: TM4C1294KCPDT, SYSBIOS

I have a proprietary board with a TM4C1294KCPDT processor.  I am using ndk_2_24_03_35 with tirtos_tivac_2_14_00_10.  I am using XCONF to set up a Telnet server in the TIVA chip.  The ethernet connection is 10BASET, DHCP.  It is communicating to a proprietary PC Windows application that works correctly with an earlier Stellaris implementation that used lwip.

The board seems to boot, acquire its IP address, and establish a Telnet connection to the application.  Everything works fine until the following (as seen from wireshark):

1.  PC sends a command via a Telnet packet.

2.  TIVA returns a TCP ACK packet.

3.  TIVA returns a response to the command via a Telnet packet. 

4.  The PC does not ACK the response immediately.  Aprox 102 milliseconds after the original response packet was sent, the TIVA returns the same response via a TCP retransmission packet.

5.  The PC sends a TCP ACK packet.

6.  The TIVA exits the NetScheduler function in netctrl.c (line 207). {Don't think it should do this}

7.  From then on things fall apart.  If I remove the breakpoint I placed immediately after line 207 in netctrl.c, the TIVA almost always sends a TCP ACK+FIN packet. 

8.  The PC sends a TCP ACK packet.

9.  The TIVA eventually gets to the ti_ndk_config_Global_NetworkIPAddr function in app_pem4f.c (line 3724) and executes the xdc_runtime_System_printf("Network Removed: "); path.

10.  Ultimately the entire TCP/IP stack stops executing and will not even respond to a ping.

The console usually displays that a TCP retransmission occurred immediately before the Network Removed... stuff.

Suggestions on how to diagnose what is happening?

Tom

  • Can you please attach a simple CCS project that demonstrates your issue and instructions on how to reproduce it? I'm assuming you just need a telnet client on the host side.

    You can also check the following in CCS, Tools->ROV->BIOS->Scan for Errors. This will show you any blown stacks or errors in the kernel.

    Todd
  • Hi Todd,

    I have been able to dig back into things and found the following:

    NC_NetStop in netctrl.c (line 258) is being called with an argument of (-1) by DbgPrintf in ossys.c (line 59):

    if(Level >= DBG_ABORT_LEVEL) {
    NC_NetStop(-1);


    DbgPrintf in ossy.c is being called with arguments (Level = 1, TcpTimeoutRexmt:.Retransmit.Timeout) by TcpTimeoutRexmt in tcptime.c (line 164)

    I have not been able to dig back into where DBG_ABORT_LEVEL is ultimately defined, but it is declared in osif.h.

    Is there some kind of a setting that is not set properly in the app.cfg file, project properties, or elsewhere?


    -------------------------------------------------------------------------------------------------------------------------------------------------------------------
    To respond to the points you made:

    The only error that shows up in ROV is in the ti.sysbios.family.arm.lm4.Timer module:
    Caught exception in view init code: "C:/ti/xdctools_3_31_01_33_core/packages/xdc/rov/StructureDecoder.xs", line 547: java.lang.Exception: Target memory read failed at address: 0x40036000, length: 80

    I suspect this is not correlated with the problem above because ROV reports the same error at seven address following a system reset.

    Providing a CCS project would be difficult. I did not have this problem when using the NDK console.c module on the target and the command line telnet utility on windows, so I suspect it is an interaction issue between the PC code, some of my application's tasks, and the NDK.
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------

    Tom