# Bluetooth Low Power Modes Applied to the Data Transportation Network in Home Automation Systems
## 4 Methodology  
The tests were performed in the test bench deployed in the laboratory of the research group, and the nodes were spread in the laboratory and the corridor nearby. First, a key point was checked, i.e., the medium range distances considered in the next tests would have no significant influence in the latency of the communication. Then, the methodology to analyze the performance of master-slave gateways in scatterers described in [40] was applied. Furthermore, the proprietary middleware in the nodes of the test bed included not only the specific values to define some of the parameters for the low power modes under test, but also the one to operate with the Basic Data Rate. Moreover, the way to interconnect the nodes during the tests for the case of four hops in the communication is shown in Figure 3. A computer was connected to the end nodes, i.e., the first and last ones of the network. The DS, the NW tester and the addressed node emulator (ANE) functionalities were built-in the same computer and, hence, they were synchronized. As a result, not only the time that the data packets took hopping from master to slave nodes could be measured, but also the time taken from slave to master nodes. Figure 3: Example of multi-hop network deployment for a home automation solution. Figure 2: Photograph of one of the implemented Bluetooth nodes. Then, the NW tester functionality sends ping type data packets to the last node of the wireless test network, i.e., node N6 in Figure 3, and the intermediate nodes receive the packets, process and resend them towards the addressed node. The ANE functionality in the computer receives the ping packet, logs the reception moment and sends the answer packet while logging the transmission moment. The answer consists of a pingback type data packet that flows along the network, going from slave to master nodes of the piconets and, finally, it reaches the computer connected to the first node of the network. The DS functionality included in the computer logs the reception moment of the pingback packet. Therefore, each ping packet went hopping from node to node until it reached the destination node, and the pingback packets went back to the source node following the same path. The next ping packets were sent right after the pingback packet reached the source node. This way, the ping packets were sent randomly because the sending interval was defined by the latency of the network, which turned to show some variability in the tests. The latencies for both the ping packets (master-to-slave communication) and the pingback packets (slave-to-master) are obtained through the calculation of the differences between the logs in both ends of the network. Moreover, since the communication follows the TDM scheme, both the ping and pingback packets fit in a time slot defined in the Bluetooth standard (625 \(\upmu\)s) [14]. The tests were repeated numerous times (in total, 12,775 samples were taken in the park mode and 10,828 samples in the sniff mode). Then, once the whole set of samples is acquired, it was analyzed following the next steps. First, the set of latency samples was depicted, as shown in Figure 4a for the case of sending ping data-packets through from 2 to 5 hops while operating in the sniff mode with 2 s of inactivity interval. There, some subseries of samples can be identified, as shown with the red square in Figure 4a. They correspond to the latency in the communication through some specific amount of hops. Next, the histograms of the samples for different amount of hops were depicted, as shown in Figure 4b, where the subseries of samples are identified with higher definition. For instance, the black triangle points out the same subseries in both representations (Figure 4a,b). Other subseries are identified in Figure 4b with white triangles. Then, the average value of the subseries is extracted for each one of the tests and such values are summarized into a data table, which are detailed in Section 5.