## 6 Conclusions  
The configuration that helps to protect a WSN the most is a combination of elements that are summarized in the _jamming detection mechanism_ proposed in this work. To better protect a WSN, it is important to know the ways it is attacked. With the chosen configurations, _constant_ jamming was the one that most affected the PDR and RSSI of the network. In networks with very wide coverage areas, it was observed that the _deceptive_ jammer did not damage the network much since long distances also lost many of the legitimate packets sent by the jammer. On the other hand, _reactive_ jamming is the most effective since in the short time it acts, it considerably damages the WSN, making the network consume more energy especially in networks with a wide coverage area. The damage that the reactive jammer causes is remarkable, consuming less than half the energy that it would cause if it were a constant or deceptive jammer. Finally, the _random_ jammer toggles between sleep mode and the emission of random and legitimate bits, saving energy, which makes it useful for nodes with short battery life. Although it does not damage the network as much as a reactive jammer, this type of jamming accomplishes its objective using few resources. The practical applications of WSN can be classified according to their _density_, being those with more node density in which more abrupt changes in performance metrics occur. The results demonstrated that the proposed algorithm works for areas of medium to high node density, such as smart factory applications. It is recommended to implementing a cooperative approach when both the number of nodes and coverage is small, whereas a collaborative approach is better when the number of nodes increases in the same area. When there are many nodes, packet collisions increase, making it more useful for each node to make sure to process its information before helping the network. The collaborative approach is more resilient than the cooperative to jamming attacks. The simulations and the experiment showed the conditions in which a network scheme can offer greater immunity to the network. In general, and especially in projects that are scalable in number of nodes, it has been shown that it is convenient to use a collaborative configuration, which provides better results in performance metrics. When there is no jamming attack, it is more convenient to preserve the cooperative paradigm since it is easier to configure because one node is the one that maintains the leadership in communication, but when the network is subject to a jamming attack, the entire communication can go down if a collaborative reaction strategy is not planned to help maintain communication between nodes optimally. The energy savings provided by the collaborative configuration in the face of jamming would have a significant impact on industrial maintenance costs since machine sensors are the inputs that a machine has to obtain data from the world and use for its purpose. To achieve quantitative results of this, it will be necessary to involve industrial maintenance metrics. Jamming detection based on performance metrics such as PDR and RSSI helpsincrease network _reliability_ and _availability_ in IWSN. Knowing and detecting the types of jamming will go a long way in keeping production systems up and running in factories, and their rapid detection and mitigation save businesses time and money. A novel element in WSNs is to use performance metrics at the network layer level [59; 60]. Thanks to these metrics, we can propose future works for the improvement of the administration and optimization of the routing protocols. We want to reach a point where the routing protocol can propose the _symptoms_ of jamming and can react through a _mitigation proposal_. This mitigation proposal must use cooperative or collaborative schemes in a situational way.