and technology in the agricultural field, which, in turn, drastically boost crop productivity and help in saving natural resources [9; 10]. In recent years of the Fourth Industrial Revolution (4 IR), researchers, engineers, and IT specialists are striving to participate in employing advanced technology to achieve a better life for our planet, as Figure 1 shows [11; 12]. One of those pillars of 4 IR is IoT, which is considered as the fuel of the 4 IR since it contributes effectively by linking trillions of objects and sensors, all of which generate real-time data. It is expected that around 100 billion devices have been connected to the internet by 2020 [13; 14]. This number will further increase since the IoT is progressively entering a wide array of sectors and industries, ranging from manufacturing, health, communications, and energy to the agricultural industry [15]. In an agricultural environment, for instance, IoT technology has been utilized to deal with distributed data collection from farming environments and, important for directing farmers, with real-time information of the farming field [16]. On the other hand, integration between IoT and Unmanned Aerial Vehicles (UAVs) attracts researchers' attention for various reasons. UAVs' reliability, flexibility, portability, line of sight (LoS) connectivity, efficiency, applicability, rapid deployment, and low maintenance cost are valid reasons for considering such a technology. UAVs cover a wide range of platforms, from drones to high altitude platforms (HAPs), low altitude platforms (LAPs), or tethered platforms [17; 18]. UAVs have drawn tremendous attention, both in the industry and academia, due to their advantages and wide applications [19]. For example, telecommunications, monitor disaster-relief missions, empowering smart cities, atmospheric studies, service delivery, surveillance, high-resolution imaging, and military applications [20; 21]. Goldman Sachs predicts that the agriculture sector will be the second-largest user of drones in the world in the next five years [22]. Thus, the use of UAVs in agriculture is expanding rapidly to assist farmers with monitoring and making decisions that support crop productivity via acquiring field data in easy, fast, and cost-effective ways, compared to traditional methods [23]. Farmers and other stakeholders can access the data gathered through UAVs from cloud-based platforms remotely through apps from their smart devices, which can help in predicting the yield of the crop, pesticides, fertilizers, seed souring, etc. Figure 2 illustrates various scenarios of smart farming using a UAV, where a wide range of agricultural parameters can be monitored to improve crop yields, reduce costs, and optimize process inputs, such as environmental conditions, growth status, soil status,  
Figure 1: Technological pillars of the 4 IR including UAV and IoT. irrigation water, pest, and fertilizers, weed management, and greenhouse production environment [24]. The evolution of IoT and UAVs has enabled the vision of sustainable smart farming, in which data can be obtained and processed autonomously, to enhance production time, and farm management practices more efficiently [25]. The rest of this paper is organized as follows: related works are investigated in Section 2; a state-of-the-art review is outlined in this section with a highlight of major applications of coupling IoT with UAV technology in smart farming. Materials and methods are presented in detail in Section 3; this section presents the architecture of the proposed system. In Section 4, we describe the implementation and testbed; the proposed solution has been deployed and validated in a farmhouse that covers a large set of different agricultural activities using flying IoT.