# A Comprehensive Study of the Use of LoRa in the Development of Smart Cities
## 4 Results of the Analysis of the Selected Works
### Analysis of the Device Layer
#### 4.3.2 Nodes  
Nodes receive and send information to a gateway. Nodes can communicate in two ways within a LoRa ecosystem:  
* Point to point: the node does not require an intermediary device and can communicate directly with other nodes. * Mesh: a gateway is in charge of coordinating the communication between nodes in the network. It has a limited capacity of 250 nodes. LoRa usually communicates in two directions. It can also broadcast to all nodes [69]. Figure 15 shows LoRa class nodes on the basis of LoRa MAC Layer operation:  
* Class A: Offers greater energy savings. It is in listening mode after sending data to the gateway. * Class B: Nodes have default reception windows with the gateway
* Class C: Presents the lowest energy savings  
Nodes must not only measure the required parameters in the different contexts of smart cities, but also need to send the data collected in real time. Depending on the type of application in the city, nodes may require a set of sensors. For instance, to measure nitrate concentration levels, the node needs to manage an array of gas sensors including CO\({}_{2}\), NOx, and O\({}_{2}\) sensors [70]. In some cases, nodes can have different roles. For example, in eHealth, there are safe nodes and health nodes which collect environmental and physiological characteristics. In agriculture, nodes are structured on the basis of roles, i.e., as measuring and receiving nodes [71]. The first ones collect data, the second ones execute some specific action. In projects of measurement of nitrate levels, one node is a sensing node and is in charge of collecting water samples from a stream or lake and measuring nitrate concentrations [63]. Figure 15: LoRa class on the basis of LoRa MAC layer operation. \begin{table}
\begin{tabular}{c c} \hline
**DTH11** & **DTH22** \\ \hline Temperature measured between 0 and 50 \({}^{\circ}\)C & Temperature measured between \(-40\) and \(125\)\({}^{\circ}\)C \\ Temperature measure accuracy 2 \({}^{\circ}\)C & Temperature measure accuracy 0.5 \({}^{\circ}\)C \\ Humidity measured 20\% to 80\% & Humidity measured 0\% to 100\% \\ Humidity measure accuracy 5\% & Humidity measure accuracy 2–5\% \\ Samples frequency 1 Hz & Samples frequency 2 Hz \\ Voltage 3.5 V a 5 V & Voltage 3.3 V a 6 V \\ Amperes consumed 2.5 mA & Amperes consumed 0.3 mA \\ \hline \end{tabular}
\end{table} 
Table 12: Comparison of temperature sensors used in smart city projects. In order to be able to sense a specific aspect of the city, several nodes may be required. For instance, in smart farming, to determine the presence of castors, about 36 nodes are necessary to cover four locations [72]. In some deployments, thousands of nodes can be implemented in a LoRa network [73]. This is an advantage of LoRa; it can support multiple nodes, consuming little transmission power and allowing the delivery of frames with few bytes. Nodes are allowed to transmit up to14 dBm in Europe and up to 22 dBm in America [74]. For transmission, nodes use a transceiver for communication [75; 76]. According to our literature review, different modules are used for the communication between nodes, for example, ESP8266, SX1272, and SX 1276. ESP8266 is an integrated low-consumption chip with 17 General Purpose Input Output (GPIO) ports that allow incorporating LoRa transceiver modules. The operating voltage of ESP8266 is in the average range between 3 and 3.6 V, and the operating current is 80 mA. The operating temperature range is from \(-40\) to 125 \({}^{\circ}\)C. The main communication buses used by ESP8266 are SPI, 12C, UART, and the module supports protocols such as TCP, UDP, HTTP, FTP. ESP8266 uses three operation modes:  
* Active mode: At its full capacity, it consumes about 170 mA. * Sleep mode: A real-time clock (RTC) is active for synchronization. In this mode, ESP8266 maintains data connection and does not require re-establishing the connection again. In this mode, the chip consumes between 0.6 mA and 1 mA. * Deep Sleep: The RTC is not operational. Unsaved data are lost.