Wireless Sensor Networks for Smart Cities: Network Design, Implementation and Performance Evaluation

: The advent of various wireless technologies has paved the way for the realization of new infrastructures and applications for smart cities. Wireless Sensor Networks (WSNs) are one of the most important among these technologies. WSNs are widely used in various applications in our daily lives. Due to their cost effectiveness and rapid deployment, WSNs can be used for securing smart cities by providing remote monitoring and sensing for many critical scenarios including hostile environments, battleﬁelds, or areas subject to natural disasters such as earthquakes, volcano eruptions, and ﬂoods or to large-scale accidents such as nuclear plants explosions or chemical plumes. The purpose of this paper is to propose a new framework where WSNs are adopted for remote sensing and monitoring in smart city applications. We propose using Unmanned Aerial Vehicles to act as a data mule to ofﬂoad the sensor nodes and transfer the monitoring data securely to the remote control center for further analysis and decision making. Furthermore, the paper provides insight about implementation challenges in the realization of the proposed framework. In addition, the paper provides an experimental evaluation of the proposed design in outdoor environments, in the presence of different types of obstacles, common to typical outdoor ﬁelds. The experimental evaluation revealed several inconsistencies between the performance metrics advertised in the hardware-speciﬁc data-sheets. In particular, we found mismatches between the advertised coverage distance and signal strength with our experimental measurements. Therefore, it is crucial that network designers and developers conduct ﬁeld tests and device performance assessment before designing and implementing the WSN for application in a real ﬁeld setting.


Introduction
The improvement of sensing and communication technologies in Wireless Sensor Networks (WSNs) is making it conceivable to adopt this technology to monitor urban living conditions. Sensor nodes can be deployed in areas that are hardly accessible to humans, thanks to their limited size and to their communication capabilities. processing and analysis. Thus, the UAV acts as a data mule. In the proposed scheme, the UAV has two roles. The first is to provide extra coverage and sensing above-the-ground, which is key to compensate to sensing imprecision caused by the use of ground sensors. Therefore, the UAV includes exploration and sensing missions in its tasks. The second role is to gather the data collected by the ground static sensors thus eliminating the need for long distance wireless communication links. Using the UAV to collect the sensed data is also more secure than ground-based communications, since the wireless communication link will be established between the UAV and the sensor nodes over a short distance and for a short period of time, while sending the sensed data over long-range wireless communication technology such as LoRa or Sigfox will expose the wireless signal for a long distance. The proposed scheme is therefore more secure against potential eavesdropping by an intruder. The contributions of this paper can be summarized as follows: • The paper presents the different possible hardware designs and implementations of WSNs that use a set of static sensors and a UAV to capture and collect the data for the AoI. • The paper presents performance evaluation results of a set of practical experimental tests that are conducted on possible areas and environments where WSNs are expected to be deployed. In particular, we propose a hybrid network of static sensors assisted by a UAV, which is based on the ZigBee wireless modules. The proposed network design has been practically tested and its performance has been evaluated in realistic environments. In particular, we studied the application of our proposal to three different types of settings. In the first one we have a Line of Sight (LOS) communication link between transmitter and receiver. In the second one, the communications between transmitter and receiver are obstructed by physical obstacles such as trees or mobile items along the field that are common to outdoor environments such as border areas, agriculture fields, rural areas, etc. The third one focuses on environments with more wireless-absorbing and interfering obstacles such as building and walls, which can be found in cities and closed areas. Thus, our performance analysis and study covers the three different types of obstacles that can be generally encountered when deploying WSN. These tests have been conducted using two different hardware designs of WSNs. Clearly, this study has a great value from a practical point of view; since the results obtained from these tests show the capabilities and limitations of the available hardware that is widely used in implementing WSNs. Interestingly, this is very vital and provides an addition to the research work that can be found in the literature so far, providing theoretical and simulation analysis of WSNs. • We propose and implement a communication protocol to be used in establishing a communication link between the UAV and the ground static sensor nodes, which makes use of two different wireless technologies. • Finally, we summarize and motivate the implementation, hardware limitations, technical challenges, and lessons learned regarding the realization of WSNs for smart cities.
The rest of this paper is organized as follows: Section 2 discusses related work. Section 3 describes the implementation of WSNs for smart cities. Section 4 presents the details of the proposed WSNs architecture. Section 5 presents the experimental results and performance evaluation of the proposed framework. Finally, Section 6 concludes the paper and proposes future work.

Literature Review
The work done on WSNs research field is not only limited to sensor networks and the algorithms used to collect and analyze the data, but also involves the integration with other systems. For instance, cloud computing, satellite and cellular data communication, robotics and so on. Therefore, there is a noticeable impact on different fields and industrial sectors to secure the needed components and modules to build various WSNs projects. This allows more research to be involved from different fields and has direct impact on the economy in general [7]. Despite all the currently available technologies to be used in WSNs, there is still a need to develop new algorithms, protocols, low power modules, hardware implementations, testbeds, meshing of two or more WSNs and linking data collection between different countries, cyber security, and much more to enhance the functionality of WSNs, especially considering that most of the available studies are based on simulation results [8][9][10] that may not take into consideration many factors that are related to the WSNs deployment on the Area of Interests.
Some of the projects that developed a special use for WSNs are mentioned in this scope. For instance, the famous smart city application called Smart Santander project http://www.smartsantander.eu/ that is used to collect data regarding weather, noise levels, traffic, carbon contamination, etc., which was developed by Kal S. et al. Likewise, another famous WSNs project is the MOSAR project http://cordis.europa.eu/project/rcn/86315_ de.html that was developed for a healthcare application. It contains data collected from patients by medical staff, and from the interactions between patients and medical staff. Obviously, this project was developed by the MOSAR organization.
It is nice to mention that other projects use more advanced techniques, such as using UAVs or Unmanned Ground Vehicles (UGVs) as part of WSNs structure. This is done in order to carry sensors and get data records while moving from one place to another or to deploy these sensors in remote areas where it is hard for humans to reach. In this manner, Allred Jude et al. [11], used airborne carried WSNs that contain many tiny UAVs with integrated sensors to monitor dynamic atmospheric sensing of toxic plume behavior. On the other hand, P. Croke et al. [12], developed an airborne deployed WSNs for critical scenarios and emergency situations, such that the direct human interactions are limited in these occasions for minimal life losses. Furthermore, the authors of [12] developed sophisticated algorithms not only to achieve data collection but also to troubleshoot and maintain different WSNs elements when needed. The authors in [13] presented the hardware implementation of a WSN system that can detect and identify an event of interest in underground mines, then it reports the event to a remote monitoring center. The authors of this project studied the path loss of different radio frequencies and proposed an energyefficient communication protocol suited to the hostile underground environment. In [14], the authors presented the implementation of WSNs that can be used for agricultural irrigation monitoring and control. The paper focused on the system implementation in terms of the used sensors, communication scheme, user interface, etc. Furthermore, it presented real-case scenario where the system was used to improve the irrigation process. In [15], the authors proposed an inexpensive, low power and small sized WSN based on ZigBee communication protocol that can be used for air quality monitoring. In addition to the system implementation, the paper focuses on data analysis and decision-making aspects. In [16], a simulation study for the performance of terrestrial to aerial sensor nodes' communication link is presented. In this paper, the focus was to study the effect of several parameters such as the weather conditions, UAV altitude and speed on the sensor's performance. Khalifeh et al. [17] presented an experimental performance evaluation and comparison between the DigiMesh and ZigBee wireless mesh networks, which are two important methods for establishing scalable WSNs that use meshing to extend the network for long distance and high coverage.
In [18], the authors conducted an experimental study of ZigBee and its potential application in an outdoor irrigation system. However, the testing environment did not consider different types of obstacles such as trees and walls, which is normally found in such an environment. The authors in [19] conducted an experimental performance evaluation and measurement of ZigBee PRO wireless technology. Despite the fact that the used hardware is compliant with the ZigBee standard, the results showed a huge performance gap between the practical and theoretical results. Thus, the attained results provide WSN developers and designers with a realistic expectation of the available hardware and help them in having an efficient network design that is close to reality. However, the indoor experimental environments used in this study does not reflect the realistic outdoor environment where WSNs are expected to be deployed. Furthermore, WSN nodes are deployed closed to each other without taking the effect of various types of obstacles that normally exist in the Area of Interests. In [20], the authors studied the performance of ZigBee in an indoor environment where it is used to provide remote monitoring for the patients health. The authors conducted an experimental evaluation to determine the minimum distance between the ZigBee-based Sensor Node (SN) and the Coordinator Node (CN) and the minimum number of SN per CN, which were found to be 30m, 3, respectively. Other indoor experimental evaluation studies for ZigBee are presented in [21][22][23]. These works focused on an indoor environment and did not consider the outdoor setting where the network suffers from different obstacles and interference. Therefore, the obtained results are not useful for realistic outdoor environment.
Recently, several papers proposed using a UAV with WSNs for different purposes. For instance, in [24], the authors emphasized the important and promising role that an UAV can add to the typical terrestrial WSN, which can be in different forms such as data collection, coverage extension, relaying and routing. One of the functionalities that the UAV can add to WSNs is Cluster Head (CH) election, where a UAV is used to get the residual energy information of the nodes, such that it assists in electing the suitable node with highest energy as the next CH node. Using the UAV in the CH selection process improves the security of the system when it is compared with the classical CH selection process between the terrestrial nodes that is prone to several types of attacks. The paper presented simulation results and not experimental results. Furthermore, the focus of the paper is on how to improve the network security and not on the network design, performance and communication range. Vera-Amaro et al. [25] investigated the potential usages of UAV to gather data from WSNs, where two scenarios were considered. The first one occurs when the UAV visits the CH nodes of each cluster, which will incur longer flying time and higher energy consumption, while the second scenario occurs if the sensor nodes send the captured data to the sink node where all data is collected, and the UAV has to fly once to that particular node to gather the collected data. The presented work focused on comparing between the two schemes without focusing on the design, practical, implementation aspects of the UAV-assisted WSNs. Popescu et al. [26] demonstrated how to use a UAV with WSNs precision agricultural, where the UAV will fly over the ground WSNs and collect the sensed data such as soil radiation, temperature and humidity, which will be transferred to a cloud platform for further analysis and decision making. The paper focused on how to optimize the UAV path planning and trajectory such that it covers the AoI and optimizes the consumed energy while flying over the crops. However, the paper did not focus on the design, implementation and performance evaluation of the proposed system.
Furthermore, the authors in [27] presented a simulation based work for UAV-assisted WSNs for smart agriculture, where WSNs assist the UAV in optimizing the spray process. Comparing this work with ours, we provided different hardware implementations for UAV-assisted WSNs, where we shared our experience on that matter. Furthermore, we proposed a protocol to establish a communication link between the UAV and ground sensor nodes. The hardware and implementation challenges faced for both designs have been addressed and discussed in details. Furthermore, we proposed and implemented a communication protocol between the UAV and WSNs that enables such a communication paradigm. Another paper that highlights the potential adoption of multi-UAVs for disaster management was proposed in [28]. The paper provides a survey that focuses on the potential usages of multi-UAVs in disaster management. Once more, it neither has any hardware or implementation details nor addresses the technical challenges faced during implementing. The work presented in this paper complements our previous efforts towards designing and building an efficient WSNs where several crucial aspects are taken into consideration. Specifically, aspects such as network topology and architecture [17], clustering [29,30], relaying and routing [31], energy optimization [32,33], interference mitigation [34,35] and UAV-assisted WSNs [16,36]. This work elaborates the technical implementation details of part of the proposed Hybrid WSN (HWSN) presented in [37], which has a great advantage towards enabling the implementation of the proposed HWSN model in several scenarios and applications. Table 1 summarizes the most related papers and compares them with our paper. Our literature review shows that the amount of provided research that focuses on WSNs implementation is limited compared with the theoretical and simulation based research on this field. Other experimental work published in the literature is either focused on the indoor environment or considered simplistic outdoor environments without taking into account the different types of obstacles that are normally encountered in WSNs deployment areas. Hence, there is a need for providing a realistic and practical implementation for WSNs, where the performance of these networks is measured and evaluated in different realistic environments and scenarios. Moreover, with the widespread deployment of UAVs and their potential usage in WSNs, new communication protocols and methods to integrate them with the ground sensors are much needed. Consequently, the aim of this paper is to shed light on the implementation aspects, design and challenges for WSNs and perform experimental performance evaluation for their potential usages in real scenarios. This is an important aspect that needs more investigation by the research community, and will facilitate WSNs deployment and installation for different applications.

WSNs Implementation
The aim of this section is to discuss the technical details of establishing WSNs, which covers the following main topics: WSNs topology and protocols, WSNs node architecture, components and sensors' types.

WSNs Topology and Protocols
The topology of WSNs can vary from a simple star to random topologies or advanced multi-hop wireless mesh networks. In this work, a wireless mesh network is proposed and implemented for the purpose of sensing and environment monitoring.

Mesh Network Topologies
Mesh networks send messages using a routing technique, where messages are transferred from one node (hop) to another one until reaching the destination. It is crucial to mention that in mesh networks, multi-path for the same destination normally exists, as such, if one of these paths fails, the network would adjust itself to re-route the packets to the other path. This can be done using self-healing algorithms such as the Shortest Path Bridging [4]. Furthermore, mesh networking is used in applications where the range between two points may be beyond the range of the two radios located at those points, but intermediate radios are in place that could forward on any messages to and from the desired radios.

WSNs Protocols
Considering the importance of safe and reliable data transfer between the different WSNs components, a commonly used communication protocol is the IEEE 802.15.4 [38][39][40]. This protocol is preferred for low rate wireless data transfer when networks such as WSNs are used based on the application under consideration. Several advantages made this protocol the better choice for WSNs implementations due to its easy implementation and moderate energy consumption [38]. These are important parameters to be taken into consideration as usually WSNs contain huge number of sensors spread over an AoI or operated remotely without any continuous power source. Furthermore, this protocol allows a node-to-node communication and a node-to-master communication, which gives more reliability and efficiency to WSNs [41]. Different hardware modules are also available and compatible with the IEEE 802.15.4 protocol such as: ZigBee, 6LoWPAN, WirelessHART, Bluetooth, low energy Bluetooth and many other modules commercially available that accept this communication protocol [38,41,42]. In this paper, the ZigBee protocol is adopted due to its widespread availability, low cost, low energy, ease of setup and configuration and its ability to use the freely available Industrial Scientific Medical (ISM) 2.4 GHz spectrum. Furthermore, several comparative studies have been conducted in the literature between ZigBee, 6LoWPAN, WirelessHART and their potential usage for WSNs implementation [43,44]. These studies found that ZigBee is the best one especially due to its low power consumption, which is extremely needed for extending WSNs lifetime. Regarding Bluetooth, it is limited to short distances, which makes it not appropriate for outdoor WSNs. Moreover, since any WSNs will contain a large number of data collection sensors, the initial cost associated with such a network is of high importance. Hence, the overall WSNs implementation, cost, reliability and efficiency can be maximized without the need for special or custom design hardware.
In this paper, the ZigBee protocol [38] is used in establishing WSNs. ZigBee is a wireless technology designed to address the utmost needs of low-cost and energy efficient devices that can be used for Machine-to-Machine (M2M) communications. ZigBee works on top of the IEEE 802.15.4 protocol, which operates in the 2.4 GHz, 900 MHz and 868 MHz [38]. ZigBee protocol works on the Medium Access Control (MAC) layer to provide mesh networking to the underlying IEEE 802.15.4 protocol. Furthermore, this network needs one coordinating node (named as coordinator) to be configured while the other nodes could be either end devices or routers. Figure 1 depicts various network configurations on which ZigBee can be used. Another protocol that works on top of IEEE 802.15.4 standard and can be used to establish a wireless mesh network is DigiMesh [38]. As shown in Figure 2, in DigiMesh, there is only one node type, consequently the formed network is homogeneous where all nodes can route data. There are no parent-child relationships. All nodes can be configured as low-power battery powered devices. Interestingly, these messages could be transmitted through routers, which act as relays to reach the destination thus allowing the network to maximize its communication range [38]. Furthermore, DigiMesh provides simpler network setup, more flexibility to expand the network, and more reliability especially in environments where nodes may lose connectivity due to interference or power failure. In addition, DigiMesh protocol has a larger frame payload, which can improve the throughput. Ultimately, DigiMesh has a simplified addressing paradigm, which facilitates network setup and troubleshooting processes.

Sensor Node's Design
In this work, two different implementations for the sensor node's design are described, where each implementation uses a specific microcontroller and different wireless module. In what follows, a brief description of both implementations is provided. Figure 3 depicts the major components of a WSN node. As shown in the figure, each wireless sensor node consists of a microcontroller, set of sensors, wireless communication module, and battery.

WSNs First Implementation
The first proposed implementation uses cost effective nodes, with low wireless communication range. An Arduino microcontroller http://www.arduino.cc is used, and a set of sensors for measuring the temperature, humidity, motion detection and gas are used. These sensors are common for both WSN implementations and will be discussed in more details later in Section 3.3. For the wireless module, the XBee S2 module manufactured by Digi https://www.digi.com/ Inc. is used, which supports ZigBee technology under the IEEE 802.15.4 protocol. As depicted in Figure 4a, the used XBee S2 module has small antennas, which is compatible with its low communication range and emitted energy as described in Table 2. The interface between XBee and Arduino can be made in two ways. Using XBee shield or XBee Gateway as shown in Figure 4b.

.2. WSNs Second Implementation
A more advanced implementation is described using an industrial standard microcontroller based on ATmega1281 processor endowed with a high power, longer communication range module. In particular, in this implementation, the Waspmote http://www. libelium.com/v11-files/documentation/waspmote/waspmote-datasheet_eng.pdf WSNs board manufactured by Libelium Inc. https://www.libelium.com is used, which has several external sockets to connect the sensors, solar panel, antenna and USB interface. The most important interfaces used in this work are the Universal Asynchronous Receiver/Transmitter (UART) and Universal Serial Bus (USB). There are two UARTs in Waspmote: UART 0 and UART 1. Remarkably, UART 0 is shared by the USB port and Socket 0. This socket is used for XBee modules adopted in this work along with other wireless and communication modules such as: LoRaWAN, LoRa, Sigfox, RFID/NFC, Bluetooth WiFi, and RS-485. It controls the data signal, which is always switched to Socket 0. However, when a communication through the USB and UART 0 is needed, the multiplexer is switched to the USB port and set back again to Socket 0 once the operation is completed. Regarding the wireless module used in this implementation, the XBee-PRO module shown in Figure 5 is used. Similar to XBee S2, it works on top of the IEEE 802.15.4 protocol and can be configured to work on either DigiMesh or IEEE 802.15.4 by only changing the firmware. As shown in Table 3 XBee-PRO datasheet https: //www.digi.com/resources/documentation/digidocs/pdfs/90000982.pdf, this module is equipped with a more powerful antenna, with higher transmission energy, which provides longer communication distance.  Furthermore, to connect the sensors to the Wasmpot main board, external sensors need to be implemented on external sensors boards where each board has several sockets for different types of sensors. It also has external sockets for new types of sensors.

Sensors' Types
The aim of this subsection is to discuss the different sensors used in this work. In the conducted experiments, a set of sensors that captures several environmental measurements and activities has been tested. These sensors have a wide range of applications related to smart cities, such as environment and pollution monitoring and motion detection. The set includes, the HC ultrasonic sensor that can detect the existence of certain objects, and the DHT11 sensor that is a composite sensor, contains a calibrated digital signal output for the temperature and humidity. In addition, we used the Grove -Gas Sensor (MQ2) that is useful for gas leakage detection (in home and industry) and can detect several gases such as Hydrogen, LPG, Methane, CO, Alcohol, smoke, or propane. Finally, we used the D-Sun Hc-Sr501 Pyroelectric Infrared PIR Motion sensor. Figure 6 shows the sensors used in this work. Furthermore, Figure 7 shows a picture of the two implemented wireless sensor nodes.

WSNs Architecture
The aim of this section is to describe the proposed WSN, nodes' configurations, setup, and communication protocol used between the sink and the UAV node. Figure 8 depicts the WSN architecture used in this work. As shown in the figure, a set of sensor nodes is distributed over the AoI. The nodes are distributed such that they can sense the AoI without having any coverage problem, and can communicate with each other to convey the captured data without having a connectivity problem. Each node should be connected to at least one neighbor; one of these nodes can be set as a cluster head or sink node, to which all the sensor nodes have to send their captured data. The sink node acts as a cluster head, which is responsible for sending the captured data to a remote node for decision-making and further analysis. It is important to emphasize that these nodes form a mesh network, where multi-hop data transmission can occur between the nodes that act as relay nodes, until the data reach its destination (the sink node). Moreover, an UAV is used to collect the captured data from the sink node. The UAV carries a sensor node that is provided with a microcontroller, battery, an SD-Card, and wireless modules. In this setup, the UAV acts as a data mule, which assists in off-loading the sink node from the captured data, saves it, and also conveys it to a remote site for further analysis and decision making. In addition, the UAV node can be equipped with sensors to sense above the ground areas, thus providing terrestrial and aerial sensing and covering for the AoI.

WSNs Node Setup and Configuration
In the first proposed WSN implementation, the configuration of XBee S2 is performed using only the X-CTU software https://www.digi.com/products/xbee-rf-solutions/xctusoftware/xctu, where the most important parameters such as the network ID, destination node address, etc., are configured. Furthermore, the Arduino microcontroller was configured to capture the sensed data using the different sensors described in Section 3.3. After that, captured data is sent to the XBee S2 wireless module to be transmitted to the destination node. For the second WSN implementation, the radio modules and the Waspmote microcontroller, as well as, sensors board should be configured and programmed. The configuration of the XBee-PRO is performed using either the X-CTU or Waspmote C++ code using the provided Integrated Development Environment (IDE). The sensors board is programmed and configured using different libraries provided by Libelium Inc. In addition, the sink node has a special configuration as it will store all the data sent by the other sensor nodes and wait until the UAV arrives, then it will send the stored data directly to it. Consequently, the configuration of the sink node incudes creating a file for the received data, where each line of the file contains the received packets from the other sensor nodes. Furthermore, the file is stored in an SD-Card. The sink node needs to search for the UAV, and once it arrives, it starts sending the file. Finally, a wireless sensor node is fixed on the UAV bottom and configured to receive the data (the file) from the sink node. The UAV carries a node similar to the ground nodes, with two differences; the first one is related to the microcontroller and battery form factors, where a smaller size and lighter weight versions of the microcontroller and battery are used. The second difference is related to the wireless modules used in establishing the communication link with the sink node, which will be described in more details in the following subsection.

Sink to UAV Node Communication Protocol
After the ground nodes send the captured data to the sink node, it is important to communicate this data to the UAV node. Besides, the UAV node stores the nodes' data and transfers it to the remote monitoring center for further analysis and decision-making. As depicted in Figure 8, when the UAV node arrives to the AoI, it starts the communication process with the sink node.
To establish a two-way communication protocol, both the UAV and the sink nodes are provided with wireless transceivers. To achieve that, three different wireless transceivers were examined as discussed hereafter.

•
The first attempt was to use the same wireless module used by the ground sensor nodes; i.e., ZigBee technology using the 2.4 GHz spectrum. However, the sink node was unable to communicate with the UAV node using this spectrum. The reason behind that lies in the fact that the UAV itself uses the same spectrum which is used for telemetry operation with the control station that is monitoring the UAV operation. That is evident since the UAV telemetry signal strength was much higher than the signal strength transmitted by the ZigBee wireless modules which are used to establish the sink to UAV communication link. • As a second option, two wireless radio modules have been used in both the sink and the UAV nodes. In particular, the HC-12 http://www.dfrobot.com/image/data/TEL0 005/APC220_Datasheet.pdf and APC220 http://statics3.seeedstudio.com/assets/ file/bazaar/product/HC-12_english_datasheets.pdf RF wireless modules that operate on the 433.4-473.0 MHz, 418-455 MHz frequency ranges, respectively. Both modules are serial, half-duplex communication modules that use the UART communication protocol with a transmission range up to 1 km. In the proposed architecture, the sink node uses the Waspmote microcontroller, whereas the Arduino microcontroller is used in the UAV node. Figure 9 shows how the two modules are connected to the Waspmote and Arduino microcontrollers via the UART sockets, where the TX, RX pins from the wireless modules are connected to the RX, TX pins, respectively. Furthermore, as shown in Figure 8, the sink node uses the ZigBee wireless communication protocol to communicate with the static node. Notice that as mentioned earlier, the ZigBee wireless module using the 2.4 GHz spectrum was used to communicate with the UAV node, but that caused an interference with the UAV-communication and control protocol [45]. It is worth mentioning that the UAV also uses the same spectrum, hence, to avoid such an interference, the two serial modules were used, each configured at different operating frequencies. The problem faced in this approach was the limited buffer size at the used wireless modules. This forced us to introduce a delay between data transmissions to ensure that the wireless serial interface buffers succeeded on transmitting the data to the UAV without causing a buffer over-flow thus causing packet loss. Introducing this delay prolonged the transmission process between the sink and UAV nodes, which has the draw back of consuming larger energy from the UAV precious battery, since the UAV hoovering time around the sink node increased.

•
The third solution is to use ZigBee wireless transceivers at the sink and the UAV nodes which operate on different frequency range than the 2.4 GHz. In our tests, two ZigBee interfaces were installed at the sink and the UAV nodes, which operate on the 868 MHz frequency range. However, to achieve that, the sink node design has been changed to include two different ZigBee wireless modules; one uses the 2.4 GHz and is used to communicate with the other ground nodes, while the other interface uses the 868 MHz frequency spectrum, which is used to establish the communication link with the UAV node. To achieve that, a radio expansion interface has been used that enabled the sink node to connect to two different ZigBee modules at the same time, as shown in Figure 10, which depicts the sink node with two ZigBee modules mounted on Waspmote microcontroller. The first one operates at 2.4 GHz and is mounted on socket 0, while the other one operates at 868 MHz and is mounted on socket 1 using the wireless expansion board. In what follows, a brief description of the sink to UAV nodes communication protocol is provided. Figures 11 and 12 depict the protocol flow diagram at the sink and UAV nodes. When the UAV arrives to the sink node, it starts the handshaking process. The UAV first advertises itself to the sink node by sending a "Hello message", if the UAV location is far from the sink node and out of its range, then the sink node will not get the "Hello message". However, if the UAV location is within the communication range of the sink node, then it will get the "Hello message" and start the handshaking process. This process starts by sending a "Hello message" and a Transmission code (TX code) that is known to the sink node, to advertise for its existence and readiness for receiving the collected data by the sink node. Once the sink node receives this message, it sends an acknowledgment message with a Receiving Code (RX code), that is known to the UAV node. Notice that in order to increase the probability of receiving this message, the sink node sends it three times, after which it starts immediately sending the stored data frames. Moreover, to ensure reliable data transmission, each sent frame has to be acknowledged by the UAV node, and in case of not receiving the acknowledgment message, the sink node will wait for 10 s, and if no acknowledgment is received, it will go back to "Listening state". Afterwards, the UAV will resend the "Hello message" again and repeat the handshaking process with the sink node. Then it will resume the frames' transmission process until it finishes all the frames and send a Termination Code that is known to both nodes. This case may happen if the UAV node changes its location and loses its connection with the sink node. Furthermore, it is quite important to clarify that before the UAV arrives to the sink node, all the ground nodes send the captured data to the sink node, where data are stored on an SD card. The sink node waits the UAV arrival by listening to the "Hello Message" advertisement message and performing the handshaking process described earlier. After that, the sink node starts sending the nodes' data frames saved on the sink node SD card to the UAV node. It is worth mentioning that the UAV node is designed to communicate directly with the sink node only and not with all the nodes. This scheme not only reduces the contention between the nodes while accessing the UAV node: it makes the UAV communication protocol simpler, and it also saves the nodes' energy as they can go to sleep after sending their measurements to the sink node and without having to keep track of the UAV arrival time.
In Figure 11, a counter N is set to zero and incremented each time a successful frame is sent, the process continues until N is equal to the total number of saved frames in the SD card. It is important to mention that the flying time of the UAV is reasonable and not large since it will communicate with the sink node only and not with all nodes. Moreover, the UAV can be sent frequently to the sink node depending on how often the data need to be gathered, which depends on the application under consideration. Furthermore, for larger networks, several clusters can be formed where a group of UAVs can be used to collect the sensed data from the sink nodes.

Experimental Performance Evaluation
To evaluate the performance of the proposed WSN implementations, different experiments have been conducted with different types of obstacles and environments. Precisely, three scenarios have been examined; transmission in a line of sight area with small obstacles, non-line of sight area with observable obstacles, and non-line of sight area with wall blocked obstacles. In all the conducted experiments, data transmission performance was evaluated using Received Signal Strength Indicator (RSSI), Packet Received Percentage (PRP) that are good indications of the received wireless signal strength and the transmission quality. The experiments were done by sending at least 100 packets for each scenario, where each experiments have been repeated at least 5 times and the average results of these experiments have been recorded. A 95% confidence interval is used in all results to measure the error bar. In what follows, the different scenarios with their experiments and results are discussed.

Line of Sight Area with Small Obstacles
As seen by Figure 13, the sensor nodes are distributed in an AoI where a line of sight between the sensor and sink nodes exists with small obstacles. However, to conduct several range tests, the nodes were arranged such that the distance between the sink and the normal nodes could change from 40 to 160 m. Besides, in order to avoid other factors that can degrade the performance such as interference and network collisions, only one node has been activated for a given distance. For example, to evaluate the transmission quality at distance 40 m, node 1 marked as (R1) was activated and sent data to the sink node, while the other nodes remained inactive. The experiments have been repeated for the same distance several times and the average results were recorded. Finally, it is important to note that both implementations have been tested separately but with the exact nodes locations in order to have similar conditions and obtain a fair comparison. Figure 14 depicts the RSSI and PRP for both implementations and under different distances. As expected, the second implementation achieved better results in terms of having higher RSSI and PRP values. This indicates stronger signal and lower packet loss rate when compared with the first system. Indeed, this result is expected due to the higher transmitted power and better antennas for the second implementation. However, it is essential to mention that both implementations did not achieve the advertised maximum coverage distances as mentioned in their data sheets and in Tables 1 and 2. This is because these values can be achieved in a 100% line of sight environment, which is very difficult to achieve due to the surrounding environment and obstacles, which create multi-path effect that will degrade the received signal and reduce its maximum transmission distance.

Non-Line of Sight Area with Observable Obstacles
In this scenario, as seen by Figure 15, the sensors are deployed in an area with more observable obstacles such as trees for example, which may not guarantee a line of sight path between the nodes. Figure 16 depicts the corresponding results for both implementations, one can notice that both implementations were affected by the obstacles and the difference between the performance of the two systems was almost the same for different distances. However, the RSSI values for the second implementation was less affected than that of the first implementation. This can be justified by the fact that since the second system has much higher transmission power, the obstacles effect was less on the received RSSI levels. However, both systems suffered from high packet loss due to multi-path effect and large reflections due to the observable obstacles and the absence of line of sight communication. Consequently, the received RSSI signal is not alone enough to evaluate the system performance.

Non-Line of Sight with Wall Blocked Obstacles
In this scenario, the two systems were tested where each node is behind a wall as shown in Figure 17. Both systems suffered from high packet loss and low RSSI signal level more than the previous scenarios. However, as shown in Figure 18, the first implementation has very huge loss in the received RSSI signal level, which is because this system has very low transmitted power that was mainly absorbed by the surrounding walls.

Sink Node to UAV Communication
In this part, we tested the performance between the UAV and the sink node with different elevations up to 50 m above the ground using the proposed communication protocol described in Section 4.3. The following observations are of a prime importance: • Three types of wireless modules interfaces have been tested and examined. The first one used the 2.4 GHz ZigBee interface, which resulted in severe performance as most of the packets were lost and not received, because the UAV itself uses the 2.4 GHz spectrum with high power for the telemetry communication with the UAV monitoring Station. Despite the fact that we tried to vary the channels used by both nodes, we continued to face a severe interference between the two modules. For the second type of wireless transceivers, all the conducted tests resulted in 100% packet delivery. However, the transmission time was high due to the introduced delay that was used as a solution to the limited buffer size of these wireless modules. The third solution, which uses ZigBee modules at 868 MHz, was the best in terms of transmission delay and packet delivery ratio and thus was adopted in our design. Furthermore, we removed the delays as we did not face the buffer size limitation as before. • The proposed communication protocol between the sink and UAV nodes ensures 100% delivery rate, whereas the communication among the ZigBee nodes uses the standard ZigBee protocol, which does not ensure packets' delivery assurance.

Practical Challenges and Lessons Learned
The different WSN implementations have introduced several technical challenges that can be summarized as follows: • There is a huge difference between the advertised wireless range capabilities and the actual one, which has been verified experimentally under different environments and different obstacles. As such, it is important to identify the characteristics of the Area of Interest when designing WSNs. This can be done by conducting field tests and trying different network typologies and wireless modules. In addition, this can also be done by preparing a practical channel model that can be used to estimate the required transmission energy and the expected transmission coverage and range. • In the conducted experiments, the sensors' nodes were placed at the ground of the AoI to resemble the realistic conditions and scenarios of placing the nodes in the AoI. This positioning has blocked half of the propagated signal, thus drastically affecting the communication range and the packet loss. Therefore, it is important to position the sensor nodes (if possible) above the ground so that a line of sight communication link with the sink node can be established. However, such an arrangement may not always be feasible. As such, the sensor nodes can be configured as a mesh, where the neighboring nodes act as routers which route the packets until reaching the sink node using a multi-hope paradigm [46]. Using a mesh topology could be a solution to avoid the obstacles between the sensor and sink nodes, thus improving the network transmission efficiency. • Interference is a crucial factor in determining the transmission efficiency of WSN, given that the proposed systems both use the free 2.4 GHz frequency band. This band is freely available for a variety of applications and systems. Interference harmfully affected the transmission quality between the UAV and the sink node, because the UAV uses the same 2.4 GHz frequency band with high energy for its remote controllers and telemetry circuit, that keeps sending update messages to the UAV base station. Furthermore, it also uses the 5.8 GHz free band for video and image transmission. Consequently, another wireless technology was used that does not occupy the ISM bands. Solving this challenge was not easy, since it required using non-ISM frequencies: in our case, the 433.4-473.0 MHz, 418-455 MHz, and 868 MHz have been tested, which required special arrangements. However, currently in Jordan, the 868 MHz is under consideration as potential candidate for many IoT applications and scenarios.
• UAV node design and integration was performed so that the node can be easily attached to any UAV without relying on the UAV battery or wireless transceivers. The most important thing is to have a light and easy to attach node that will not affect the UAV stability and flying capabilities. To achieve that, several designs and tests have been performed. As shown in Figure 19, the node design was easily mounted on the bottom of the commercially available DJI F550 Hex-rotor drone that was used in the conducted experiments. • Another challenge that is still under investigation is related to the limited energy source for those sensor nodes. This can be extended by placing a solar panel that can harvest some solar energy and charge the battery. Moreover, wireless charging can also be used where UAVs are used to transmit energy using directional antennas towards the sensor nodes and charge them wirelessly. • In practice, it is expected to need more than one UAV to cover the relatively large AoI with many sensors and clusters. Therefore, the UAVs should coordinate the covering operations among themselves and efficient mission planning algorithms are needed. In our previous work [47], multi-Robot WSNs framework is discussed, where fuzzy logic was proposed to solve some networking challenges such as: The proposed monitoring WSNs framework uses an Xbee module mounted on a Waspmote microcontroller. The security features in Xbee include 128-bit AES encryption, two security keys-namely network key and link key, which can be preconfigured or obtained during joining-and support for a trust center. The security features available in Xbee satisfy the security requirements such as message integrity, confidentiality, and authentication. In addition, another level of security can be added at the link layer where another AES encryption key can be configured. However, adding this layer of encryption will increase the energy consumption; therefore, the trade-off between adding an additional layer of security and preserving the energy nodes should be taken into consideration by quantifying the amount of energy consumed during the encryption process and the frequency of the nodes' data transmission. An initial investigation on this challenge has been carried on in [48], where the conduced experiments show that the encryption process on the Wasmpote microcontrollers has significantly affected its energy consumption, therefore, more energy efficient algorithms are needed to satisfy the additional security and encryption layer while preserving the nodes' energy. One possible solution is to selectively deploy this additional encryption layers to the most critical and sensitive nodes, another solution is to equip the sensor nodes with solar panels or use wireless charging techniques to remotely charge the nodes [49]. • It is important to mention that the accuracy of RSSI may be influenced by the brand and manufacturing of ZigBee nodes in the testbed. If the ZigBee nodes are of other type or brand, the performance may be changed. However, since all of the modules follow the 802.15.4 standard, the difference may not be significant. The important lessons learned from the above experiments and tests depict that the experimental and realistic results are far from the ones advertised in the ZigBee modules data sheets.
Therefore, it is important to make field tests and experimental evaluation using the ZigBee module of interests before designing the wireless sensor network. • In the conducted tests, the UAV height was around 50 m above the ground sensors. In our scenario, choosing this distance was suitable for the application of interests, since we need the UAV to be as close as possible to the ground sensors in order to reduce the probability of packet loss. However, in some other applications (especially the ones that are related to border monitoring where exposing the UAV may have security threats), the UAV altitude might be much higher and at that point, it is expected to have some packet loss, the UAV height may need to be higher. However, the proposed communication protocol considers this scenario as it keeps track of the lost packets and resends them until they are received. • Another important observation is related to the UAV horizontal position when it starts communicating with the ground sensor. In the proposed network architecture, once the UAV receives the advertised "Hello message" by the sink node, it performs the handshaking process and starts receiving the packets afterward. However, we have implemented another design for the UAV node where a Global Position System (GPS) receiver is used to compare the UAV position with the GPS position of the sink node, which is predetermined and should be stored in the UAV node. If the two positions are close to each other and the UAV receives the "Hello message", then the sink node starts sending the packets to the UAV node. This modification will ensure that the UAV is very close to the sink node, thus reducing the communication distance between the sink and UAV node, which in turn will result in less packet loss and better performance. Moreover, incorporating a GPS receiver within the UAV node is necessary especially when having multiple clusters, where the UAV is programmed to visit these clusters and collect data from the clusters' sink nodes.

Conclusions and Future Work
Wireless Sensor Networks are gaining popularity especially with the proliferation of IoT technology. To design an efficient, cost effective, long life sensor network, several aspects have to be considered when designing the sensor nodes, such as using energy efficient algorithms and techniques during the sensing process. This can be done by using interrupts and by identifying certain threshold values above which data are transmitted via the wireless transmission modules. This not only saves energy but also eliminates unnecessary transmissions and reduces the interference with the other nodes. In this work, two proposed WSN implementations were discussed. The two systems have a set of sensor nodes deployed over an AoI, and the sensors send the captured data to a sink node, which will ultimately send the collected data to a UAV that acts as a data mule for the ground sensors.
The first implementation deployed cost effective, low range wireless sensor nodes using an Arduino microcontroller and XBee S2 wireless module. On the other hand, the second implementation used an industrial standard microcontroller (Waspmote) and used higher energy and range wireless module (XBee-PRO). Three main tests were conducted with three different channel conditions between the sensor nodes and the destination node. The first one had a line-of sight communication channel with small obstacles, the second one had a non-light of sight communication channel with larger obstacles such as trees, while the third one had a non-light of sight communication channel with blocking walls. In all the conducted experiments, the second implementation significantly outperformed the first one, due to the higher transmitted power. However, both of the proposed systems did not get close to the advertised values that are available in the data sheets for the maximum range coverage capabilities. This is because in all the examined scenarios, obstacles from the surrounding environment caused multi-path effect to the transmitted signal, which reduced its maximum transmission range. Finally, a simple communication protocol between the sink and the UAV nodes have been proposed and tested, which was able to deliver all the gathered data without any packet loss.
For the future work, more sensor nodes could be implemented to maximize the network range. In the proposed systems, the deployed WSN nodes are static. However, currently we are working on developing mobile sensor nodes where UGVs carry these sensor nodes. Mobility has several advantages, one of them would be the reduction of the number of sensor nodes needed to cover the AoI. This is because mobile nodes can move and cover a bigger area than static nodes. Furthermore, mobility can be used to improve the transmission quality, especially in areas containing several obstacles. In fact, mobile nodes can move to new positions to improve quality of their communications, whenever obstacles shield the transmitted signals. Wireless charging can also be improved by having mobile nodes. Another extension for the proposed systems is to design nodes with multi-radio interfaces with different technologies and frequency bands. Interestingly, if one of the interfaces is suffering from high interference or having bad transmission quality, then the system can switch to the another radio interface, which may have better transmission capabilities and conditions.