Arduino Nano ethernet-shield Telnet not receiving all bytes

  arduino, c++, ethernet, tcp, telnet

i want to get an Arduino nano to interface with a Telnet Server. The Telnet is on my local network, and communication works partially.

I use the SPI and EthernetENC Library with this code. The shield on my nano is a ENC28J60 Ethernet Shield.

When i connect to my Host via Putty (Port 134), i get a time stamp (01.01.1900 06:39). Then i can send things and it will print on my Host.

If i connect with the Arduino, i just get "01." the rest of the time stamp is lost. I can send things with my Arduino to the Host, and it will print successfully. So only the receiving part is the Problem.

  if (client.available()) {
    char  c =;

Why does this if-Loop all of a sudden stop fetching the chars from the server?

One thin I have noticed:

When i add these two lines to the code, i can see how many Chars it is really printing. As it turns out, it’s not only "01.". there are about 16 chars with a strange ascii symbol, then one LF (4. Char) and then the three chars "01." Is this a clue to what might be happening?

  if (client.available()) {

    Serial.print(". Char: ");

    char  c =;
  1. Char:

  2. Char:

  3. Char:

  4. Char:

  5. Char:

  6. Char:

  7. Char:

  8. Char:

  9. Char:

  10. Char:

  11. Char:

  12. Char:

  13. Char:

  14. Char:

  15. Char:

  16. Char:

  17. Char:

  18. Char:

  19. Char: 0

  20. Char: 1

  21. Char: .

Something strange is happening… these crazy Ascii symboles mess with the Stackoverflow editor. I had it counting down from 21 to zero, but somehow now its counting up from 21?!? What is this? Also there is this Questionmark symbol in the Editor Preview, but its not in the post.

This Ascii symbol is sketchy!

enter image description here

Source: Windows Questions C++