# Improving Energy Efficiency in LoRaWAN Networks with Multiple Gateways
## 3 LoRa and LoRaWAN Overview
deployment and operation, it also implies that enough gateways should be available to cover the deployment area. A LoRaWAN network has a star-of-stars topology, as illustrated in Figure 2. It is made up of the following entities [5]:  
* Nodes: They are also known as end-devices or motes. Each node contains basically a microcontroller, a radio unit, and other peripherals such as sensors, and only transmits data to gateways using single-hop LoRa communication. * Gateways: They are made up of a LoRa transceiver chip and a baseband processor. They can decode multiple channels simultaneously and support between eight and 64 channels. They simply relay received messages to a central network server via an IP backbone. The IP traffic from a gateway to the network server can be via Wi-Fi, hardwired Ethernet, or a cellular connection. The packet forwarder specifies the protocol used to communicate with the network server. There are various packet forwarders; the two most popular ones are the Semtech User Datagram Protocol (UDP) and Message Queuing Telemetry Transport (MQTT) [22]. The majority of LoRa gateways still come pre-compiled with the Semtech UDP forwarder, which was the original packet forwarder. Gateways also receive network server acknowledgments (ACK) or MAC commands and send them to the intended nodes. Note that there is no association between nodes and gateways, and a packet sent by a node can be received by multiple gateways. * LoRaWAN Server: Consists of a central network server, an application server, and a join server. The LoRAWAN specification treats these servers as if they are always co-located. The network server is the center of the star architecture. It manages network access and functionality and is responsible for routing messages between nodes and LoRaWAN application. It handles node authentication and authorization, data transmission, data rate adaptation, and duplicate packet elimination. The application server processes all data messages received from nodes. Moreover, it generates and sends all application-layer downlink payloads to connected nodes via the network server. Several applications can be connected to a single network server. The join server is in charge of managing the over-the-air (OTA) node-activation procedure. It sends the node's network session key to the network server and the application session key to the appropriate application server. When a node sends a message to the gateway, it is referred to as an uplink, whereas when the gateway sends a data packet to the node, it is known as a downlink. Furthermore, there are two types of messages in any LoRaWAN operation: (1) unconfirmed messages,  
Figure 2: LoRaWAN architecture. in which the nodes do not request a response from the network server, and (2) confirmed messages, in which the nodes do request a response from the network server. LoRaWAN defines three different classes of nodes with different capabilities and power requirements, as illustrated in Figure 3. Class A supports basic bidirectional communications; two receive windows RX1 and RX2 will be opened after RECEIVE_DELAY1 and RECEIVE_DELAY2, respectively, from transmitting uplink messages. During these two receive windows, the network server can send acknowledgment and MAC commands to nodes so as to control transmission parameters such as the spreading factor, power, and bandwidth. RX1 uses the same SF as the original uplink, while RX2 uses SF 12 and is opened only if the downlink message is not received during RX1. Class A implementation is required for all devices when nodes send sporadic data to gateways through an Aloha-based access mechanism. Class A nodes spend most of their time in the sleep state and consume the least energy. Class B extends Class A by adding extra receive windows at scheduled times. The nodes are synchronized by the periodic broadcast of beacons from gateways. Finally, nodes of Class C are permanently listening to the channel with continuously open reception windows.