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.

Telnet server with TI-RTOS NDK

Hello,

my project is bases on:
- Concerto F28M36
- CCS5.5
- TI-RTOS 1.21, including NDK 2.23

The TI-RTOS including SYS/BIOS is all configured statically using a .cfg file (XGCONF).
I need to set up a telnet server. For that I would like an example project. I haven't been able to find anything to fit my needs. I am aware of this thread. But the RDK-S2E software is a Keil µVision project, does not use TI-RTOS, etc. So I can't use it and since I'm new to TI NDK and Ethernet programming in general, I'm not able to port the mentioned telnet implementation into my project.

Except adding a static Telnet instance inside XGCONF (under NDK->Telnet) and creating a callback function, I don't know what to do next. NDK documentation didn't supply an answer ether. Do I have to listen for Telnet commands inside the Callback or do I have to start a new task in order to animate the telnet server or does NDK already implements telnet commands ?

Does anyone know of a telnet implementation that uses NDK and XGCONF ?

Thanks a lot in advance.
Frank

  • Hi Frank,

    While I've used TI-RTOS, I'm not familiar with NDK.  I'm going to move this post over to the BIOS team who should be able to assist you in getting telnet setup.

    BR,

  • Hi Frank,

    You can add a Telnet server via the following configuration page.

    The callback function I specified was "myTelnet". You can look at the cdoc for the NDK. Look at the ti.ndk.config.Telnet for more details.

    There is a functional console callback implementation in the NDK. It is in packages\ti\ndk\tools\console\console.c. Simply set the callback to be '&ConsoleOpen' and define verStr and a supply a string:

    char *VerStr = "\nTCP/IP Stack Example Client\n";

    in your application.

    Todd

  • Hi Todd, thanks for the answer. Actually, I can't use console.c, because the functions inside will create redefinition conflicts with some other library file: C:\ti\tirtos_1_21_00_09\products\ndk_2_23_01_01\packages\ti\ndk\tools\console\lib\console_min_ipv4.aem3 It works, if I do no more than specifying ConsoleOpen as callback to the telnet instance in XGCONF, and adding the VerStr to my project. I do not add console.c to my project. Doing this, the telnet server works. But also I cannot modify the console behavior (such as adding a command). The file console_min_ipv4 only exists in it's compiled version, and not as a C file. I tried to include the console.c in my project while renaming all function names. I also have to add : #undef _INCLUDE_PPPOE_CODE to avoid compiler errors. So far, this is building, but crashes when telnet tries to connect. Is this the intended way, to rename all identifiers inside console.c ? Where is the connection to console_min_ipv4.aem3 coming from ? I guess, when selecting IP module in XGCONF ? Is it possible to disconnect the linker from console_min_ipv4.aem3 and let him take the symbols in the project owned console.c instead ? Thanks. Frank
  • When you graphically configure the NDK, it supplies all the needed libraries automatically. This includes the console library. You can use console.c as an example that can work out of the box. You can model you code after console.c, but you cannot, as you noted, us it as is.

    You can go edit the getLib function in packages\ti\ndk\config\package.xs to remove the adding of the console library. This is not a documented or "supported" way though. You'll have to pull the other source files (e.g. conecho.c in also). Please note, this is in theory...I have not tried this.

    The better solution is to use console.c (and the other files) as a reference.


    Todd