Go Down

Topic: How to use Arduino as Telnet client? (Read 1 time) previous topic - next topic

vav2sab

Although there is a Tutorial called "TelnetClient" under the Ethernet Libraries, it seems, the tutorial does not cover the topic in full. I tried to use Arduino Ethernet as a Telnet client, but got stuck with the negotiation process. After some tries and searches (there is another topic here http://arduino.cc/forum/index.php/topic,110166.0.html), I tend to think that either the code must handle the negotiation between Telnet server and client, or a library, which supports Telnet negotiation process, is needed. Here's what I've got with Wireshark, when putty Telnet client negotiates with a BusyBox-based Telnet server:

PACKET CONTENTS DESCRIPTION                   HEX VALUES

CLIENT--
Command: Will Negotiate About Window Size     ff fb 1f
Command: Will Terminal Speed                  ff fb 20
Command: Will Terminal Type                   ff fb 18
Command: Will New Environment Option          ff fb 27
Command: Do Echo                              ff fd 01
Command: Will Suppress Go Ahead               ff fb 03
Command: Do Suppress Go Ahead                 ff fd 03

SERVER--
Command: Do Terminal Type                     ff fd 18
Command: Do Terminal Speed                    ff fd 20
Command: Do X Display Location                ff fd 23
Command: Do New Environment Option            ff fd 27

CLIENT--
Command: Won't X Display Location             ff fc 23

SERVER--
Command: Do Negotiate About Window Size       ff fd 1f
Command: Will Echo                            ff fb 01
Command: Do Suppress Go Ahead                 ff fd 03
Command: Will Suppress Go Ahead               ff fb 03
Suboption Begin: Terminal Speed               ff fa 20
Option data                                   01
Command: Suboption End                        ff f0
Suboption Begin: New Environment Option       ff fa 27
Option data                                   01
Command: Suboption End                        ff f0
Suboption Begin: Terminal Type                ff fa 18
Send your Terminal Type                       01
Command: Suboption End                        ff f0

CLIENT--
Suboption Begin: Negotiate About Window Size  ff fa 1f
Width: 80                                     00 50
Height: 24                                    00 18
Command: Suboption End                        ff f0

CLIENT--
Suboption Begin: Terminal Speed               ff fa 20
Option data                                   00 33 38 34 30 30 2c 33 38 34 30 30
Command: Suboption End                        ff f0

CLIENT--
Suboption Begin: New Environment Option       ff fa 27
Option data                                   00
Command: Suboption End                        ff f0

CLIENT--
Suboption Begin: Terminal Type                ff fa 18
Here's my Terminal Type                       00
Value: XTERM                                  58 54 45 52 4d
Command: Suboption End                        ff f0

SERVER--
Command: Do Echo                              ff fd 01
Command: Will Status                          ff fb 05
Command: Do Remote Flow Control               ff fd 21

CLIENT--
Command: Won't Echo                           ff fc 01

CLIENT--
Command: Don't Status                         ff fe 05

CLIENT--
Command: Won't Remote Flow Control            ff fc 21

SERVER--
Data: login:                                  6c 6f 67 69 6e 3a 20


Before I try to work on a solution (eventually a new library), I would like to ask the community, if there is already a solution for this task. Any input would be highly appreciated.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy