## Hardware and Measurement System
### Mesh Network  
A mesh network is used to build a flexible mobile ad hoc sensor network on site, which enables the user to reach every node in the mesh network by connecting to a dedicated node of choice. Furthermore, this approach allows for reaction to changing requirements prior and during measurement campaigns. The network quality between hard-to-reach measurement locations can be improved by strategically placing additional RPi nodes to act as a WiFi range extender with or without sensing functionality. The operating system is configured to generate a unique hostname and network IP address during system boot, using the unique MAC address of its on-board WiFi interface as a seed. Subsequently, the WiFi interface is configured to join a mesh network that is implemented using the open link state routing (OLSR) protocol [25]. The OLSR service floods neighboring nodes in regular intervals with routing information packets to discover the topology of the sensor network. All nodes keep the state of the topology as local entries in their own routing table. Unfortunately, to date it is not possible to connect to the mesh network directly with an unmodified Android smartphone due to the lack of ad hoc network modes. To bypass this limitation, the authors designed a mechanism to declare an arbitrary node as a portal to the mesh network by plugging in a separate WiFi-USB adapter. The device management subsystem detects the additional network adapter and spawns a local wireless AP, enabling nearby smartphones and computers to connect and reach every node in the mesh network. At the time of writing, very few Android devices feature WiFi chipsets that support ad hoc mode. Hence, a direct integration of smartphones into the mesh network is not feasible. The authors developed a method to bypass this restriction. To integrate a single Android device into the mesh, the user first connects the device manually to a nearby portal node. Each RPi node generates the IP address of the mesh interface from the least significant three octets of the MAC address of the onboard WiFi interface. For the MAC address B8:27:EB:AA:BB:CC, the mesh interface is configured to the IPv4 address 10.170.187.204. The additional USB WiFi dongle designates the node to a portal node. The systems AP daemon is then configured to assign connecting clients an IP address via the dynamic host configuration protocol (DHCP) in a class C subnet of the first three octets of the IP address of the mesh interface. e.g., given the mesh interface IP address 10.170.187.204, the AP daemon will be automatically set up using the address 10.170.187.1 and will lease IP addresses in the 10.170.187.0/24 subnet, excluding the address which is already assigned to the mesh interface. Next, the OLSR daemon on the node then registers the AP subnet as a home network and publishes this information using host and network association (HNA) packets to the remaining nodes. After successful connection to a portal node, the smartphone then starts to broadcasts its IP address and its hostname using the multicast DNS (mDNS) protocol [26]. Analogously to the RPi software framework, an RPC server is then spawned, which provides a subset of the interface of the RPi platform. The user is then able to utilize the smartphone like any other node in the mesh network and trigger measurements as well as transfer accelerometer data in real time. Figure 4 illustrates an exemplary network topology consisting of four RPi nodes and four smartphones, three of which are configured as sensor nodes. The RPi nodes automatically configured their mesh interfaces and joined the mesh with the ESSID \"raspyre.olsr.\" RPi A and RPi B are also equipped with an additional WiFi-adapter and are automatically configured as portal nodes with their corresponding AP gateway addresses. Two smartphone devices Android C and Android D are connected to the portal node RPi C, while the two smartphone devices Android A and Android B are connected to the node RPi A.