question

gkarumba avatar image
gkarumba asked ericnute edited

Issue with Microsoft Telnet session

I am seeing the entered command word is send to a Microsoft telnet session, character by character. Any issue with the session properties? ![alt text][1] [1]: /storage/attachments/1422-ms-telnet-session.GIF
iTestMS Windowstelnet
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
PaulD avatar image
PaulD answered ericnute edited

Yes. Microsoft's Telnet server runs in two modes: "stream" or "console". By default it runs in console mode and this will mean that the cursor will jump all over the screen to fill it in. By comparison, stream mode will keep input and output in a logical stream -- the way iTest needs to look at it. I think your problem will be resolved if you reconfigure the Telnet service to run in stream mode.

To do this on Windows XP or Server 2003, type the following commands at a command prompt on the PC that is running the telnet service:

tlntadmn stop tlntadmn mode=stream tlntadmn start

By the way, in case you're wondering why you are seeing all of those individual commands with one character each, it is because iTest has determined that the server is in "screen mode" -- like you will see some terminal applications that use the whole screen and where you can use keys to control the screen. iTest works with these, but this mode will preclude the natural flow of commands and responses, in favor of a key-at-a-time producing a screen as a response.

8 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

gkarumba avatar image gkarumba commented ·

Thanks, Paul. It worked. Appreciate your quick response. Small correction in the command used.

 

We need to use "config" sub-command.

 

tlntadmn stop

tlntadmn config mode=stream

tlntadmn start

0 Likes 0 ·
PaulD avatar image PaulD gkarumba commented ·

Thanks for the correction.  The next person reading this will appreciate it!

0 Likes 0 ·
NickL avatar image NickL PaulD commented ·

I'm seeing the same problem and setting stream mode seems to have fixed the single character problem; however, now my backspace and arrow keys are behaving oddly.  Backspace just backsup and doesn't delete (in fact it backs over the prompt) and the arrow keys move the cursor where it shouldn't be.

 

Is there anything else we need to set?

 

Thanks,

Nick

0 Likes 0 ·
PaulD avatar image PaulD NickL commented ·

Sounds odd.  Take a look at the Keyboard properties in the telnet session properties.  You can change both of these behaviors.  But it is still odd, as I wouldn't expect Windows telnet to require this.  Is it possible the Windows machine is configured for a different international geography or something?  

0 Likes 0 ·
NickL avatar image NickL PaulD commented ·

Looks like something funky is going on with the server.  We're seeing odd behavior on Putty too.  The backspace doesn't work no matter what we set the property to.  The linefeeds are odd too.  See attached.

0 Likes 0 ·
Window Capture.jpg (423.8 KiB)
PaulD avatar image PaulD NickL commented ·

I've seen this kind of thing before.  The thing to notice is that each new line starts AFTER the previous line ends.  That means that we're not getting carriage return codes at all.  We're just getting newlines.  From looking at this screenshot, it looks like the problem is probably with the program inside Windows here -- not Windows itself.  For example, we've seen that if you run a perl or python script from within Windows, those programs have a command-line option that will ensure that they provide carriage returns when working with stream-mode interface (like Telnet).

 

Can you provide any more information about what you are running within Windows in this case?

0 Likes 0 ·
NickL avatar image NickL PaulD commented ·

Yeah it's iscsicli.  It's the command line implementation of Microsoft iSCSI Initiator.  

 

The newline problem seems to be just in iscsicli, but the backspace/arrow thing seems to be everywhere in the telnet session.

 

Thanks,

Nick

0 Likes 0 ·
PaulD avatar image PaulD NickL commented ·

Perhaps there's a pipe utility in Windows that you could push the iscsicli output through to get the line endings normalized?  As it is, I think you'll find the same problem with almost any terminal emulator in stream mode.

 

For example, on a quick Google, I found this page that refers to a pipe-capable utility.  Don't know if it works or not.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.