10-24-2024 07:45 AM
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.
10-24-2024 10:08 AM - edited 10-24-2024 10:10 AM
@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.
10-24-2024 10:47 AM
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.
10-24-2024 11:55 AM - edited 10-24-2024 11:57 AM
@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!))
10-24-2024 02:31 PM - edited 10-24-2024 03:11 PM
@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.
10-24-2024 03:06 PM - edited 10-24-2024 03:08 PM
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 😄 )
10-25-2024 07:25 AM
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.
10-25-2024 02:08 PM
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.
10-25-2024 02:31 PM - edited 10-26-2024 04:04 PM
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?
10-27-2024 08:30 AM
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.