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.
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.
Jump to another article
3. Focus on the type parameter in "println()"
4. "0" or "A0" when used with analogRead()?
5. What is the "_t" in "uint8_t"?
6. Save SRAM with the F() macro
7. What is the gibberish in the Telnet output?
9. Confusing keywords? follow the source code trail
10. The interrupt service routine and volatile variables
11. The problem with delay() and how to fix it
12. How to deal with the millis rollover
13. Can you use delay() inside Interrupt Service Routine?
15. A closer look at line feeds and carriage returns
16. Understanding references and pointers
17. Simple multitasking on the Arduino
19. Concurrency with the Scheduler library on the Arduino Due and Zero
20. Bitshift and bitwise OR operators
21. What is a "static" variable and how to use it
22. Understanding the volatile modifier