Will a moving XBee end device automatically rejoin after lost connection?

Hi all,

I have some XBee S2C modules (XBP24CZ7WIT-004, all connected to Arduino’s) with which I want to make the following set-up:

  • 1 coordinator and a number of routers controlling certain areas in a big hall. All set up so they can talk with each other (are in range of 1 neighbour at least).
  • A number of moving end devices (let’s say 20 - 40) moving around in the hall. Sometimes they will be in range of one of the routers, a bit later not anymore but in range of another router.

The end devices will have a list stored of the routers & coordinator. At a certain moment of choice I want them to send a message (using API 2) to one of the routers, irrespective of where they are now (possibly with another one as a parent) and receive an answer from this router.

So my questions:

  1. The end devices will have to do “roaming” between routers. Once they lose connection to a router they automatically have to search for another router or coordinator to connect to. In other words, I think, they will have to rejoin the PAN once they lose connection, and then just select the best node in the PAN as new parent. Will this happen automatically out of the box? Or do I need some setup? Or do I need to monitor for a Modem Status message in my Arduino telling it that connection has been lost and then specifically send a rejoin API message to the XBee? I hope this wouldn’t be necessary, to minimize the load on the Arduino.

  2. After rejoin, be it fully automatically or by an API message from the Arduino, will the routing tables be adjusted in the routers? In other words, will responses to the end device still get to their destination? Fully automatic, without any action from my Arduino software?

I would have thought that an answer to this would be readily available somewhere but it seems I keep searching on the wrong search terms. I just can’t seem to find it.

Kind regards,
Davy Van Rossem

End Devices will automatically rejoin to a new parent on the network when they can no longer communicate with the old parent. You don’t need to do anything special while in operation.

The ATSN/ATSP registers control how frequently an End Device will wake up and check-in with its parent. More frequent check-in means quicker detection of lost parent. You may see TX failures while waiting for the XBee to figure out its parent is lost and complete rejoin to a new parent.

Likewise the routers have to keep track of all their children. They have a limited number of slots. If the table is full the router can’t accept a new child and a rejoin could fail. Ihe ATSN/ATSP registers control how quickly a child entry will be expired to make room for a new child.

You can read the XBee manual for more details on these registers and how they are used to compute the varying timeouts (end device going into rejoin, route expiring a child entry).

As to routing, that is all handled by the XBee. You may have some temporary failures as old routes fail but should resolve quickly.

Thanks a lot for the elaborate answer! Exactly the info I needed :slight_smile: