Using the trial of RealSoftware I am trying to create an application that sends broadcast UDP message to check for available devices on a network.
This works fine as long as devices are in the same range. But somehow the DataAvailable event does not fire for data from other IP ranges.
netIf = System.GetNetworkInterface(cboInterfaces.ListIndex)
UDPSocket1.NetworkInterface = netIf
UDPSocket1.Port = 30718
UDPSocket1.Write(UDPSocket1.BroadcastAddress, DecodeHex("00") + DecodeHex("00") + DecodeHex("00") + DecodeHex("F6"))
data = UDPSocket1.Read()
txtLog.AppendText(data.Address + Chr(13))
Connection directly from my PC to the device:
Sending from 169.254.4.255 to 255.255.255.255
I only receive the echo from 169.254.4.255 in RealSoftware
Wireshark however does show the response from the device: 192.168.5.253 to 169.254.4.255
Tested this with other applications, they do receive the device message in this configuration.
If i put my PC in the network and the device in the same network it works as expected, however I need this application to find unkown devices to be able to give them an IP address.
Please help.. If this works I'll certainly buy the pro version.