## 5 Zigbee Data Packet Length  
The transmitted data packets for the sensor, router, and main router must be determined to identify the time consumption of the XBee S2C wireless module. The active transmission time (\(t_{TX}\)) of XBee S2C, which is based on the Zigbee wireless protocol, can be expressed as [42]:  
\[t_{TX}=t_{SA}+\frac{L}{D}\;, \tag{1}\]  
where \(t_{SA}\) is the transient time of XBee S2C from sleep mode to active mode. XBee S2C consumes 10.2 ms when pin sleep is used [43]. \(L\) denotes the data packet length of XBee S2C in bits, and \(D\) indicates the XBee S2C data speed of 250 kbps for the XBee S2C module using the 2.4 GHz industrial, scientific, and medical frequency band.  
The data packet length consists of 31 bytes (overhead) and 35, 47, and 95 bytes (payload) for the sensor, router, and main router nodes (shown in Figure 4a-c, respectively). In the current work, the overhead bytes are constant. Moreover, the data bytes differ for the sensor, router, and main router nodes, which rely on the parameters of climate conditions. The data packet length and the active transmission time of the adopted nodes can be described as follows:  
1. _Sensor node_: The data packet length of each sensor node consists of 35 bytes (i.e., 280 bits). The payload includes 4 bytes, namely, (i) identification (ID) of the sensor node, (ii) air temperature data, (iii) air humidity data, and (iv) soil moisture data (Figure 4a). Therefore, the active transmission time for each XBee S2C in the sensor node based on Equation (1) is 11.32 ms.
2. _Router node_: The data packet length of each router node consists of 47 bytes (i.e., 376 bits). The payload includes 16 bytes, i.e., 4 bytes for each sensor node, where each router node collects data from four sensor nodes (Figure 4b). Therefore, the active transmission time for each XBee S2C in the router node based on Equation (1) is 11.704 ms.
3. _Main router node_: The data packet length of the main router node consists of 95 bytes (i.e., 760 bits). The payload includes 64 bytes, i.e., 16 bytes for each router node, where the main router node collects data from four router nodes (Figure 4c). Therefore, the active transmission time for XBee S2C in the main router node based on Equation (1) is 13.24 ms.  
Figure 4: Data packet of XBee S2C is compatible with the Zigbee protocol [44]: (**a**) data packet of each sensor node (35 bytes), (**b**) data packet of each router node (47 bytes), and (**c**) data packet of the main router node (95 bytes).  
The data packet length of XBee S2C includes a maximum of 127 bytes (31 bytes overhead and 96 bytes payload) [45]. Therefore, the adopted Zigbee wireless protocol using XBee S2C is adequate to achieve the proposed WSN topology in the current work, as presented in Figure 1. The maximum data packet length of 95 bytes is used to monitor the climate conditions of the agricultural field.  
Delay in WSNs denotes the difference between the time when the information is produced in the sensor node and the time when the information arrives at the sink node. Being delay-sensitive poses a challenge to WSNs, particularly with multihop counts [46]. Most information is delay-tolerant in the majority of agriculture applications [47; 48]. In addition, a small proportion of delay-sensitive information exists. Being delay-sensitive is essential when multihops are used in WSNs and the data is required to be monitored in real time. In our application, however, climate conditions (i.e., temperature, humidity, and soil moisture) are delay-insensitive because the data are collected and transmitted from the sensor node to the coordinator node through a single router node. Evidently, delay is not a major concern in such PA case. Therefore, delay is not considered in the current study.