## Appendix A The LoRaWAN Communication Solutions
### LoRa and LoRaWAN Solutions  
LoRaWAN nodes are based on a proprietary physical layer (the LoRa radio), developed and patented by Semtech. LoRa is an example of Chirp Spread Spectrum (CSS) modulation in which a single chirp frequency trajectory codes a symbol made of \(SF\) (the spreading factor) bits. If the chirp bandwidth is \(BW\), the chirp duration is \(T_{C}=2^{SF}/BW\). As a consequence, different \(SF\) values implement virtual channels, due to the quasi-orthogonal nature of the different chirps, thus partially overcoming bandwidth limits. In particular, \(BW\in[125,250]kHz\) and \(SF\in[7..12]\) in Europe, where the nodes operate in the 868 MHz band and must operate in duty-cycle regime. The possible data rates ranges from about 300 bps to 11 kbps, with a maximum allowed message length from 51 byte (at \(SF=12\)) to 242 byte (at \(SF=7\)). Forward Error Correction mechanism is employed for enhancing noise and interference immunity, with coding rates, \(CR\), ranging from \(CR=4/5\) to \(CR=4/8\). The LoRaWAN specifications describe the data link layer, with a medium access strategy as simple as possible, typically based on pure ALOHA or clear channel assessment for limiting collisions in dense environment. The other protocol layers are not existing/defined and depend on the actual application. In particular, such as explained in the following, LoRaWAN is intended for providing a wireless \"last-mile\" connectivity to a large number of sensors in the field with a long refresh rate. For instance, if updates once every one minute are needed, thousands nodes are possible; on the contrary, if an update per day is tolerated, millions of nodes can be managed. From the architectural point of view, two tiers exist in any LoRaWAN network; the first includes the wireless links with the end devices, while the second is the backend in charge of node management and furnishing services to end-users. In few words, a LoRaWAN infrastructure is designed to offer an independent transport service from the data source to the data destination, possible decoupling the owners of the different parts (data source, infrastructure, data destination) and thus allowing innovative service and business. Uplinks originate from nodes and are collected by one or more Gateways (also known as concentrators or base stations) that forwards end-device messages to the backend; downlinks follow the opposite path. Message content is opaque for these Gateways, that run a \"packet forwarder\" software tunneling the incoming payload into an implementation-specific transport protocol, typically User Datagram Protocol (UDP), Transmission Control Protocol (TCP), or a message oriented middleware). The LoRaWAN specifications define a network reference model including a set of (logical) servers (two or three depending on the version compliance): the Network Server (NS); the Application Server (AS) and the Join Server (JS), such as shown in Figure 11. The NS forwards uplinks to the intended AS and queues downlinks from the different ASs; if present, the JS manages the affiliation of new nodes. The NS is the intelligent part of the wireless network and can modify the node behavior (e.g., forcing data rate adaptation strategy) by means of a set of commands defined in the specs. Roaming is optionally supported; indeed, NS functionalities are further split into the only \"serving NS\" (sNS), managing the End-Device; the \"home NS\" (hNS) exchanging information with the AS; several additional \"forwarding NS\" (fNS, each one connected to other Gateways). If the sNS remains the same, roaming is said to be \"passive\"; on the contrary handover roaming is enabled. Regarding security aspects, the LoRaWAN protocol already provides mechanisms for mutual authentication, integrity protection and confidentiality. All the traffic is protected by using Network and Application session keys (which are managed by the JS); the former is used for computing a Message Integrity Code, the latter for end-to-end ciphering.