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.

TM4C129ENCPDT: Telnet from Ethernet_S2E example

Part Number: TM4C129ENCPDT
Other Parts Discussed in Thread: EK-TM4C129EXL

Hi,

I am trying to make a telnet application such that, when I remotely access the EK-TM4C129EXL launchpad, I issue some commands for example "chip temp" then the controller replies with chip temperature or "led ON" then the controller switches on the led etc. However I dont know if that requires the controller to be a Telnet Server or Client. Please keep in mind, I am not restricted to use Telnet which I assume uses TCP/IP protocol and doesnt work under UDP (my guess), I can also use UDP for the same purpose in case if you have similar application available.

I am using FreeRTOS based approach as I need it unfortunately I can not see a lot of example with FreeRTOS. There is one Ethernet_S2E which I tried to run but it has many compilation errors and my impression is perhaps the project copy I have, is missing some files. 

I am bringing up following questions and seeking your kind help;

  1. Please tell me if I need Telnet Server or Client for the purpose I mentioned earlier
  2. Is there any counter-part for Telnet which will work on UDP
  3. Please provide a known built copy for enet_s2e project
  4. I was trying to build the enet_s2e application with tivaware_c_series_2_1_4_178 version. I dont know if this version is compatible or recommended version as the application will not compile even after addressing all the included path issues.
  5. I will highly appreciate if some one can pinpoint, the buffer in enet_s2e project where the incoming request data will be stored e.g. "led ON", so that I can then read the incoming packet and accordingly act upon it.

I thank you all for your cooperation. 

Regards,

Sahil 

  • Hi Sahil,

     Here is a copy of the enet_s2e example using FreeRTOS. Note this is the only example we have and nothing else. I can it can be either a server or a client. When your MCU receives the packet (whether it is a server or client) you just decode the command that is sent in the packet and react to it. 

    1057.enet_s2e.zip

  • Thanks Charles,

    I am trying the copy you shared now. I will be back to you soon.
  • Charles,

    I run the project and able to compile and flash it. However Since I dont have the Serial Booster pack so how can i telnet and see the messages being print on the launchpad debug port ?
  • In case you haven't read it here is the user's guide. www.ti.com/.../spma072.pdf. I think you can map to UART0 which is connected to the PC's Virtual COM port via the Debug USB port. You will need to adapt the software to your hardware environment if you don't have the boosterpack. As I said earlier this is the only example we have. You will need to do the necessary modification for your project.
  • Charles,

    Thanks for sharing the link. I am able to find the right spot and the right buffer that is holding the packet received via telnet. 

    So the buffer that is holding the data is located at line number 1516 under Telnet.c as shown bellow. I was able to print the character on the Debug port as well.

        switch(pState->eTelnetState)
        {
            //
            // The normal state of the parser, were each character is either sent
            // to the UART or is a telnet IAC character.
            //
            case STATE_NORMAL:
            {
                //
                // See if this character is the IAC character.
                //
                if(ui8Char == TELNET_IAC)
                {
                    //
                    // Skip this character and go to the IAC state.
                    //
                    pState->eTelnetState = STATE_IAC;
                }
                else
                {
                    //
                    // Write this character to the UART.
                    //
                    SerialSend(pState->ui32SerialPort, ui8Char);
                    UARTprintf("\n\r%c",ui8Char);
                }