## 4 Experimental Set Up, Test and Results
### Layer 1-2 Tests  
In order to verify the overall functionality and seek better performance of the ZigBee network some tests have been performed. As said, some tests were performed at the Electric and Electronic Laboratory Measurements of \"Roma Tre\" University while others were performed in the real scenario for overall two months. In order to validate the choice to use ZigBee technology, the first test aimed to verify the behavior of the ZigBee transmitters/receivers under variable real-life conditions: clear weather, rain, proximity of electrical or electronic devices possibly interfering with the transmission (such as a Wi-Fi Access Points), the second aimed to confirm the reliability of the communication in the real scenario. The first tests were performed both outdoors, considering one or more obstacles like trees or hills, and indoors, considering one or more walls between the transmitter and the receiver. All tests were carried out using the Standard XBee modules with patch antenna, which is the hardware used in the sensor card, while the X-CTU software, provided by Digi-MaxStream, has been used as test program. 100,000 transmission tests were carried out for each case, using an appropriate adapter to simulate the retransmission. X-CTU tool, using a terminal connected to an XBee module, sends a packet through the network and verifies that the data are correctly returned back from the XBee module which has received the packet. The obtained results, using the minimum transmission power available, are very satisfactory: all packets arrive to their destination and are correctly returned, obtained an average reliability up to 99.95%. Table 4 shows the results of the ZigBee communication reliability tests. \begin{table}
\begin{tabular}{c c c c c} \hline \multicolumn{4}{c}{**XBee Standard—Patch Antenna—Outdoors**} \\ \hline  & \multicolumn{2}{c}{Sunny} & \multicolumn{2}{c}{Rainy} \\ \cline{2-5}  & 50 m & 100 m & 50 m & 100 m \\ \hline No obstacles & 100\% & 99.99\% & 99.98\% & 99.97\% \\ Tree & 99.97\% & 99.96\% & 99.98\% & 99.96\% \\ \hline \multicolumn{4}{c}{**XBee Standard—Patch Antenna—Indoors—more than 10 m from WiFi AP**} \\ \hline
1 Wall & 2 Walls & 3 Walls \\
100\% & 99.98\% & 99.96\% \\ \hline \multicolumn{4}{c}{**XBee Standard—Indoors—5 m from WiFi AP**} \\ \hline
1 Wall & 2 Walls & 3 Walls \\
99.98\% & 99.88\% & 99.96\% \\ \hline \end{tabular}
\end{table} 
Table 4: ZigBee reliability tests. The first test inside the church has been strongly conditioned from the location of the fresco: the hub has been placed at about 3 m in front of the fresco inside the chapel, while the sensor cards were placed very close to the fresco. Considering the short distance in perfect line of sight between the sensor cards and hub, the communication test, always realized by the previously described procedure, gave us 100% of reliability. More interesting were the tests to verify the maximum allowable distance between the hub and the sensor cards considering that, inside the church, there are two rows of five columns each and the maximum usable diagonal distance is approximately 27 m. Even in this case, the transmission tests gave us a correct messages reliability equal to 100%. Putting the hub outside the church, we registered a quickly decrease in the ability to recognize the signal, in fact, just 5 m from the fa qade of the church (about 33 m the distance between the hub and the sensor cards) the hub is unable to correctly receive the sent data. Once verified the reliability of the ZigBee communication technology for our aims, we tested the acquisition cards in the field for two months to verify the overall reliability of the Layers 1-2. To accelerate the test phase we stressed the sensor cards fixing the sending time to once every minute. The acquired data were constantly sent to the hub and no strange values were memorized. Other tests aimed to verify the behavior of the system if some faults were simulated.