## 1 Introduction  
With the increasing technological advances of Micro-Electro-Mechanical devices [1], including its processing and storing capabilities, Wireless Sensor Networks (WSN) have become an attractive technology to deploy wide-scale applications, such as: environmental monitoring, precision agriculture, smart buildings and cities, industrial automation and military [2, 3]. WSNs are special wireless _ad hoc_ networks composed of a large number of low-power, low-cost and low-rate devices, which are capable of sensing, processing and sending information related to environment variables [4]. This type of network may also be able to actuate over the monitored environment, through the use of special devices called actuators. The increasing demand for WSN-based applications is driving the need for new design approaches, able to deal with WSN specific requirements, such as energy-efficient operation, wide-scale deployments and time-sensitive approaches. IEEE (Institute of Electrical and Electronics Engineers) 802.15.4 standard [5] and ZigBee specification [6] define the most widely used protocols to deploy WSNs. On the one hand, IEEE 802.15.4 standard defines the Physical layer and Medium Access Control (MAC) sublayer for Low-Rate Wireless Personal Area Network (LR-WPAN) applications. On the other hand, ZigBee specifies the upper layers (Network and Application) for the IEEE 802.15.4 protocol stack. Basically, this set of documents defines two types of devices: Full-Function Devices (FFD) and Reduced-Function Devices (RFD). While RFDs perform only a reduced set of functions such as channel scanning, network association requests and sensing activities, FFDs can also perform more complex functions, such as PAN and cluster coordination, routing, forwarding, and packet aggregation or fusion. Depending on the application requirements, an IEEE 802.15.4 network can operate according to two topologies: star and peer-to-peer. The star topology is the simplest network organisation, where all sensing nodes are directly connected to the PAN coordinator. This PAN coordinator is a unique node, that is responsible for all management and communication activities (centralised communication paradigm). Although being easy to build and manage, the weakness of this topology is that its coverage is limited by the sensing range of its nodes, which prevents wide-scale deployments. In peer-to-peer topologies, any device may directly communicate with any other device, as long as they are in the communication range of each other. This topology allows more complex network formations, such as cluster-tree and mesh topologies. Mesh topologies provide higher network flexibility and lower complexity, high routing redundancy and good network coverage [7]. However, it does not provide explicit mechanisms allowing nodes to enter in low power mode [8; 9], decreasing the network lifetime. These characteristics are not desirable for typical WSN-based monitoring applications, which impose strict requirements regarding the power consumption of sensor nodes. In order to overcome this weakness, the IEEE 802.15.4/ ZigBee set of specifications also provides the cluster-tree topology--a special peer-to-peer topology. Cluster-tree is one of the most suitable topologies to deploy wide-scale WSNs [10]. In the cluster-tree topology, nodes are grouped into clusters and coordinated by a unique FFD node called cluster-head (the PAN coordinator is a specific case of a cluster-head). Cluster-heads are responsible for association, synchronisation and communication of their child nodes. In order to provide scalability, clusters are interconnected through their coordinators building a hierarchical network structure. Nevertheless, the efficient operation of cluster-tree topologies requires the consideration of some relevant design issues, such as: network formation [11; 12], beacon scheduling [13; 14], and MAC protocol configuration issues [15; 16; 17; 18], including those related to the medium access protocol and the definition of communication structures.