Broadcasting a WhoIsRequest to find remote devices (device scan) seems not to be very reliable. During tests, devices have only been found randomly. Another way to find a specific device (with known remote device identifier and IP address) is to use the findRemoteDevice() method:
String remoteDeviceIpAddress = "10.78.20.115";
int remoteDeviceIdentifier = 2138113;
RemoteDevice remoteDevice = localDevice.findRemoteDevice(IpNetworkUtils.toAddress(remoteDeviceIpAddress, port), remoteDeviceIdentifier);
This method seems to be more reliable. In tests, the method always returned the remote device. Therefore, the device identifier as well as the IP address of the remote device should be stored in the OpenMUC device settings string. When loading a configuration, the specific remote device should be obtained using the findRemoteDevice() method.
RFC
Broadcasting a
WhoIsRequestto find remote devices (device scan) seems not to be very reliable. During tests, devices have only been found randomly. Another way to find a specific device (with known remote device identifier and IP address) is to use thefindRemoteDevice()method:This method seems to be more reliable. In tests, the method always returned the remote device. Therefore, the device identifier as well as the IP address of the remote device should be stored in the OpenMUC device settings string. When loading a configuration, the specific remote device should be obtained using the
findRemoteDevice()method.RFC