## 1 Introduction  
In the dawn of the new era of the Internet of things (IoT), the fast development of wireless communications and device technologies enables the interconnection and exchange of data among sensors. In the near future, the IoT will have an extraordinary impact on humans as a result of an increase in the ubiquity of the Internet by integrating every object with a motive of interaction via embedded systems in many fields such as asset tracking, agriculture, smart homes, and smart cities [1]. There are numerous predictions being made about the growth of connected devices. According to recent studies [2], every person will be expected to have at least six IoT devices, with a monthly global mobile traffic of 77 exabytes. Usually, the devices are expected to cover a large geographical area for a longer span of five to ten years and send interesting data of small size, such as humidity, temperature, and other variables around them, over a longer distance using wireless communications. For reflecting the above requirements, low-power wide area networking (LPWAN) technologies with a low cost, low bandwidth, and a low per-unit consumption have been developed for ubiquitous IoT connectivity of a large geographical area [3], different from conventional IoT networking technologies such as ZigBee and Bluetooth based on a shorter communication range. As representative protocols of LPWAN, LoRa, Sigfox, RPMA (Random Phase Multiple Access), and the Weightless protocol have been developed for LPWAN-based IoT implementation within the unlicensed ISM bands. Among them, LoRa is one of the most successful LPWAN technologies because it is ideally suited for long-distance, low-bit rate, and low power communications. LoRa communication technology was first proposed by SemTech and is now being developed by LoRaTM Alliance [4]. LoRa is a physical layer technology that uses a proprietary spread spectrum technique to modulate signals in unlicensed sub-GHz ISM bands (868 MHZ in Europe, 915 MHZ in North America, and 433 MHZ in Asia). LoRa provides bidirectional communication via the chirp spread spectrum (CSS) modulation, which spreads a narrow-band signal over a wider channel bandwidth, making it more interference resistant [5]. LoRa primarily employs six spreading factors (SF) \(\in\{7,8\ldots,12\}\) to adapt to the trade-off between the data rate and the communication range. In fact, the greater the SF, the greater the range with a lower data rate, and vice versa [6]. The data rates vary with the SF and channel bandwidth, ranging from 300 bps to 50 kbps. According to [7], LoRa technology is based on a star of stars topology, in which GWs relay messages between end devices and a central network server. This model is distinguished by the provision of a long-distance and reliable link via a special modulation technique, in which a LoRa GW collects raw data directly from end devices by single-hop communications and forwards it to a network server (NS) connected by a high-speed backhaul network as shown in Figure 1 [8]. LoRaWAN is a LoRa MAC layer that employs the ALOHA protocol [9], which is managed by an NS [10]. Furthermore, LoRaWAN defines three types of devices with capabilities (classes A, B, and C). Class A devices use pure ALOHA access for the uplink, are battery limited, and can only receive an ACK in two receiving windows during downlink transmission. Class B devices, in contrast to class A, are beacon-based and can open an additional receiving window at predetermined times. Except when transmitting, class C devices are always listening to a channel and consume a lot of energy [11]. The three classes can coexist on the same network, and devices can switch between them. Because of the  
Figure 1: General network architecture for IoT LoRa networks. orthogonality of the sub-bands and the quasi-orthogonality of different SFs, a LoRa GW can receive packets from multiple LoRa devices at the same time.