# An Enhanced Mechanism for Fault Tolerance in Agricultural Wireless Sensor Networks
## 1 Introduction  
Nowadays, wireless sensor networks (WSNs) have become widely used in many aspects of our daily life such as in healthcare [1, 2, 3], including for remote patient monitoring, medication adherence monitoring, and sleep monitoring; in smart cities [4, 5] for smart transportation and energy management; and in agriculture [6, 7, 8], such as for weather monitoring, environmental monitoring, and livestock monitoring, and so on. A WSN is basically an infrastructure comprised of sensing, computing, and communication elements (i.e., micro-sensors) that gives an administrator the ability to monitor, observe, and react to events and phenomena in a specified environment [9, 10, 11, 12]. WSNs have the characteristics of convenient deployment, low cost, and high precision, which make them suitable for agricultural information monitoring and transmission [13, 14]. Over the last few years, sensors and WSNs have emerged at an extraordinary rate [15, 16, 17]. A key reason for this is the ability of WSNs to perform real-time data monitoring and reporting. This capability enables the acquisition of multisource environmental and crop state data in the case of precision agriculture [18, 19, 20, 21, 22, 23]. To date, several agriculture precision applications based on WSN [13, 14, 24, 25, 26, 27] have been proposed to keep farmers informed about their farm field conditions with valuable data such as temperature, humidity, wind speed, rainfall, and so on. In fact, with climate change, we are currently witnessing random weather events and unexpected weather conditions in various parts of the world. Hence, if accurate information on farm fields and agricultural activities can be collected in time, it can be used to significantly reduce losses and damage to crops and increase the overall agricultural productivity. In thisscenario, WSNs can be a panacea for precision agriculture. However, like any other system, WSNs also suffer from malfunctions and failures. An essential obstacle in WSN design lies in meeting diverse application demands (such as lifetime, throughput, and reliability) within the constraints of limited energy, computation, and storage capacity of sensor nodes. In fact, deployment in unattended or hostile environments increases the susceptibility of sensor nodes to failures compared to other systems. Faults in WSN can be classified into hardware and software faults. Hardware faults are due to physical defects, energy depletion, environmental interference, or insufficient storage. The cited factors can lead to a transient or permanent crash and can result in software failures. Software faults are generally caused by a limited computational capacity and sometimes by intruder attacks [28; 29; 30]. The failure of any WSN component can lead to sensor network partitioning, where the nodes become isolated and disconnected from the network, resulting in reduced availability and potential failure of the WSN as a whole. When we take various aspects of WSNs into consideration, we find that a major issue is the energy consumption of WSNs. As we know, such wireless devices (i.e., sensors and actuators) run on batteries and have a limited amount of energy. So, when a node in the path that transmits packets from a source to a destination dies, the transiting packets will be lost because of the unsuccessful transmission. In such cases, the network must be able to rectify the fault of the node and identify an effective solution for better transmission and continued operation. Fault tolerance is an essential attribute of a WSN for precision agriculture. A WSN used for precision agriculture must satisfy the dependability properties of _safety_ and _liveness_. In this paper, considering the setting of precision agriculture, a fault tolerance scheme is introduced. The aim was to detect crashed nodes and recover from the node failure to allow for continued data transmission, which could therefore eventually extend the network lifetime.