Machine Vision

Showing results for 
Search instead for 
Did you mean: 

How can I know my Smart Camera IP using UDP or other way?

How can I know my Smart Camera IP using UDP or other way?

I am using NI smart camera 1772 and VBAI 2012. Also I am communicating with the camera from my network based application (VB6) via TCP commands.
My problem that I need to knew what the smart camera IP on the network without using VBAI2012 or NI Measurement and Automation.

I mean I want to use only my application to detect and communicate with a free run smart camera (like the NI Measurement and Automation detection). I do not want to rely on a preconfigured fix IP address.

I read an article under Knowledge Base -> about
TCP/UDP 3580 port that used as nati-svrloc (NAT-ServiceLocator). used by Measurement & Automation Explorer to locate remote targets.
How can I use this UDP port to locate my smart camera on network? I just want to know what the message that I suppose to broadcast to let the smart camera to send me back its IP.

0 Kudos
Message 1 of 5

Re: How can I know my Smart Camera IP using UDP or other way?

You can just ping the Smart Camera using its host name. The host name can be found in MAX under Remote Systems. That host name should not change. For example, if I go into Windows command line and type in "ping MySmartCamera," I'll get ping information and an IP address just like if I type "ping" You can build this into your VB code.

Ravi A.
National Instruments | Applications Engineer
0 Kudos
Message 2 of 5

Re: How can I know my Smart Camera IP using UDP or other way?



Thank you for your help, but unfortunately it is not working.

My cam name is "ninew”. I typed    :     ping ninew    and I got      “ping request could not find host ninew. Please check the name and try again.”


Please help me

0 Kudos
Message 3 of 5

Re: How can I know my Smart Camera IP using UDP or other way?

Hi M Younis,


Did you use the Host Name or the DNS name? Please make sure to use the full name when running the ping command. Also, have you tried to access the IP address from the DNS host name through a Microsoft VB command, such as the one found here?  Please let me know if this helps.



Kira T

0 Kudos
Message 4 of 5

Re: How can I know my Smart Camera IP using UDP or other way?

The mechanism of trying to resolve it through your centralized DNS server will only work if the record is either added manually to your network's DNS server or is done automatically by your DHCP server when it gets an address (this is how NI's internel network is configured, which is why I think our application engineers are suggesting it because it works here).


There's a few various ways to discover your device...


- In the past, NI used an propeitrary broadcast UDP protocol to discover any real-time targets (including Smart Cameras). I don't believe the protocol is externally documented, but you could use it in LabVIEW code with some VIs on the LabVIEW palette. Some simple packet captures could probably let you reverse engineer it enough to send the packets in your own code. At some point this protocol will no longer be supported by future software/devices.


- Newer versions of LabVIEW RT use a different mechanism based on the standard multicast DNS mechanism. Again, the specifics of how NI makes use of it are generally not documented. The official mechanism to access this is via the System Configuration API (see I know they have a VB .NET interface that you could use to discover any NI devices (note that this doesn't directly filter out targets running Vision Builder AI)


- If you don't want to discover devices but rather just resolve an IP address of a known device on the same network, one option might be to make use of the way multicast DNS can be used for name resolution. On a Windows machine that has the various NI software installed, the multicast DNS resolver software that is installed hooks into the name resolution services used by windows and allows you to resolve multicast DNS names without them being present on a centralized DNS server. The key is to append ".local" to the DNS name to resolve. For instance "ping NI-NI1772C-XXXXXX.local" might work.


Hope this helps,




0 Kudos
Message 5 of 5