Arduino programming guide series
What is the gibberish in your Telnet output?
When the Serial object in your sketch and the Arduino IDE serial monitor are set to the same speed, you would expect that clear, readable text would appear on your screen.
Sometimes it doesn't. What's going on? is it a glitch? what can explain the gibberish that appears?
If you an eye for details, you may have noticed that when you start a Telnet connection between your computer and an Arduino equipped with an Ethernet shield, some “gibberish” text appears as soon as the connection is established and before you can start sending text messages back and forth.
It looks like this:
What is the origin of this "gibberish"?
Even though Telnet is a simple protocol that runs over TCP (the Internet’s Transmission Control Protocol), it still requires that a handshake process takes place before a connection between a client and a server is established.
The handshake process is a quick “conversation” between the client and the server. The two terminals are negotiating the minimum set of parameters that are acceptable by both. Once they agree on this, the communication can start.
These parameters are formally called “Telnet options.”
Although these options can be negotiated at any time, they typically are when a session is first established.
The Arduino with it’s Ethernet shield, and a basic Telnet server sketch will ignore all of the handshake communication since it is not equipped to deal with them. The client will then drop down to the most basic level of Telnet communication.
If you are curious, here’s some more information about Telnet connections.
"Arduino programming" series
Jump to another article
New to the Arduino?
Arduino Step by Step Getting Started is our most popular course for beginners.
This course is packed with high-quality video, mini-projects, and everything you need to learn Arduino from the ground up. We'll help you get started and at every step with top-notch instruction and our super-helpful course discussion space.