That didn't fix it, I even went up to 30 seconds, same problem. the original program I had initialized them on startup then the user manually triggered the whoIs so there was usually a substantial delay between initialisation and broadcast anyway. I also tried this:
System.out.println("Creating Device");
localDevice = new LocalDevice(1234, new Transport(new MstpNetwork(new MasterNode(params,(byte) 0x01,1))));
try
{
System.out.println("Initilising");
localDevice.initialize();
Thread.sleep(10000);
localDevice.getEventHandler().addListener(new Listener());
for(int i=1; i<=20;i++)
{
localDevice.sendGlobalBroadcast(new WhoIsRequest());
System.out.println("Broadcast "+i);
Thread.sleep(20000);
}
System.out.println("Done");
}
finally
{
localDevice.terminate();
}
And got the following:
Loading Params
Creating Device
Initilising
Broadcast 1
Broadcast 2
Broadcast 3
Broadcast 4
Broadcast 5
Broadcast 6
Broadcast 7
Broadcast 8
Broadcast 9
Broadcast 10
Broadcast 11
Broadcast 12
IAm received from RemoteDevice(instanceNumber=9999, address=Address [networkNumber=0, macAddress=[7]], linkServiceAddress=null)
Broadcast 13
Broadcast 14
Broadcast 15
IAm received from RemoteDevice(instanceNumber=9999, address=Address [networkNumber=0, macAddress=[7]], linkServiceAddress=null)
Broadcast 16
Broadcast 17
Broadcast 18
Broadcast 19
Broadcast 20
Done
I then did the same, but changed the mac address about 5 seconds before each broadcast and got the following:
Loading Params
Creating Device
Initilising
Broadcast 1
Broadcast 2
Broadcast 3
IAm received from RemoteDevice(instanceNumber=9999, address=Address [networkNumber=0, macAddress=[9]], linkServiceAddress=null)
Broadcast 4
Broadcast 5
Broadcast 6
IAm received from RemoteDevice(instanceNumber=9999, address=Address [networkNumber=0, macAddress=[15]], linkServiceAddress=null)
Broadcast 7
Broadcast 8
Broadcast 9
IAm received from RemoteDevice(instanceNumber=9999, address=Address [networkNumber=0, macAddress=[11]], linkServiceAddress=null)
Broadcast 10
Broadcast 11
Broadcast 12
Broadcast 13
IAm received from RemoteDevice(instanceNumber=9999, address=Address [networkNumber=0, macAddress=[f]], linkServiceAddress=null)
Broadcast 14
Broadcast 15
Broadcast 16
Broadcast 17
Broadcast 18
Broadcast 19
IAm received from RemoteDevice(instanceNumber=9999, address=Address [networkNumber=0, macAddress=**], linkServiceAddress=null)
Broadcast 20
Done