a minimal (but real) telnet client for Arduino, actually able to login and send commands to a generic telnet server.
It's a normal Arduino library...so just install it and take a look at the example provided to understand how to use it!how to install an Arduino library
By default the connection is made on port 23, but you can specify a different port passing it as optional argument to the login method.
By default the answer received from the server is printed on serial port, but you can edit just the "print()" method in TelnetClient.cpp to redirect the chars received from the server as you prefer.
The only thing you have to configure in your sketch is the char that represent the "prompt" for the server you're connecting to:
for this use this function in your sketch:
There are some other configuration parameters you can modify in the header file (Telnet.h). They are quite self explanatory:
For some reason I don't understand you're not the first here for this!I didn't find an explanation for this, but the telnet server implemented on Mikrotik routers asnwers twice...not a big deal, everything works, but your output can be a little messy: It seems that login continuously resetting arduino many times in a short time cause problems at the Ethernet shields...it simply begin to work not properly or to not connect at all.
In this case the only solution seems to disconnect/reconnect the power supply...hope to find a solution for this.
For any issue you want to report about this library please uncomment this macro (TNDBG) in the header file
then post the output or your sketch in the Issues section being as specific as possible (share your code, and explain what you're trying to do!).
In general I'm very happy to receive feedback and to help people with their projects...but remember that is just an hobby for me, I'm doing it for free...so words as "please" and "thank you" are really appreciated.