How to force xbee s2 end device to select a particular parent using API mode?

Hi,

Actually I want to implement XMesh protocol with XBee Series 2 modules.
I am implementing this protocol with 1 coordinator, 2 routers and 2 end devices.
According to this protocol, an end device should select its parent based on linkcost(linkcost = 1/(linkquality)).
This linkquality is measured by sending some messages(expected messages) to the 2 routers from 2 end devices. From the transmit status response I can count received messages using API mode arduino XBee library
(linkquality=(received messages)/(expected messages)).
These end devices each should select the one parent node among two routers.

But the problem here is XBee Series 2 modules are already having inbuilt protocol which is forming adhoc network on the fly. End devices are also choosing parent based on the whichever router provides best network coverage on the spot.

So how can i force end devices to select a particular router as its parent based on the minimum linkcost (i explained it above) using API mode (I am using Arduino XBee library) ?

Below is my network diagram…

XMesh network formation…

BS-> Base station (Coordinator)

0,1-> routers

2,3-> end devices

You can’t. The Zigbee protocol will over ride anything you try externally. You see in Zigbee it is the parent that determines joining and not the end device child.

Hi mvut,
Thanks for the reply.
According to your explanation “parent determines joining”…in the sense are you saying that based on the “node join (NJ)” parameter of parent, end devices will join the mesh?
If so Thats fine according to the XBee user manual…
Suppose if two routers are allowing end devices to join.
Let us assume we have one end device.
Then which router should be selected as the parent for this end device?
Based on signal strength? or link quality?
how that parameters(signal strength or link quality ) will be calculated ?

The End Device will pick a parent to join chosen from received Beacons. Depending on ATDO this will be either first response or best response . I believe that best response is determined through highest RSSI during the beacon and not an LQI value.