Sunday, May 20, 2012

Interesting things about Telnet. So the start of any foray into Telnet begins with the IETF RFC 854 ( There you can get the gist of how the protocol works. Basically it covers what is know as the Network Virtual Terminal (NVT). This is basically the version of telnet that has zero additional features turned on. In other words, all optional features are turned off for NVT. That's not to say that NVT has no features, it just that all features that are in NVT are required to technically have a telnet client. A telnet client implements at least every feature that NVT supports. Telnet clients also may negotiate what features will or will not be used by an exchange of DO, DON'T, WILL, WON'T. All commands start with the IAC code (Interpret As Command). This is octal /377 or hex 0xFF. For example, most modern clients use full-duplex communication now-a-days. So one of the first things exchanged by telnet clients is IAC WILL SUPPRESS-GO-AHEAD or in hex 0xFF 0xF1 0x03, octal /377 /361 /003 (because for some reason octal is the what everything seems to be expressed for telnet.) Anyway, that whole SUPPRESS-GO-AHEAD function is not defined by IETF RFC 854, it is defined by RFC 858! Now we reach the problem I'm currently having with telnet. Going through and trying to find all of these dang RFCs that define telnet so that I have a modern client... Of course, once I have then all in hand, I'll still need to figure out which ones are relevant to tn5250... At the same time, I'm brushing up on Android socket programming. Believe it or not, the SDK documentation is pretty good. I'll still do a couple of dummy echo server/client programs to get a feel for socket programming in Android. The nice thing is that I have two tablets with Ice Cream Sandwich on them, so I'll be able to play with socket programming on them. One the client and one the server. Also, I'm not going to be targeting anything below 4.0. If the client runs on Android pre-ICS, then it is by pure dumb luck. Finally, I'm going to have to find a better code syntax highlighter for this blog before I start putting code up here. Cheers!

No comments: