Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
derosafabrizio
Posts: 6
Registered: ‎12-04-2010
0
Accepted Solution

UDP DATAGRAMS BLOCKED WHEN WIRESHARK IS NOT CAPTURING

Hello everybody,

 

I want to send a stream of data from my STARTER KIT to my PC using UDP datagrams on wire.

I am using ISE WEB PACK and I created a VHDL code who is sending  UDPs. The UDPs are all the same length (UDP Payload 512 Bytes) , the bitrate is about 4 Megabit/sec and the local and remote ports are the same and constant for every datagram (I tried with 9090 and 49153).

 

When I capture the frames with wireshark they are exactly how I mean them to be and everything seams to work perfectly.

 

I wrote a java code that should read the datagram and, based on the data, should modify an Image that is repainted sometime on my monitor.

 

This java code works perfectly when I am capturing packets with wireshark, but if I turn off wireshark I am not able to get the packets.

 

I want to add :

A) I did not implement the FCS (crc) on the ethernet frames, but I guess if the computer MAC

    (I mean the controller) didn't like my frames even wireshark couldn't see them.

B) I did not implement anything else than UDP (no ARP)

 

 

I think it could be a firewall or antivirus matter (I have windows vista, windows firewall, avira antivir) since it is not something usual to receive such a stream of UDPs.

 

Now the questions are the following:

1)Did I say something wrong or incomplete?

2) Is there anything I can do on my PC to receive packets without having to lunch also wireshark?

3)Is there another protocol (possibly as simple as UDP) who can allow the transfer of data with a constant bit rate without causing the firewall to get angry?

4)Is there a smarter solution I completelly didn't think about?

 

Hope I am not out of theme for this forum.

 

Thanks

 

Fabrizio

 

 

Expert Contributor
joelby
Posts: 1,055
Registered: ‎10-05-2010
0

Re: UDP DATAGRAMS BLOCKED WHEN WIRESHARK IS NOT CAPTURING

Wireshark is probably putting your interface into promiscuous mode. Check that your UDP sender is sending to the correct IP address and MAC address for your PC.

 

I'm not sure it explains the problem you're seeing, but I've found that you DO need to have the correct Ethernet frame CRC or else some NICs will just drop the packet. Remember that Wireshark operates at a lower level than the user-space socket library. I think that the IP header checksum is also important (or else the operating system may drop the packet) but the UDP checksum is optional.

 

 

Visitor
derosafabrizio
Posts: 6
Registered: ‎12-04-2010
0

Re: UDP DATAGRAMS BLOCKED WHEN WIRESHARK IS NOT CAPTURING

i dont actually know the meaning of "promiscus mode" but i ll try to add the crc (it shouldn t be logic expensive). As for the ip chechsum, it is correct since it is always the same i copied from wireshark ( i had set it to 00 00 and wireshark says: bad checksum, it should be ## ## and i copy it). The checksum is a computation on the header that in my case doesnt change (always the same sender, receiver, length...). The udp checksum can be set to all 0 and so it is in my case. this are the reasons made me chose UDP: no logic at all!!!
MAC and IP addresses are correct.

I will let you know if i succed adding the crc.

thank you for your advice.

P.S. sorry for mistakes i am typing on the mobile.
Expert Contributor
joelby
Posts: 1,055
Registered: ‎10-05-2010
0

Re: UDP DATAGRAMS BLOCKED WHEN WIRESHARK IS NOT CAPTURING

Normally a computer's network card will ignore packets sent to machines with a different MAC address. Promiscuous mode will cause it to pass all frames appearing on the wire to the operating system. This is why I recommend checking that the destination MAC address of the packet you're sending actually matches that of your computer's network card.

Visitor
derosafabrizio
Posts: 6
Registered: ‎12-04-2010
0

Re: UDP DATAGRAMS BLOCKED WHEN WIRESHARK IS NOT CAPTURING

Thank you joelby,

the problem was the absence of the fcs.

 

Wireshark was setting the NIC in "promiscuous mode", causing all frames to pass, even without FCS.

 

Once I added the crc control at the end of the frame, I could see the frames with wireshark also in "non promiscuous mode" (capture options) and everything started to work as I expected.

 

Fabrizio