Hi,
the UdpClient.Send method expects an array of byte to send, so the line
pRet = udpClient.Send("0x01 0x25 0xFA", 3)
needs to be replaced with
pRet = udpClient.Send(new byte[] {0x01, 0x25, 0xFA}, 3)
Please be aware, that this is c# code, not vb, so you have to adjust it.
FYI, here is some c# code which you can use to send:
using (Socket sock = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp))
{
IPEndPoint endPoint = new IPEndPoint(IPAddress.Parse("10.10.10.2"), 11000);
sock.SendTo(new byte[] { 0x01, 0x25, 0xFA }, 0, 3, SocketFlags.None, endPoint);
}
Or:
UdpClient udpClient = new UdpClient(11000);
udpClient.Connect(IPAddress.Parse("10.10.10.2"), 11000);
udpClient.Send(new byte[] { 0x01, 0x25, 0xFA }, 3);
udpClient.Close();
Hope this helps,
Thomas.