## 8 Conclusions  
Configuring the ZigBee stack to work optimally in an HA environment is not a trivial task. The ZigBee base specification and the ZigBee HA profile apply restrictions on the stack configuration. However, no indications for performance-aware configuration are included in these documents. Furthermore, a holistic performance evaluation of the ZigBee protocol stack, the influence of settings from each layer on the performance prevailing, is not available in the literature. \begin{table}
\begin{tabular}{|c|c c|c c|c c|} \hline  & \multicolumn{2}{c|}{Basic} & \multicolumn{2}{c|}{Dumbbell} & \multicolumn{2}{c|}{Square} \\ \cline{2-7}  & Compl. & Unrestr. & Compl. & Unrestr. & Compl. & Unrestr. \\ \hline PDR & +0.8\% & +1\% & +0.4\% & +0.3\% & +0.2\% & +0.1\% \\ Delay & -47.7\% & -49.1\% & -24.7\% & -21.8\% & -27\% & -30\% \\ Energy Efficiency & +37\% & +36.5\% & +12.2\% & +12.5\% & +11.1\% & +15.7\% \\ \hline \end{tabular}
\end{table} 
Table 6: Performance improvements achieved by the recommended stack configurations over the default ZigBee stack configuration for different topologies (increased transmission power, high traffic scale). \begin{table}
\begin{tabular}{|c|c c|c c|c c|} \hline  & \multicolumn{2}{c|}{Basic} & \multicolumn{2}{c|}{Dumbbell} & \multicolumn{2}{c|}{Square} \\ \cline{2-7}  & Compl. & Unrestr. & Compl. & Unrestr. & Compl. & Unrestr. \\ \hline PDR & 31.5\% & 33.6\% & 2.7\% & 2.8\% & 19.2\% & 24.8\% \\ Delay & -55.3\% & -61.9\% & -32.4\% & -32\% & -39\% & -47.8\% \\ Energy Efficiency & +21.4\% & +28\% & +23.9\% & +22.8\% & +16.4\% & +19.5\% \\ \hline \end{tabular}
\end{table} 
Table 5: Performance improvements achieved by the recommended stack configurations over the default ZigBee stack configuration for different topologies (default transmission power, high traffic scale). Several WHAN scenarios with different topologies, traffic loads and node roles were defined and implemented in a real testbed to carry out experiments with a large variety of communication protocol stack configurations. The evaluation of these scenarios has shown that the mechanisms and the configuration parameters from different layers of the ZigBee specification can have a significant effect on the overall network performance. At the MAC layer, the measurements that are carried out with different maxima of MAC layer retransmissions show the importance of one-hop reliability for overall network performance. The findings show that increasing this limit greatly improves the performance, especially as the traffic scale increases. Surpassing the limitations defined by ZigBee for the allowed amount of retransmissions may even lead to better results, although, eventually, a point is reached where performance saturates or even degrades due to congestion. The evaluations also showed that there is an important cross layer effect between the maximum amount of MAC layer retransmissions and the behavior of the link break detection mechanism of the NWK layer. A higher LDR, obtained by increasing the allowed number of MAC layer retransmissions, reduces the amount of route repairs, which are initiated after a data frame transmission failure. As a consequence, control message overhead and congestion decrease. Therefore, we suggest to increase the default setting of maximum MAC layer transmissions and its allowed value range. For the routing metric as part of the NWK layer routing mechanism, the ZigBee specification leaves the implementation of a link cost algorithm to the user. It has been shown that the metric of a default ZigBee stack, as implemented in the widely used BeeStack, or constant link costs (HC metric) do not result in the best performance. As the specification suggests, a mapping from LQI to LDR is recommendable and can lead to a noticeable improvement in the performance. The PLF metric achieves this by using a medium-level granularity mapping that provides sufficient link quality-awareness and, at the same time, a good path diversity.