## 2 Materials and Method  
This work aimed to define the threshold value for selecting boundary nodes during jamming attacks. SNR is the difference between the signal received and the unwanted noise, including the jamming signal [9], since the jammer's signal itself is considered noise. SNR is measured in decibels (dB). SNR thresholds are determined by the wireless carrier, as these are system-designed. If the SNR is below the threshold value, the bit error rate (BER) increases, packet delivery ratio (PDR) decreases, and the system fails to decode the signal. It discards the signal and requests retransmission. The jammer is intended to lower the SNR below the threshold value, which disrupts communication between transceivers. Nodes closer to the jammer have a lower SNR, and the amount of SNR decreases until it drops below the threshold value, becoming a jammed node. Based on this observation, we designed an algorithm to compute another threshold value, called the boundary node selection threshold (BNST). The BNST is calculated based on a node's location, sensing range, and the JRSS. SNR is computed as:  
\[\text{SNR}=\frac{P_{r}(\text{dB})}{N_{f}(\text{dB})}\ =\ P_{r}(\text{dB})-N_{f}(\text{dB}) \tag{1}\]  
The SNR, including the jamming signal, then becomes:  
\[\text{JNR}(\text{dB})=\ \frac{P_{r}}{N_{f}+\text{JRSS}}\ =P_{r}(\text{dB})- \left(N_{f}+\text{JRSS}\right) \tag{2}\]  
wherein \(P_{r}\) is the power received by the node, \(N_{f}\) is the noise floor, and JRSS is the jammer's received signal. This work examines the path loss model. When signals propagate between a transmitter and receiver, they are affected by the surrounding environment. There are many factors that attenuate the signal while traveling through space, such as reflection, diffraction, refraction, and absorption [10]. The path loss model is usually expressed in decibels (dB) and described as follows:  
\[L=\ 10\ n\ \log_{10}d, \tag{3}\]  
The path loss is represented by \(L\), and \(n\) is the path loss exponent, which varies by environment. Typically, the path loss exponent is between 2 and 4, based on the types of metal and objects affecting the signal as it propagates from the sender to the receiver. Variable \(d\) is the distance between the transmitter and the receiver. Therefore, the power received by a node becomes the following:  
\[P_{ri}=P_{t}+K-10\ n\ \log_{10}d_{ij}+X_{\sigma} \tag{4}\]  
where  
\[d_{ij}=\ \sqrt{\left(x_{i}-x_{j}\right)^{2}+\left(y_{i}-y_{j}\right)^{2}} \tag{5}\]  
\(K\) is constant and depends on antenna characteristics. \(P_{t}\) is the node's transmission range measured at the reference distance. \(X_{\sigma}\) is a zero-mean Gaussian distributed random variable. Variables \(i\) and \(j\) are identifiers for the nodes. In this network model, we assume that all nodes are randomly deployed and remain unchanged. Sensors have equal transmit power and are equipped with omnidirectional antenna. The data reach their destinations through a multi-hop network, in which each node forwards its collected data to its neighbors. Each node in the network is assumed to have a table of its neighbors' identification and locations. A constant jammer was adopted in this work and implemented using an omnidirectional antenna and fixed transmit power. Because our focus was selecting boundary nodes and tracking, we assumed all jammed nodes would be detected, and the system would know their location and identification. Figures 1 and 2 illustrate the BNST algorithm. We calculate BNST as follows. After the jammer begins to function, the jammed node locations are denoted as \(N_{j}=\{(x_{i},y_{i_{r}})\}i=1\ldots m\), where \(m\) is the number of jammed nodes. To find the maximum distance between two jammed nodes, the Euclidean distance is used to compute the distance between all nodes inside the jammer region (see Equation (5) above). Therefore, the maximum distance between two nodes becomes \(d_{max}=ID_{i}\), \(ID_{j}\), where \(d_{max}\) is the maximum distance and \(ID_{i}\) and \(ID_{j}\) are the two jammed nodes' identification.