telnet to serial... sample application


I have a Digi ConnectME development board and NET+OS 7.1. I’ve created a sample project “Telnet Server API Sample”. I want to reverse telnet into a Cisco Router Console port. I can reverse telnet and login to DIGI just fine, but the output seems to be strange.

  • I can see everything I type if I use windows telnet
  • I can’t see what I type until I press if I use HyperTerminal or SecureCRT
  • The router’s output is displayed with a strange behaviour, it’s like every is processed as two 's and I get “^@” string back everytime I press enter

It feels like ConnectME module buffers what I type and only sends it to the router when I press key. Is there anyway to make it send characters whenever they are typed.

Or maybe do you know some way to resolve these issues all together?

Does anyone maybe have another version of this project that has this stuff resolved?

I’m not as familiar with SecureCRT, but HyperTerminal won’t actually negotiate any options, and I would suspect Character Echoing was negotiated with Windows Telnet. A network trace would confirm this.

As for the double lines, it sounds like when you press enter, its sending down an \x0D\x0A and the Telnet service is passing it through as is, and the Cisco is interpreting it as hitting enter twice (i.e. once for \x0D and once for \x0A). You could try stripping out any \x0A’s as you see them in the data stream before passing them along to the serial port.

I appreciate the response! I’m going to try stripping out \0x0A, and report back.

Do you know how to change from the line behaviour to character behaviour? I want the module to send data to serial port after each character is typed instead of waiting for the enter key.

Unfortunately you can’t, it’s handled internally line by line without an option to change it.

You are saying it’s impossible to change the C code to change this behaviour?

It’s handled within the telnet library, so you as the end user can not make this change.

Isn’t it kind of strange that you send data only when you press enter key. I can think of other RS232 applications where you want to send the char when it’s pressed, for example arrow keys, or any other key really.

Did you find any solution?