LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

upnp service support in labview

I'm looking for info on uPnP support in LabVIEW. Anyone know of any existing support for this out there? Any help is appreciated. Thanks, JH
0 Kudos
Message 1 of 12
(5,030 Views)

Hi JH, intereseted in this myself. Using Labview 8.2 you can modify the labview ini file and use the multicast vis's to send and recieve the multicast messages. From here using TCP and XML you should be able to create a UPNP control point.

This is my plan anyway!

PC.

0 Kudos
Message 2 of 12
(4,939 Views)
Sounds interesting. I'm not creating control points, so ActiveX calls work just fine except for device discovery. For that I ended up writing a dll and calling it from LabVIEW. The only thing I haven't been able to implement is events . . . not sure if a clean solution is out there for that. Thanks! Jason
0 Kudos
Message 3 of 12
(4,936 Views)

Hi Jason, update. Got discovery working ok, and this means that I can now control and recive UPNP info from devices on the network OK. Ypu are quite right about eventing though! Fortunately this is not my main concern at present. managed to get thsi working fro 7.1 (saved from 8.2) - but any further down the versions it will not work due to Multicast support (for UPNP discovery) not supported. I can let you know the details if you are interested on the discovery and control side.

PC.

0 Kudos
Message 4 of 12
(4,900 Views)
Paul, Yeah details would be great: if I could replace my dll with something native that would simplify maintenance. If it is easier you could email me at j_hiltnerNOSPAM@msn.com. Much appreciated! Jason
0 Kudos
Message 5 of 12
(4,896 Views)
Hi Jason, I have attached a .llb (V7.1) which should discover UPNP devices on the network. The ini file will need modified on the NI folder with the following line:
 
SocketSetReuseAddr=TRUE
 
Also, during development I would disable the Win XP firewall.
 
The vi is taken from NI's examples under networking with a couple of mods - nothing spectacular I'm afraid. After discovery you can use the NI web browser (specified IP and Port number for the device) and XML parser to extract the info from the xml files that each UPNP device holds. This should give you all the actions and variables required to control the device. I used TCP vi's for this action - the only pain was formatting the SOAP messages to the correct format.
 
Hope this may be of some help!
 
PC.
0 Kudos
Message 6 of 12
(4,886 Views)
Works great! Now I can discover devices and get the device xml. The only thing strange is that I have 2 ethernet interfaces loaded, and when both are active only devices connected to one responds. If I make the one that responds inactive, now I can discover devices connected through the other interface. Perhaps a port setting? Thanks again!! Jason
0 Kudos
Message 7 of 12
(4,878 Views)
Hi Jason, if you are using 8.2 you can select which device (network adapter) to send the UPNP search string out on. I'm sure by default it will broadcast on all devices if the control is left blank - it works for me using 100mb ethernet card and wireless 54mb on an isolated network - it finds all the UPNP devices on these two networks. Strange.
 
PC.
0 Kudos
Message 8 of 12
(4,857 Views)

Hi Paulc, I tried your llb program, probably have the same question as Jason, I only can find one UPNP device with UPNP DISCOVER Root Devices.vi,

actually i have other upnp device as you can see in the Intel SPY. Does it relate to the devices or ? Much appreciated! Eli

 

 

issue.JPG


"I think therefore I am"
0 Kudos
Message 9 of 12
(4,105 Views)

If I recall I have the TTL set to 1 (i.e. one net switch only). Are the other devices attached via more network switches?

 

Paul.

0 Kudos
Message 10 of 12
(3,986 Views)