NI Home > Community > NI Discussion Forums

LabVIEW

Reply
Member
guangdew1
Posts: 183
0 Kudos
Accepted Solution

How to test a network device using LabVIEW

I'm working on a project which needs to test some network devices with LabVIEW. The devices are from NetStreams, they are basically audio or video decoders. Audio or/and video signals are sent to the devices then they will decode the signal and send out audio or video signal.

 

My thought is that I'll connect the device to my computer using Ethernet cable, establish communications, then send the test audio or video signal to the device. Later, the decoded signal will be routed back to the computer for analyzing to decide whether the device is working properly.

 

Of course, there are a lot of difficulties need to overcome to achieve this. I will need some advices regarding how to achieve it.

 

At this point, I'm working on how to establish the communication. I know the MAC address of the device, how I can communicate with the device.

 

Any advice is welcomed, in general or specific.

 

Thanks in advance,

 

Member
Kevin_H.
Posts: 165
0 Kudos

Re: How to test a network device using LabVIEW

So I'd say the first place to start is to find out the communication protocol you're using. LabVIEW supports a bunch of different ones (take a look at the examples in the example finder at Help->Find Examples... for TCP and UDP in particular). Once you know that, you need to figure out if the data you're sending has to be encoded in some special way. It's going to take a lot of research to get it down, but the actual implementation has the possibility of being very easy if the device suppots some standard which labview also supports.

Member
guangdew1
Posts: 183
0 Kudos

Re: How to test a network device using LabVIEW

I think sending command and receiving response will be done by TCP and sending audio or video signals by UDP. My current problem is about how to establish the communication. My understanding is that the device has to obtain an IP address, then my computer can talk to it even though they are connected directly and I know the MAC address of the device. I did some research and this is my conclusion. I do hope my computer can assign a pre-determined IP address directly to the device, but I don't know whether there's way to do it. I tried a DHCP server which I downloaded online, which works but because I have to used the graphic user interface to operate it, I couldn't automate the process. I hope someone with this kind of knowledge can provide some advice or comment, thanks in advance.

Knight of NI
altenbach
Posts: 26,928

Re: How to test a network device using LabVIEW


guangdew1 wrote:

I know the MAC address of the device, how I can communicate with the device.


LabVIEW uses TCP/IP (TCP,UDP) for network communications, so the MAC address is not sufficient. You need an IP address. I assume the device has an IP address, either cofigured manually or obtained from a DHCP server).

 

Second, you need the detailed packet specifications (protocol, destination port(s), formatting of the packet payload, etc. down to the last bit) for both sent and received data. Is there extra communication (parameter exchange, authentication, etc.) involved?

 

Do you have all this information? (as a simple example of lowlevel communications, have a look at my example program to query a NTP time server)

 

Does the device use a well known protocol (ftp, http, etc.)? In this case you might be able to work with the datasocket tools.

 


LabVIEW Champion . Do more with less code and in less time .

Member
guangdew1
Posts: 183
0 Kudos

Re: How to test a network device using LabVIEW

altenbach,

 

Thank you for your response. I tried some new units and found that I don't need to assign IP address to the device, it will abtain IP address automatically without any kind of assigning by a DHCP server or a router. I'll move on to next step, to see how to send audio to the device, I'll contact the manufacturer for some advice.