Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Using Sockets and a Terminal Server to Access Hardware.
@ 1997-03-10  5:00 Ranjit Singh Banwait
  1997-03-10  5:00 ` Aaron Leonard
  1997-03-10  5:00 ` Frank da Cruz
  0 siblings, 2 replies; 3+ messages in thread
From: Ranjit Singh Banwait @ 1997-03-10  5:00 UTC (permalink / raw)



Hi,

I am playing around with interfacing to some hardware
through a Dec700 terminal server. I enabled the telnet
server service on a port of the terminal server and 
plugged my hardware in. Then I made a tcp/ip socket
connection to the port. I stay in the NVT mode of the
telnet server application I communicate with the hardware.

Problem:
I am able to get data from the hardware into my program but
I have problems when the hardware sends a byte with hex
value FF or when the hardware sends a carriage return.
A byte FF is followed by a second FF which is added by the 
telnet server(I think)
A carriage return is followed by a NULL character(decimal 0).

Question:
If I want to interface to hardware over a network, should
I be using Sockets and a terminal server or some other connection
method and/or hardware.

Is there a way I can configure NVT to prevent it from messing
with my data.

Thanks.


Ranjit



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using Sockets and a Terminal Server to Access Hardware.
  1997-03-10  5:00 Using Sockets and a Terminal Server to Access Hardware Ranjit Singh Banwait
  1997-03-10  5:00 ` Aaron Leonard
@ 1997-03-10  5:00 ` Frank da Cruz
  1 sibling, 0 replies; 3+ messages in thread
From: Frank da Cruz @ 1997-03-10  5:00 UTC (permalink / raw)



In article <3323678E.2263@pc.jaring.my>,
Ranjit Singh Banwait  <era@pc.jaring.my> wrote:
: I am playing around with interfacing to some hardware
: through a Dec700 terminal server. I enabled the telnet
: server service on a port of the terminal server and 
: plugged my hardware in. Then I made a tcp/ip socket
: connection to the port. I stay in the NVT mode of the
: telnet server application I communicate with the hardware.
: 
: Problem:
: I am able to get data from the hardware into my program but
: I have problems when the hardware sends a byte with hex
: value FF or when the hardware sends a carriage return.
: A byte FF is followed by a second FF which is added by the 
: telnet server(I think)
: A carriage return is followed by a NULL character(decimal 0).
: 
It sounds like your Telnet client is not in NVT mode.  If it
were, it would take care of these items.  Some Telnet clients
behave this way if they have been told to use a socket number
other than 23.

: Is there a way I can configure NVT to prevent it from messing
: with my data.
: 
You didn't say what kind of computer or OS your Telnet client
is running on.  In any case, why don't you try using Kermit
as your Telnet client?  It has all sorts of controls that might
be lacking from whatever Telnet client you are presently using.
It will handle the FF business automatically, and the CR
business can be tamed with explicit settings, such as "set
telnet newline-mode".

  http://www.columbia.edu/kermit/

- Frank



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Using Sockets and a Terminal Server to Access Hardware.
  1997-03-10  5:00 Using Sockets and a Terminal Server to Access Hardware Ranjit Singh Banwait
@ 1997-03-10  5:00 ` Aaron Leonard
  1997-03-10  5:00 ` Frank da Cruz
  1 sibling, 0 replies; 3+ messages in thread
From: Aaron Leonard @ 1997-03-10  5:00 UTC (permalink / raw)




In article <3323678E.2263@pc.jaring.my>, Ranjit Singh Banwait <era@pc.jaring.my> writes:
|Hi,
|
|I am playing around with interfacing to some hardware
|through a Dec700 terminal server. I enabled the telnet
|server service on a port of the terminal server and 
|plugged my hardware in. Then I made a tcp/ip socket
|connection to the port. I stay in the NVT mode of the
|telnet server application I communicate with the hardware.
|
|Problem:
|I am able to get data from the hardware into my program but
|I have problems when the hardware sends a byte with hex
|value FF or when the hardware sends a carriage return.
|A byte FF is followed by a second FF which is added by the 
|telnet server(I think)
|A carriage return is followed by a NULL character(decimal 0).

Yes, this is correct behavior for TELNET NVT.  0xFF is the
NVT escape code (IAC); a 0xFF in the application data stream
will go out on the wire as 0xFF 0xFF.  (Other codes following
a 0xFF will be intepreted as TELNET options/commands.)  A <CR>
not followed by <LF> will go out on the wire as <CR><NL>.

(Worse, from the standpoint of getting data as-is thru the
connection, NVT standardly only supports 7-bit ASCII, not 8-bit.)

See RFC-854.

If the TELNET BINARY option is negotiated (see RFC-856), then
8-bit data is allowed, and the <CR><NL> mapping is not done.
However, the IAC (0xFF) doubling will still be done.

|Question:
|If I want to interface to hardware over a network, should
|I be using Sockets and a terminal server or some other connection
|method and/or hardware.


If the hardware you're trying to talk to has a serial interface,
then connecting it to a terminal server and talking to the terminal
server via TCP sockets is probably the best approach.

|Is there a way I can configure NVT to prevent it from messing
|with my data.

The behavior you've described above is how NVT is supposed to
work.  If you want to keep on using NVT, then your code should
take that into account.

Alternatively, you should be able to configure the terminal server
NOT to use TELNET NVT, but instead to use raw TCP (aka "stream"),
which will cause the data transmitted over the serial line to be
passed as-is over the TCP connection.  Most terminal servers -
certainly Cisco ones - provide for a way to configure a TCP connection
to a serial port in this manner.  I've heard that DECserver 700s
*don't* support raw TCP; you might ask Digital whether they have
software that supports this.  If they don't, you'll either have to
swap out your terminal server or else modify your application to
talk NVT.

Another thought: if you're running MultiNet/VMS, you can set up a
TELNET terminal device (NTY) to handle the I/O to/from the 
terminal server.  The NTY (if using a temporary NTY, not a permanent
one) will handle the TELNET negotiations and IACs, and so should
spare your application the problem of having to worry about that
stuff.  See ftp://public.tgv.cisco.com/aaron/hll_nty/ for sample
code.  If you're using a different TCP/IP stack, you might want to
check to see whether it provides for a similar facility.

Regards,

Aaron

Aaron Leonard           aaron@cisco.com                 [ work ]        
                        Aaron@Leonard.Tucson.AZ.US      [ home ]



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-03-10  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-03-10  5:00 Using Sockets and a Terminal Server to Access Hardware Ranjit Singh Banwait
1997-03-10  5:00 ` Aaron Leonard
1997-03-10  5:00 ` Frank da Cruz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox