LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW - Internet communication over a secure network ?

Hi All

I have a question. I wanna do this with LabVIEW. I have a program that will communicate to a dedicated server through TCP/IP for user authentication, data upload etc.

What I want to do is : I want my labview code to talk to ther server using the web address of the server. So my code will generate the format of the data to be sent to the server. Then the server would give some information/response about the data I sent. Similar to TCP/IP but I want to use the web address kinda thing. Also I want to make it a secure connection (SSL). Can you give some input on this ?

Thanks

Kudos are the best way to say thanks 🙂
0 Kudos
Message 1 of 7
(3,025 Views)
Lets call the web address here URL for clarity. An URL exists of the protocol (http://), the computer address (www.domain.topleveldomain), an optional port number (:8080) and the path access on that server (/somedir/index.html). You can translate the computer address into an IP address using the String to IP address or directly pass that address to TCP Open. The port address is optional since the protocol specifies a default port number (http:80, ftp:21, etc.)

Now the problem you have is that you need to talk http to the server. That is in itself a string based protocol and can be easy but the problem lies in the fact that there are several versions and making it such that it does work with all versions can be a challange.

The biggest problem however is the SSL you want to have. SSL is really an encryption layer  which works on the socket level  so trying to do that in LabVIEW is a huge undertaking and I know of nobody who got around doing this yet. The best bet would be to use another software such as putty and tunnel through it. Now if you work on Linux you could do that using the pipes VIs available there with which you can invoke the external program and use pipes to transfer data from and to that program which will relay them for you through a secure connection to and from the server.

On Windows you would have to try the pipes library I have started to develop on OpenG (www.openg.org). It is working for Windows but I haven't done thorough tests with real world scenarios yet. The library is to be considered beta and there isn't an OpenG Commander package yet, so you would have to get it over CVS from the sourceforge servers.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 7
(3,022 Views)
Depending on how specialized you plan for the communication to be, you could use the ActiveX interface to IE. That would give you HTTP and SSL support and you could communicate just about any data as long as you stuck to HTTP for the envelope. For example, you don't have to send HTML - you could send text or even B64 encoded binary data.
0 Kudos
Message 3 of 7
(3,007 Views)
All

Thanks for the replies. One more question. I open the URL from my code. The URL when opened sends me some kind of a message. I need to read that from my code. This was simple when I used TCP/IP since they had an inbuilt function to read this. Can I do the same using activex - IE ? Thanks

Kudos are the best way to say thanks 🙂
0 Kudos
Message 4 of 7
(2,987 Views)
That depends on what it is sending. When you open the URL with IE, it is expecting that the server talks HTTP. So, if the URL receives an HTTP Request and then sends an HTTP Response, IE automatically reads that and you just need to pull the data from IE.
 
If that is not the case, you must either change the server or not use IE. However, since your original post talked about a web address I am assuming that it is an HTTP server.
0 Kudos
Message 5 of 7
(2,976 Views)
Yes, I am opening the URL with IE (http or https). But how do I pull the data from IE. I am using activeX to open the URL in IE. So far, I've not noticed a feature to read the status or data.
 
By the way, when I talk to the server, I would be sending the user name, password and some other info and what I would receive would be something like "True/False" for user validation and "read/updated" for the other info.
 
 

Kudos are the best way to say thanks 🙂
0 Kudos
Message 6 of 7
(2,958 Views)
You are now in the land of Microsoft documentation. Internet Explorer has a very rich ActiveX API set and multiple control points from which to work. Here are some links to the docs you might want to look over.
 
 
Specifically, you want to look at the WebBrowser and the MSHTML controls. Here are some other links on that
 
 
Also, you should check out the axevent.llb in examples\comm directory. It has a simple browser example which uses events. Finally, I'm sure there are lots of examples of using IE in LV out there in the community. Might want to post a question with that in the title.
0 Kudos
Message 7 of 7
(2,950 Views)