Serial To Telnet Example 4 U

Discussion to talk about software related topics only.
Post Reply
digitalsystems
Posts: 1
Joined: Thu May 14, 2009 6:37 pm

Serial To Telnet Example 4 U

Post by digitalsystems »

I have used this piece of code for a while now to allow me to view the serial port using telnet instead of a serial hardware connection. This code does a couple things.

#1) if no telnet session is made, it will allows the serial port 0,1,2 to be used as normal. I.E. routs the serial to the hardware.
#2) if a telnet connection is made it then routes the serial pors 0,1,2 to the telnet session. when the telnet session is closed, it automatically routs the serial ports back to the hardware.

This is handy if you have several boards running on the net and have some debug information, health info or whatever using printf's, and its just impractical to connect a serial cable to them to see this information.

Just add the attached code to your code and add it as a task, compile, download and then connect to your board using Telnet, its that simple.
Attachments
Telnet.cpp
(1.71 KiB) Downloaded 453 times
mbaybutt
Posts: 11
Joined: Thu Dec 22, 2011 10:03 am

Re: Serial To Telnet Example 4 U

Post by mbaybutt »

Hey digital,

I came across your post while searching for a telnet debugging feature. Just wanted to say the code worked great and saved me a bit of development time in my project, so thanks for the post!

- Mark
Post Reply