LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

UDP packets with LabVIEW

Hello everyone,

I am working on a project where data are transferred from a FPGA board to a PC using the Ethernet cable. Ethernet data are sent using IP packets of protocol UDP. In the first stage of this project I am sending single UDP packets (generated by the FPGA) to the PC to be read and saved to the hard disk. I am sure the FPGA generates the UDP packets correctly since they are correctly displayed using Wireshark. However, when I try to use LabVIEW to acquire the UDP packets (with the simple program whose schematic is in the attached PDF file) I receive nothing. Even if I use the NI example Simple UDP - Receiver.vi, I can not receive the packets.

Can anyone help me to solve the problem?

Thanks.

 

0 Kudos
Message 1 of 18
(349 Views)

@Marco73it wrote:

(with the simple program whose schematic is in the attached PDF file)


There is nothing attached.

(The "schematic" of a VI is typically the VI itself. Converting it to a picture in a pdf file is not useful. So please attach your VI)

 

Also check your firewall rules.

0 Kudos
Message 2 of 18
(319 Views)

Please, find the attached LabVIEW file. Regarding the firewall rules, I do not think it is the problem since the packets generated by the FPGA are correctly received and displayed by Wireshark.

0 Kudos
Message 3 of 18
(302 Views)

@Marco73it wrote:

Regarding the firewall rules, I do not think it is the problem since the packets generated by the FPGA are correctly received and displayed by Wireshark.


Wireshark intercepts before the firewall rules are applied, else it would be quite an useless tool.

 

Can you show a wireshark view of a typical packet?

 

I don't understand your VI. Why isn't there a toplevel loop? Why does the port default to zero? What port are you using? The wiring suggest that this is a subVI, but there are no connectors defined. I assume you are not running this is "continuous run" mode, right?

 

 

(... and why are diagram and front panel maximized to the screen (annoying!)) 

0 Kudos
Message 4 of 18
(289 Views)

@Marco73it wrote:

Hello everyone,

I am working on a project where data are transferred from a FPGA board to a PC using the Ethernet cable. Ethernet data are sent using IP packets of protocol UDP. In the first stage of this project I am sending single UDP packets (generated by the FPGA) to the PC to be read and saved to the hard disk. I am sure the FPGA generates the UDP packets correctly since they are correctly displayed using Wireshark. However, when I try to use LabVIEW to acquire the UDP packets (with the simple program whose schematic is in the attached PDF file) I receive nothing. Even if I use the NI example Simple UDP - Receiver.vi, I can not receive the packets.

Can anyone help me to solve the problem?

Thanks.

 


Which FPGA board?

 

NI FPGA boards (even those with physical network interfaces such as 6591/2/3/4, 7902, 7903) do not have network drivers so the OS will not see them as network cards.  The LabVIEW for desktop UDP works with network interfaces that are recognized by the OS.


Certified LabVIEW Architect, Certified Professional Instructor
ALE Consultants

Introduction to LabVIEW FPGA for RF, Radar, and Electronic Warfare Applications
0 Kudos
Message 5 of 18
(276 Views)

 

 

Deep down, everything is just electrons and voltages* and I think with enough effort creating a UDP packet and put it on a wire should be possible with just plain IO tools. I was under the impression this is happening here, especially since wireshark can actually see it.

 

*(of course there are many exceptions  😄 )

0 Kudos
Message 6 of 18
(268 Views)

Wireshark_packet.png

Here is the screenshot of the UDP packet data acquired by Wireshark. I tried to disable the PC firewall but the result is the same. The FPGA board used to generate the packet is a Genesys 2 by Digilent. I tried to acquire the UDP packet also using the NI example "Simple UDP" but the result is the same.

0 Kudos
Message 7 of 18
(226 Views)

I can’t look at the VI as I don’t have a PC but if your board sends to port number 56 you should likely try to program your VI to use that port too. LabVIEW is not a promiscuous network sniffer that gets any packets on the wire but only on address (ranges) and ports you program.

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 18
(209 Views)

Your FPGA and computer seem to be on different networks and the packet is sent to the ethernet broadcast address (FFFFFFFFFFFF) with a APIPA destination address. This means that wireshark will see it even if the destination IP does not match the local interface. 

 

Can you describe your network topology? Are there any routers in-between the devices ? Why is the IP address of the computer an APIPA address (169.254..). Is that really correct?

 

 

0 Kudos
Message 9 of 18
(205 Views)

The FPGA board is connected directly to the PC using an ethernet cable, without any router in the middle. The IP destination address of the packet is the same as the IP address of the PC.

0 Kudos
Message 10 of 18
(168 Views)