Hello.

I am a hardware test engineer. I have a DUT (device under test) connected to my PC via third party USB to SPI bridge. They provided me with native C library for this bridge and it is not bad as a starting point. I've implemented .Net wrapper and can control my device. The problem is that this library is very limited in functionality so I need to create another one.
I got instruction from them:

You have to develop some sort of application which uses UDP sockets.
In that application you must open socket to:
UDP Port : 4345
IP: 192.168.137.1
I've made simple program to send and receive data to and from my DUT:

IPEndPoint endPOint = new IPEndPoint(IPAddress.Parse("192.168.137.1"), 4345);
Socket server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
server.ReceiveTimeout = 10000;
try
{
byte[] data = new byte[] { 0x04, 0xf0, 0xff, 0xff, 0x55, 0x00, 0x00, 0x00, 0x00 };
server.SendTo(data, endPOint);
EndPoint sender = (EndPoint)endPOint;
int count = 0;
server.ReceiveFrom(data, ref sender);
}
catch (SocketException ex)
{
Console.WriteLine(ex.Message);
}
finally
{
server.Close();
}

I can send command to the device but can not catch any response. Network analyzer shows the next:

192.168.137.2 => 192.168.137.1 (Len 37) UDP: port 4238 => 4345 Generic Data
192.168.137.1 => 192.168.137.2 (Len 37) UDP: port 4345 => 4345 Generic Data
192.168.137.1 => 192.168.137.2 (Len 50) UDP: port 4345 => 4345 Generic Data
First line is "RESEST" command to my DUT, second one is DUT request for firmware upload and third is DUT "BOOTING" report. I have to wait this report to start DUT configuration and testing. I can not catch it. server. ReceiveFrom(data, ref sender) method ends with Timeout Exception.
Network programming is new for me so I would be very appreciated for any help.
Thanks.

PS.
I've tried this example:
http://social.msdn.microsoft.com/For...-d8980867753a/

It meant to be a classic UPD test. But it doesn't work. I just copied code. In this example

recv = s.ReceiveFrom(data, ref Remote);

throws a "An existing connection was forcibly closed by the remote host UDP" exception.