02-29-2012 11:55 AM
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.
Solved! Go to Solution.
02-29-2012 02:26 PM
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.
02-29-2012 03:10 PM
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.
02-29-2012 03:13 PM
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.
03-08-2012 03:11 AM
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.