## 5 Discussion
Regardless of whether or not a jamming attack exists, as well as regardless of whether a collaborative or cooperative scheme is being used, it has been shown that by increasing the number of nodes and leaving the fixed area of 500 m\({}^{2}\) (an increase in density), the distances between the nodes decrease, and the symptoms that make us realize this are a decrease in the PDR and the RSSI, and an increase in the energy consumed by the node. This is due to shorter distances between nodes, less space for packet transmission, and increased collisions. When there are more collisions, fewer packets reach their destination, and this is observed in the decrease in the PDR. As noted in Equation (3), it is known that the distance between the sender and the receiver is directly proportional to the energy received and inversely proportional to the RSSI. Notwithstanding all the above, by increasing the coverage area leaving the number of nodes fixed (an increase in density), it was found that everything mentioned above can only be valid for networks with areas less than approximately 1000 m\({}^{2}\), since with larger areas the behavior is reversed, having for little dense networks a decrease in the PDR, in the RSSI and an increase in the Energy. This makes sense since when data is transmitted at distant distances, there are atmospheric phenomena, noises typical of the environment where the WSN is installed; if it were an IWSN with very large distances, communication could collapse due to the excess of failed attempts to listen to the channel due to the unintentional noises caused by the machines. Both in the simulations and the experiment, it was found that taking the density of nodes as a parameter for detection can give us a guideline for their future mitigation, contributing to the security of the WSN. **Network immunity**. The collaborative scheme is more resilient to jamming attacks because, although it has a high-power consumption because its processing protocol works harder when a jamming attack occurs, the environment around it is the one that changes, and the previously high energy level is now lower than the rest of the environment found in overhead. The change in the metrics of a cooperative network in the face of an attack of any type of jamming is much greater than the change presented by a collaborative network. According to the results, it can be said that a collaborative protocol offers greater immunity to jamming attacks but consumes more energy. On the other hand, the collaborative scheme maintained better performance in both low-density networks and high-density networks of nodes, which made it ideal for aggressive environments, such as a factory. Everything to be done lays the groundwork for considering these schemes in a jamming mitigation strategy based on a situational routing protocol, which behaves collaboratively under normal conditions but can be collaborative in the face of jamming attacks. This opens a new way of looking at the security management of a WSN. **Symptoms or jamming metrics**. According to the results, we can say the following about the metrics or symptoms: First, the _PDR_ tells us how reliable a node is, so keeping its level high is important. It is a metric based on the results of packets delivered, which makes it optimal to know how secure a network is. This metric can have bad levels not only due to the presence of jamming, but also when there are many collisions in the environment (high-density networks), or when there are failures in the nodes of the neighbors (when they are too far away), or when there are imperfect connections. Secondly, the _RSSI_ maintained at good levels helps us to make the network available to transmit at any time. The health status of the communication channel is measured by this metric. The RSSI translates into availability because the RSSI is affected by the loss of routes, which is when the power in space of the electromagnetic wave that goes from the transmitter to the receiver decreases.