## 2 Related Work  
Routing protocols for WSNs can be classified into flat, location-based and hierarchical/cluster categories [16]. The flat structure can be considered a suitable solution for many IoT applications (in network with homogeneous nodes), such as comfortable homes and offices, healthcare, environmental monitoring, and many smart city services. Many applications employed in these scenarios have low tolerance for packet delay and loss. Routing protocols based on clustering are an alternative to improve QoS and energy consumption for a set of IoT applications [17], such as multimedia-based fire detection [18]. A hierarchical architecture has nodes with different roles or functionalities (heterogeneous nodes, which can be classified as cluster-head and non-head nodes). They work based on clustering sensor nodes, where the nodes of the cluster communicate with each other (sensor-to-sensor), and mainly with the leader node (cluster-head), responsible for communicating outside the cluster (sensor-to-BS). Some nodes (cluster-head) can have cameras and extra batteries [19]. There are many algorithms for the election of cluster-head, which analyze the key features as follows: residual energy, link quality and location [20]. These algorithms require time for cluster formation, generating additional delay and complexity, which are unsuitable for many IoT applications. The architecture of routing protocols based on collecting trees is widely used in WSNs. In this approach, sensor nodes share the same specific destination node or BS. Existing solutions, such as CTP Noe [21] and MultihopLQI [22], dynamically construct a tree of multiple hops for routing messages and data, and, naturally create a traffic pattern of many-to-one. This feature inhibits their general use in IoT due to the dynamic features of their applications, such as smart parking and environmental monitoring. Routing solutions for these scenarios should consider different traffic patterns, for instance one-to-many, many-to-one and many-to-many. In this case, the tree collection protocols represent a solution applicable to a set of IoT applications not addressed in this article. The different routing protocol architectures offer many techniques to increase the network lifetime and improve the QoS. The use of these architectures should be observed according to the characteristics of the applications, including their goals and QoS requirements. Flat-based approaches represent a suitable solution for many homogeneous IoT scenarios, especially due their low operational complexity and high efficiency. Several attempts have been made to achieve satisfactory results by using flat architecture for routing protocols in WSN/IoT applications. Most of the works that have been carried out are based on AODV (The implementation of the AODV protocol is available for downloading at [[http://www.gercom.ufpa.br/downloads/wsn/](http://www.gercom.ufpa.br/downloads/wsn/)]([http://www.gercom.ufpa.br/downloads/wsn/](http://www.gercom.ufpa.br/downloads/wsn/))) (_Ad hoc_On demand Distance Vector) protocol [23], which was originally proposed in RFC 3965. The popularity of AODV is due to its well-defined structure and low complexity. In AODV, on-demand routes can be discovered, which decrease the overhead, by using pairs of Route Request (RREQ) and Route Reply (RREP) messages. However, the route selection process is only carried out on the basis of the minimal number of hops, which is not suitable for ensuring energy-efficiency and reliable data transmission. This can be explained by the fact that in many cases, a short route, in terms of hops, can be more susceptible to packet loss, due to both noise and interference that affect the link quality. The lack of energy-efficiency mechanism results in energy holes and an uneven distribution of scarce network resources. Moreover, AODV only stores one possible route for a given destination node.