# A Study of LoRa: Long Range & Low Power Networks for the Internet of Things
## 4 The LoRaWAN Protocol
### Components of a LoRaWAN Network  
Several components of the network are defined in the LoRaWAN specification and are required to form a LoRaWAN network: end-devices, gateways (i.e., base stations) and the network server.  
* End-device: the low-power consumption sensors that communicate with gateways using LoRa.  
Figure 6: Map of LoRa field test.  
Figure 7: Packet delivery ratio of the LoRa field test.  
* Gateway: the intermediate devices that forward packets coming from end-devices to a network server over an IP backhaul interface allowing a bigger throughput, such as Ethernet or 3G. There can be multiple gateways in a LoRa deployment, and the same data packet can be received (and forwarded) by more than one gateway.
* Network server: responsible for de-duplicating and decoding the packets sent by the devices and generating the packets that should be sent back to the devices.  
Unlike traditional cellular networks, the end-devices are not associated with a particular gateway in order to have access to the network. The gateways serve simply as a link layer relay and forward the packet received from the end-devices to the network server after adding information regarding the reception quality. Thus, an end-device is associated with a network server, which is responsible for detecting duplicate packets, choosing the appropriate gateway for sending a reply (if any), consequently for sending back packets to the end-devices. Logically, gateways are transparent to the end-devices.  
LoRaWAN has three different classes of end-devices to address the various needs of applications:  
* Class A, bi-directional: Class A end-devices can schedule an uplink transmission based on their own needs, with a small jitter (random variation before transmission). This class of devices allows bi-directional communications, whereby each uplink transmission is followed by two short downlink receive windows. Downlink transmission from the server at any other time has to wait until the next uplink transmission occurs. Class A devices have the lowest power consumption, but also offer less flexibility on downlink transmissions.
* Class B, bi-directional with scheduled receive slots: Class B end-devices open extra receive windows at scheduled times. A synchronized beacon from the gateway is thus required, so that the network server is able to know when the end-device is listening.
* Class C, bi-directional with maximal receive slots: Class C end-devices have almost continuous receive windows. They thus have maximum power consumption.  
It should be noted that LoRaWAN does not enable device-to-device communications: packets can only be transmitted from an end-device to the network server, or vice-versa. Device-to-device communication, if required, must thus be sling-shot through the network server (and consequently, by way of two gateway transmissions).  
The LoRaWAN specification states that LoRaWAN networks should use ISM frequency bands. These bands are subject to regulations regarding the maximum transmission power and the duty cycle. These duty cycle limitations translate into delays between the successive frames sent by a device. If the limitation is at 1%, the device will have to wait 100-times the duration of the last frame before sending again in the same channel.