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.

How to use telnet server code



Hi all,


sorry to ask although there are already some posts about the topic but I'm not an expert as all the users that have already posted.


I'm currently using a TM4C1294XL kit board and I already did the code to use UART0 to communicate with the computer. I'm able to display a menu on my putty prompt and tip yes/no to launch the main code on the board. I would like now to replace this communication by a telnet. I already tried to find some information and I found the telnetd code in tiva-c/third_party/uip-1.0/apps/telnetd/. However this code is absolutely not documented and I admit that I'm not able to see how to integrate this code to replace my UART0 to PC communication.

I just need to do a simple telnet from the PC to the board. Display a menu on the shell prompt, tip yes or no and then launch the main code on the board. Then the board will send and display on the prompt some calculation result in a basic form (no graphics, only character lines).

Actually I have two questions :

- Does the ethernet onboard really need an external 25MHz oscillator as I have read in some example ? This external oscillator is not used in all example ...

- How to include the telnetd in an existing code ? I mean I don't see even how to start coding this as there is no documentation ... Does anyone have a concrete example ? Apparently some tips are given in the ser2enet example but where can I find it ?


Thanks for your help


Nicolas

  • Nicolas Demonty said:
    Does the ethernet onboard really need an external 25MHz oscillator

    I am confused... you say you are communicating via UART0. Then what does ethernet has to do with this?

    Nicolas Demonty said:
    How to include the telnetd in an existing code ?

    Are you sure it is TELNET that you need? If I'm not mistaken, Telnet is a 1969 solution for embedding 7-bit transfer into an existing network... It appears to me that you just need a command line implementation running on a TM4C, via serial port. If that is what you need, look for the Command Line Processing Module, a utility that is part of Tivaware "add-ons". You can find it on the SW-TM4C-UTILS-UG pdf of the Tivaware docs folder.

    Bruno

  • Hi


    thanks for the reply. Actually currently I use the UART0 to simulate a RS232 connection with the computer. This connection is used to display a menu and interact with the board. I would like to get rid of this communication and use instead the ethernet port to connect remotely from a computer to the board. Then I would like to send data from the board to the remote computer. The telnet is used in this case because much more simple than dealing with ssh.


    I just need to be able to do a telnet from a remote computer to the board that will be connected on a network via the ethernet port. Then some calculation result must be sent to that computer via ethernet. I could also use the http server and display the result in the browser but in that case it is only a formatting of the result that will be shown in the browser. The data it self wont be sent to the computer.


    kr

    Nicolas

  • Nicolas,
    Much clearer now, thanks!
    Sorry if I won't be able to help much further - I just assume that there is probably some sort of socket connection on the ethernet port from which you can extract the received bytes and consume them on a command parser. The parser example can still be similar to the utility I mentioned before. Unfortunately, I've no experience with ethernet communication...
    As for the external crystal, I do remember as well having read something about the clock...  But one thing I can say for sure is that the hardware you find on a TM4C1294 launchpad is enough for good data transfer on that RJ45 connector! That schematic is probably your best initial reference.
    Bruno

  • Doesn't anybody have a clue ? :-(