Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By RogerClark
#26549 I'm just curious if there is any existing code to Print to a TCP connection.

i.e remote debugging (well debugging in terms of sending and receiving chars as if it was the serial port ?)

If not, I guess I'll need to write one myself, but it would be less work if someone had already done it ;-)
User avatar
By martinayotte
#26569 Hi Roger,
Maybe I've misunderstood your question ...
The WifiClient class is derived from more generic Client class, which is derived from Stream and Print class, a bit like any ther Arduino cores, so if you setup a WifiServer on port 23 for example, you can connect with telnet and have debugging over TCP. It is what I'm doing in my Sketch_Buffet (either my ESP version here, or the one I'm using on STM32).
User avatar
By kolban
#26573 Howdy Roger, in a project I am working upon, I have a need to do just what you suggest ... however, rather than make it appear like a "Serial" port, I was planning on implementing a Telnet server as that would allow an arbitrary telnet client to connect to the ESP8266. Let us see if anyone already has a Telnet server for the ESP8266 and, if not, maybe we can start a Github project to create such a library with an eventual view of submitting it for inclusion to @igrr for the Arduino project.

Neil
User avatar
By martinayotte
#26574 Hi Kolban, it is exactly what I've done in the Sketch_Buffet mentioned above. I've simply took the WifiServer example, change it to port 23, and create a small shell command parser to execute other stuff. Maybe I should lean it and add it to github as a TelnetShell example ... ;)