# LoRaWAN Communication Protocols: A Comprehensive Survey under an Energy Efficiency Perspective
## 2 Background Knowledge
### LoRaWAN Protocol Architecture  
LoRaWAN topology follows a star-of-stars architecture [22], supporting single hop communication between end-devices and GWs, while is divided into three levels, as illustrated in Figure 1. The first level includes the IoT end-devices, which can be sensors or actuators. Sensors are considered to be low-energy end-devices that send and/or receive messages from one or more GWs; hence, communication between end-devices is not supported. The second level consists of GWs which play the intermediate role between end-devices and IoT platform by forwarding in a two-way communication manner the \begin{table}
\begin{tabular}{c p{227.6 pt}} \hline \hline
**Surveys** & **Description** \\ \hline
[3] & Survey LoRaWAN scalability issues and the proposed solutions in massive IoT networks \\
[5] & A technical overview of LoRaWAN technology and state of the art studies proposed about LoRaWAN \\
[6] & Discuss about LPWAN technologies, challenges, and critical aspects of LoRaWAN as well as the most used LoRaWAN simulation tools \\
[16] & Present a general discussion of LoRa, explore different applications of LoRa and propose a solution to integrate edge computing in IoT-based applications \\
[17] & Provide a brief overview of LoRa, investigate the challenges of LoRa and their recent solutions, and discuss some open issues \\
[18] & Categorize state of the art works for LoRaWAN focusing on aspects that affect LoRaWAN performance \\  & Provide an overview of the different routing protocols and the challenges to be addressed in routing protocols, as well as issues faced by multi-hop communication \\
[20] & Discuss about design and research challenges, as well as research issues of LoRa technology \\
[21] & Analyze LPWAN solutions, describe LoRaWAN use-cases and discuss about research challenges among LoRa and other technologies \\  & It provides a survey on communication protocols with emphasis on energy consumption and presents a solution to address the energy efficiency in LoRaWANs. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Summary of state-of-the-art surveys on LoRaWAN. data packets. Finally, at the third level, there are the network servers (NSs) and application servers (ASs). In particular, NS is responsible for decoding uplink messages, as well as routing of downlink messages. These messages are using MAC commands, in order to configure transmission parameters. For example, in multiple GW scenarios, NS selects the optimum route for forwarding a message to the end-device. Typically, this selection is based on a connection quality indicator based on received signal strength indicator (RSSI) and signal-to-noise ratio (SNR) of the GW's previously delivered packets. The selection of the GW takes into account the information transmitted by the multiple copies received on the NS by the end-devices. Alternatively, this decision can be made concerning the availability of the GW. In addition, _NS_ discards duplicates of messages received by multiple GWs. In other words, it acts as the orchestrator of the whole network. Within its main objectives are ensuring security, scalability, and reliability of data routing throughout the network. On the other hand, the _AS_ oversees the safe handling, management, and interpretation of the data, while encrypting and decrypting downlinks and uplinks, respectively. In addition, the AS generates all downlink payloads to the connected end-devices. In order to provide confidentiality, the top-level payload is encrypted with an application session key and for data integrity, a network session key is additionally used. Finally, communication between LoRaWAN GWs and NS is enabled through the internet protocol (IP) stack. As depicted in Figure 2, LoRaWAN star-of-stars topology enables packets reception by all network GWs in the range of the end-device. This increase LoRaWAN's reliability, while introducing network performance bottlenecks in terms of energy autonomy; especially in rural areas, harsh, or challenging radio environments.