2

this is my first post in here. I have an embedded Ethernet PIC32 uC that is sending UDP packages on one specific port to my C# Program on my PC. With C# i want to grab this packages as follows:

 UdpClient udpClient = new UdpClient( 20011 );
 IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0);
        while (true)
        {
           byte[] content = udpClient.Receive(ref sender);
        }

A package looks like this (wireshark): Source: 192.168.1.38 Destination: 192.168.1.44 Protocol: UDP Length: 122 Source port: 1000 Destination port: 20011

The interesting part is, that everything works fine as long as the wire-shark software is running in background! As soon as I stop listening on wire-shark no more packages in c# where received.

Does anyone has an idea what is happening here?

Thanks for your answers Chris

3 Answers3

2

The problem was that the destination MAC Address was not resolved by the client correctly. Thanks for your hints

0

Is your machine really 192.168.1.44 ? If not, you are seeing the packets because wireshark puts the infterface in "promiscous" mode while it's running; if it resets the interface to normal mode, you don't see them anymore.

xtof pernod
  • 862
  • 5
  • 7
0

Do you have an entry in the Windows Firewall? Does it work if you disable Windows Firewall temporarily?

Richard
  • 29,854
  • 11
  • 77
  • 120