LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connect to an IP address

Solved!
Go to solution

Hi all!


I am programming software in LabVIEW that pings an IP address and tells me if it is active or not. If the IP address is active, I would like the software to automatically connect the PC to that particular IP address. How can I make this last part?

0 Kudos
Message 1 of 5
(1,840 Views)

Hi Giadavid,

 


@Giadavid wrote:

If the IP address is active, I would like the software to automatically connect the PC to that particular IP address. How can I make this last part?


When you "connect to a PC" then usually you (as a client) connect to a server (running on the other PC). To be able to connect to a server you need to know the communication protocol of the server.

 

Which kind of server do you want to connect to?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(1,801 Views)

Hi!

 

I have two kind of servers. One is pptp and the other is l2tp/ipsec.

 

Thank you!

0 Kudos
Message 3 of 5
(1,789 Views)

Hi Giadavid,

 


@Giadavid wrote:

I have two kind of servers. One is pptp and the other is l2tp/ipsec.


I'm not sure LabVIEW brings its own functions for those protocols.

But you can use SystemExec to start other tools to "connect" to those servers!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(1,774 Views)
Solution
Accepted by topic author Giadavid

PPTP is a so called remote access protocol. L2TP is the Layer 2 Tunneling protocol which is similar to PPTP in functionality. Both are currently mainly use in VPN solutions but PPTP was traditionally also used to tunnel network communication through modems.

 

This is not something that is usually used from application level directly but rather as underlaying connection technology to tunnel network connections over a different transport channel like serial ports and in old times through modem connections.

 

In Windows there is functionality to control this kind of protocols through the Remote Access Service API which allows to configure such RAS connections and establish them. RAS will then incorporate them into the normal Windows networking so that you can connect with normal network protocols like TCP/IP or UDP to the remote resource without further having to bother about the connection.

 

Now you talk about being able to ping the remote side, which is a little confusing if you mean the normal IP based ping tool. Because this would mean that you already have a network connection to that device, and therefore wouldn't need to establish a PPTP connection to it anymore. So try to be a bit more specific what you are actually trying to do. What method do you refer to when talking about ping? If this is the standard ping tool operating over ICMP/IP protocol, why do you think that you would need to connect over PPTP to that device? If it is for encryption reason what are the actual services you try to access on that device?

 

LabVIEW definitely does not come with support for these protocols itself. The normal way is to establish such tunneling connections, be it VPN, modem or other similar things externally in a way that installs the connection into the normal OS network stack. In this way you can then connect to specific services on the remote side through the normal network protocols TCP/IP and UDP.

 

Rolf Kalbermatter
My Blog
Message 5 of 5
(1,730 Views)