From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

telnet using TCP vi's

Labview 7.1
Windows XP Pro / DOS
 
Using the TCP vi's I am able to successfully talk back and forth on port 23 to the labview basic telnet server example found on the ni website (local host)
 
I am also able to talk to this labview telnet server example using the DOS command interface . Everything seemed rosey until I tried using the same TCP vi's to look at a real remote system. The DOS command interface works great to access the remote system using Telnet. I get the correct return prompt of
 
login:
 
When I try to access the remote system with the TCP vi's I get:
 
 ÿý ÿý ÿý#ÿý'ÿý$
 
This return prompt is consistant. Same thing every time. I also found a TCP example on the ni website, and I get exactly the same response. I am reasonably sure the connection is being made based on other factors, just getting junk back. ????
 
I am using TCP write and TCP read and TCP open connection
 
gtb
 
 
0 Kudos
Message 1 of 7
(6,908 Views)
Hi gtb,

Where did you find this labview basic telnet server example? I haven't been able to locate a basic telnet server example at ni.com.

I would also try the TCP examples that ship with LabVIEW, such as the Simple Data Client.vi
Simple Data Server.vi or the TCP Communicator - Active/TCP Communicator - Passive.vi (depending on your application).

If the shipping examples don't work, we'll want to discuss your remote system in more detail.

Michael K.

| Michael K | Project Manager | LabVIEW R&D | National Instruments |

0 Kudos
Message 2 of 7
(6,878 Views)
Go to ni.com and type telnet server in the search box. It was the 2nd one on the list that comes up. In case you can't get it I have attached it. This telnet server example has a small bug. Once you use the stop button on the front panel you have to stop the vi and start it again for it to work properly. Anyway, it works with the vi I wrote and with the example TCP vi's found in the examples. This telnet server program also works with the XP DOS command window (Telnet 127.0.0.1).
 
As stated before, the DOS command window works perfectly with my real remote system as well (been using it for about a week now). Attached are the simple TCP programs I wrote for telnetting. They also work with the telnet server vi.
 
The remote system is a UNIX based OS called QNX-6.2 I believe the company is named QNX. I can communicate with it all day with XP's command window and telnet.
 
Would ni's TELNET vi's work? They are available as a seperate add on included in the internet toolkit package.
 
I tried using the examples as well with my remote system and get the same result as I got with my own vi's. While you are looking this over I will try the ni examples again.
 
Thanks.
gtb
0 Kudos
Message 3 of 7
(6,858 Views)
I don't think the attachments worked before.
Download All
0 Kudos
Message 4 of 7
(6,855 Views)
Hi gtb,

For future reference, this message is attached to the Telnet Server example: "National Instruments has not reviewed this program, does not support this program, and does not guarantee its quality in any way." There's no way to tell if this program will work with your application, so I would recommend using it as a reference point and not a standard.

Stil, I found these two previous posts which discuss this problem:

garbled response when TCP connect is used with telnet
   http://forums.ni.com/ni/board/message?board.id=170&message.id=137137&requireLogin=False

Re: How do I establish a telnet session with unit under test?
   http://forums.ni.com/ni/board/message?board.id=170&message.id=112886&query.id=0#M112886

As discussed in the 2nd post, "I
f you want to do telnet using plain TCP, you need to do everything yourself, including the telnet options negotiation."

It appears more efficient to use NI's Telnet VIs, but the 2nd post gives you the necessary information for writing telnet using plain TCP.
Cheers.

Michael K.

| Michael K | Project Manager | LabVIEW R&D | National Instruments |

0 Kudos
Message 5 of 7
(6,839 Views)

15 years old,  thank you...

 

 

0 Kudos
Message 6 of 7
(3,002 Views)

@ALDOCAMPOSP wrote:

15 years old,  thank you...


You're never too young to start 😁.

 

Consider giving kudos to say thanks... 

 

 

0 Kudos
Message 7 of 7
(2,989 Views)