*8.1. Experimental Setup*

The experiments were carried out using two customised sensor boards designed by our group. To collect the RSSI fingerprint, the XBee wireless technology-based XBee S1

802.15.4 module was used as the radio in the first sensor board, as shown in Figure 9a, which was employed both in the RNs and wearable devices. To acquire the acceleration and angular velocity data, the second sensor board was used as part of the wearable node. This sensor board is equipped with IMU and BLE, as well as some environmental sensors, as shown in Figure 9b. The RNs were attached to the ceiling, as shown in Figure 9c. The wearable sensor boards were attached to a subject's chest and fastened by an elastic strap, as presented in Figure 9d. A computer connected with an XBee module acted as a server that collected and stored both the RSSI fingerprint data through XBee and IMU data through BLE. In the case of the indoor localisation, the data collected from both the devices were synchronised by using the timestamps and stored on a database for further processing.

#### *8.2. Evaluation of Motion Mode Detection*
