03-22-2023 02:24 PM
I have an NI Linux RT PXI, with a UDP reference opened on IP 192.168.1.2 and port 6789.
The PXI sends a UDP broadcast to 255.255.255.255 which is received by the remote target. I know this because that target then responds with its own UDP broadcast to 255.255.255.255. Wireshark sees both these broadcast messages when connected to a hub which is connected to the two targets. The source addresses of those broadcasts correctly match each of the targets.
I never get the response broadcast at the UDP read on my PXI. What could cause this?
Solved! Go to Solution.
03-22-2023 03:09 PM
How did you connect the Linux RT PXI to the host PC? It is connected via a network hub? Did you connect only one or both of the ethernet ports on the PXI?
03-22-2023 05:16 PM
ZYOng,
I am working jointly on this project with blackburnite. The RT PXI is connected to the host PC directly through a separate ethernet cable. The hub only has three connections: an ethernet cable to a single port on a PXI Ethernet Interface card, ethernet cable to the remote target, and an ethernet cable to a standalone machine with the sole purpose of using Wireshark. We only use one of the ethernet ports on the controller of the PXI.
03-27-2023 02:25 PM
It appears to be a problem with how the Linux kernel handles binding ports and in-fact the "UDP Open" documentation specifically says if you assign an IP to the net address input, the UDP connection will be unable to receive broadcasts.
Why that works on Windows but not Linux again, seems to be with how the kernel routes packets to the interfaces and when you do a UDP open with a specific IP, it must bind the port you choose to only receive traffic send explicitly to that IP, even if it is in the correct subnet to theoretically receive a broadcast.