## 3 Proposed Protocol
Every single UAV node is updated in terms of the routing table by using the node's density information. Figure 3 shows the entire process of hello packets exchange at the ground. Figure 2: Drone Core Components. The routing table is updated at the UAV side where the number of nodes and their location as per zone area is registered. Equation (1) shows the calculation of total IoT nodes information in the selected zone. \[IoT_{Node}(Total_{Zones})=\sum_{i=1}^{|Total_{Zones}|}IoT_{Node}(Area) \tag{1}\]  
The \(|Total_{Zones}|\) denotes the total number of zones in a fixed area whereas the \(IoT_{Node}(Area)\) denotes the number of nodes in the IoT network. On the other hand, connectivity is another significant criterion used in the proposed protocol which is detected and calculated by using density information collected from BS. By using the nodes' density table, the UAV nodes check the degree of connectivity and compute it. The density table contains the nodes' density information by using density information collected from BS. The proposed DR-DR-UAVIoT protocol is used BS for connectivity and as a backbone infrastructure for service provisions. Figure 4 shows the BS and UAVs plus IoT nodes communication process. Figure 4: Communication Range of all Components in the Network. Figure 3: IoT Network Nodes Density Estimation from UAVs Nodes. The BS is one of the main components for data communication in IoT networks which are equipped with communication technologies and standards. The main role of BS is to provide communication services to the IoT nodes and UAV nodes. BS is equipped full of resources such as batteries, processing units, storage devices, and strong long-range receiver and transmission devices. We use GSM IoT (EC-GSM-IoT) services for transmission because it is a low-power wide area network technology to provide long-range, low-complexity cellular communications for IoT devices in a way that conserves energy. Various studies have proved the suitability of GSM IoT service and compared other standards such as Wi-Fi and cellular networks [24; 25]. The UAVs' transmission ranges and coverage areas are based on the nodes' density at the ground [26]. If the number of nodes in IoT networks is more than the UAV's then the nodes need more transmission power to sense and gather the data where transmission power for UAV is covered by microcells. Algorithm 1 presents the process of the UAVs-to-IoT network. ```
1.Initializing
2.CIVA: The candidate UAV node
3.IoT: IoT network node
4.if (Received traffic density information from IoT network by using BS)
5.then (Set coordinates based on location service) else
6.do Broadcast messages to check nodes density at the IoT network
7.if find congestion in IoT then
8. Collect data from IoT else
9.Wait for a random time and repeat the process
10.end task
11.Set the distance and fly the location side
12.endif
13.end process
```  
**Algorithm 1** (UAV-to-IoT)  
In the second module, the UAV-to-UAV data communication process is initiated. The UAVs' nodes are communicating with each other to update the ground and its status. This phase uses a reactive routing strategy where protocol establish the routing paths on demand. The main purpose of this module is to search the close and nearest UAV nodes for long time connectivity. Due to the high mobility and movement of UAVs, frequent disconnection is observed and there is not any guarantee for long time data transmission in the network. The proposed DR-UAVIoT protocol takes a decision and maintains and searches the alternate path without restarting the discovery phase. In the first step, the UAV node initiates and updates the routing table about the source location (IoT nodes) and destination location (Main Centre-edge devices). The UAVs forward the data by creating a routing path toward the destination. The Route Request Packet (RREP) packets are forwarded to update the route. Finally, the UAV nodes collect the data from IoT nodes and forward data toward the main center by using other connected UAVs nodes in the sky.