ZigbeeDeviceDataReceiveListener - can't find Routers?

Hi. I modified the dicoverdevices example provided by digi by passing a ZigbeeDeviceDataReceiveListener in MainApp.java.

It works great at finding my two Zigbee HA 1.2 thermostats. However, it will not pick up my GE Link Light. XCTU shows the thermostats as endoints and the light as a router. Any ideas on how to capture a router with ZigbeeDeviceDataReceiveListener? The code:

public static void main(String[] args) {
System.out.println(" Ā±------------------------------------------+ā€œ);
System.out.println(ā€ | XBee Java Library Discover Devices Sample |ā€œ);
System.out.println(ā€ Ā±------------------------------------------+
");

	// XBeeDevice myDevice = new XBeeDevice(PORT, BAUD_RATE);
            ZigBeeDevice myDevice = new ZigBeeDevice(PORT, BAUD_RATE);
	
	try {
		myDevice.open();
                    myDevice.addExplicitDataListener(new ZigbeeDeviceDataReceiveListener());
		
		//XBeeNetwork myXBeeNetwork = myDevice.getNetwork();
                    ZigBeeNetwork myXBeeNetwork = (ZigBeeNetwork) myDevice.getNetwork();
		
		myXBeeNetwork.setDiscoveryTimeout(15000);
		
		myXBeeNetwork.addDiscoveryListener(new MyDiscoveryListener());
		
		myXBeeNetwork.startDiscoveryProcess();

I sent an email over to the XCTU team to see if they can help. However, Iā€™m not sure what their policy is concerning helping end users. They will probably reply here if they are able to help.

Hi @ktomes. Iā€™m not sure if I understand your question. Why are you registering an Explicit Data Listener to discover remote devices? This listener only notifies you when the local module receives an explicit data message from other device of the network.

Anyway, the example as it comes by default should show you all the devices that are in the network, regardless of they are routers or end devices.

1 Like