# MAC Layer Protocols for Internet of Things: A Survey
## 3 Long Range MAC Layer Protocols
### LoRa--Long Range Protocol
Like in reception, the transmission counts on the LoRa modulation characteristic to transmit or receive multiple signals, along the same channel. This is due to the advantage of the orthogonal spreading factor, with a low level of degradation. Localization services or other real-time applications such as ranging are easily handled by LoRa Modulation due to the capacity to discriminate linearly errors due to frequency or time shift effects [112]. The applications can make use of many possible data rates, payload sizes, and bandwidths according to its needs. Another level of diversity is obtained with the use of 125 kHz or 250 kHz according to the spreading factor used. The spectral scattering factor used influences both the final range obtained and the final acquired data rate. The higher the spectral scattering, the greater the maximum range obtained. In contrast, the data rate obtained will be lower. One base station can handle more than 700 end devices (EDs) depending on the conditions. To satisfy the network responsiveness capability, LoRa scheduling methods, and the frequency hopping method used have to assume that the RF channel conditions will not vary during a certain period of time. LoRaWAN is a network specification proposed by the LoRa Alliance that offers a MAC layer based on the LoRa modulation PHY layer. In order to meet the optimization characteristics of the data transmission rate, transmission resource utilization and energy usage, LoRaWAN MAC technology controls the transmission resources. These resources are the bandwidth to be occupied, the spread spectrum factor to be used, and which the transmission power of each node. This combination of features results in the Adaptive Data Rate (ADR) feature [113; 114]. The three classes of devices specified are the following:  
* Class A: The node can initiate the communication and only transmits to the gateway when necessary. To receive messages from the gateway, the node opens a receive window after each transmission. * Class B: Beacons are used to synchronize nodes with the gateway through the insertions of received windows after its transmission. * Class C: except when transmitting, the node stays in the listening mode ready for reception [115; 116]. This class is a limitation for battery powered systems [117]. The communication distance and the message transmission duration time define the data transmission rate reached. Thus, different rates of data transmission are due to the spreading the nodes transmission through different channels. ISM 868 MHz and 915 MHz bands typically operate with 125, 250, and 500 bandwidths (BW). The final data rate is obtained according to the SF and BW chosen. For BW = 7.8 kHz and SF = 12 it is possible to transmit at 22 bps and for BW = 500 kHz and SF = 7, it is possible to transmit up to 27 Kbps. Frequency hopping is also combined to improve external interference mitigation [68]. Figure 22 presents a representation of LoRa and LoRaWAN protocol stacks. The LoRaWAN scalability is a major advantage since it can reach up to millions of devices depending on some factors. Among these factors are: the scenario, the average message transaction rate, the average size of the transmitted message, the number of LoRa channels used, and the number of GFSK channels used [114].