What you need:

I discovered this Arduino library a few weeks ago, and was surprised to see that there aren’t more projects that make use of it. I feel that anyone that is using OTA would have a use for this library. So I decided to make a post because I’m thinking that there are many people that don’t know about it. This library was written by JoaoLopesF.

What RemodeDebug does is startup a telnet server on the ESP8266 and allow you to send debug messages via telnet. So if you need to view the debug messages, you can do it remotely instead of having to connect it to your computer. Another nice feature is that it has an option to also send the debug messages out to Serial. It also uses a similar syntax to Serial, which allows you to convert your existing debug commands using a quick find and replace.

The main problem I’ve had since using the library, is that it can only output the debug commands in your own code. Anything that is output by a library that you are using would still only get sent out Serial. Unfortunately, I couldn’t find any solution to this that could be accomplished without editing those libraries. If anyone can think of a way to do this, please let me know.

Another minor thing, which I was able to create a solution for was figuring out how to disable the telnet server ( Since I typically didn’t want the telnet server running all the time). I was basically comment a bunch of code to disable it. But then I realized that I just had to comment the RSerial.handle(); line. This effectively tells the ESP to not process any telnet connections. I then went a step further, and used a boolean and an ‘if’ statement to disable the telnet server.

My code below provides an example of the library in action. This is my ‘base’ code that I have started to use in all my new projects. It uses the WifiManager to make it easy to connect the device and also uses OTA updates over HTTP. It outputs the time along with the amount of memory that is being used. You can see the memory usage go up when you connect, and if you type text into the telnet window.

And in case anyone was going to say it, I know that telnet is not secure. If anyone is planning on using this library, I would suggest you only use it when you need to debug. Once you have done that, just disable it, and re-upload the code. There are also a lot more option available, such as filtering by severity level. Be sure to check out the GitHub page for the library for that.

Leave a Reply

Your email address will not be published. Required fields are marked *