range extension through packet relaying?

Hello. I’m considering applying XBEE to control a switch in every room in a hotel.
The idea is to have a command panel in one end of a hall and switches in every room.
The problem is that from one end of the hall to the other, it may exceed XBEE’s indoor range capabilities. So I need to know if it is possible to have the XBEEs relay the packets to other modules that are outside the coordinator’s range but are in their own range.
Is it at all doable?
Is this how peer-to-peer mode works?
Do I need a separate microcontroller to coordinate this?

Every tutorial and video I found only deals with two modules talking to each other and the datasheet does not provide examples like this.

Hi Jokogarcia,

You should look at Digimesh Xbee modules. They will have the routing ability you need. You won’t need extra microcontrollers, at least not for that feature.

A warning however: for every hop your data must take, that will reduce the effective datarate by something around half (very rough estimate).