LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Telnet through System Exec

To whom it may concern,

I am trying to execute telnet commands through the "System Exec.VI". I found a VI in the discussion forums which does it for FTP (see attachment), and works fine for a previous application. However, I cannot make it work for telnet. Also, I know there exists the TELNET VIs which I have, but would like to make my application as the one shown in the attached file. Is it possible?

Thank you for any help regarding this issue.
0 Kudos
Message 1 of 7
(4,346 Views)
Hi,

The same example should work for performing telnet operations via command line as well. Simply replace the 'ftp -A' and 'ftp -n' command line inputs into the System Exec.vi in the nested case structure with the 'telnet' commmand. Essentially, instead of having System Exec.vi call ftp.exe, it now calls telnet.exe.

If you are having difficulty using System Exec.vi, first make sure that you can establish a telnet connection manually yourself via the command line. Because telnet is a less secure protocol, more servers are disallowing client telnet connections. Check that the host computer you are trying to establish connections with does support telnet and try manually opening a telnet connection to the host first to make sure this protocol is supported
.

Also, since the telnet VIs are a little more robust, you can also try first with the telnet VIs to create your telnet connection. Once this works and you know that telnet works on the server you are trying to communicate with, then the command line 'telnet' command shouldn't be a problem.

Hope this helps!

Kileen C.
NI
0 Kudos
Message 2 of 7
(4,342 Views)
Hello All,

I'm using the System Exec to execute the Windows Telnet application. I can successfully get the Telnet to open a connection with my device, but any telnet command I put in the Standard input is ignored. The commands all work fine when I invoke an interactive Telnet session from the CMD line.

I am patterning my VI after the one provided by NI for interfacing with the Windows FTP application, where the dir and bye commands are sent via the standard input.

Any help is appreciated. Thanks.

Justin
jflory@symmetricom.com
0 Kudos
Message 3 of 7
(4,236 Views)
Hi Justin,

Do you mind submitting your code so I can have a closer look? By reproducing what you are experiencing will help me tremendously.

Thanks!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 4 of 7
(4,217 Views)
did you ever get this to work?  I am trying to do a similar project, and I would like to leverage what you have done if possible.  Please let me know.
0 Kudos
Message 5 of 7
(4,105 Views)
FYI: I abandoned solving this problem, and baught the NI Internet toolkit, which has a Telnet client.
0 Kudos
Message 6 of 7
(4,002 Views)

Hello,

 

Any possible to attach your code? I have difficulty to make a connection. 

0 Kudos
Message 7 of 7
(1,173 Views)