Go Down

Topic: Is it possible to add a TCP client in the Arduino IDE (To debug via Telnet)? (Read 728 times) previous topic - next topic

rtek1000

When using the ArduinoOTA, the serial monitor does not work over the network connection because it is not a serial port, but it would be possible to debug with a Telnet connection.

I'm using Hercules SETUP utility (PuTTY.exe also works fine but Hercules has buttons that make the connection easier)

Please, see the code available in this post:
https://forum.arduino.cc/index.php?topic=554740.0

Juraj

I have this library for OTA debug printouts. I used it with esp8266, but it should by portable to Ethernet or WiFi library
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

rtek1000

Nice, and what terminal do you use to connect to the Telnet server?

Juraj

telnet
but on Linux I use port 2323, because on standard port the client sends some handshake bytes.
on Windows the telnet client was ok at port 23 and I could send Ctrl+C to end the session. then I bought a new computer and installed Linux and the telnet client was sending Ctrl+C at handshake so I changed request-to-close to Shift+C.
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

rtek1000

Oh yes, telnet on command prompt, I think that's a good idea, but I'd rather use a dedicated program that offers connection buttons, data handling etc.

I found a telnet article about Windows command prompt, which says the following:
Quote
Giving anyone listening the credentials to a server is obviously a very big problem, especially considering that the Telnet username and password could be for a user that has full, unrestricted rights to the system.
Source: How to Use the Telnet Client in Windows

It's interesting because in Arduino the access to the password becomes more difficult, because the microcontroller does not have accessible files, such as a computer.

Juraj

it is not a true telnet server on arduino. it is a plain socket server which handles only commands you programed to handle. but you can connect with a telnet client to it, because the basic telnet client is only a socket client.
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.


rtek1000

I've seen that Telnet has few commands,

I agree that the Arduino socket does not work in the same way,
but the connection to the TCP server is very little used by the basic Arduino programmers,
it's mostly ESP8266 users looking for the network connection ,

So I believe that adding a TCP terminal in the Arduino IDE can make it easier to use this type of connection, often the user is limited to the use of the cable, and certainly he already has much of the infrastructure to operate without cable.

I'm realizing that the Arduino platform is moving towards IoT, and the TCP terminal may be something that many are missing.

Telnet syntax

Juraj

only reason for Serial Monitor in IDE is that the IDE can release the USB connection of Monitor for the sketch upload connection. with external terminal you would need to stop the connection in terminal before hitting Upload in IDE and the connect the terminal again.
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

Go Up