From architecture to communication
Part I introduced IoT ecosystems, their use in smart cities and the devices that make up a LoRaWAN network. We will now examine how those devices are configured and connected.
We will see what information node messages contain, which activation modes exist and how devices join the network before they begin transmitting data.

Frames and activation modes
A frame is the set of data sent and received by LoRaWAN devices. Each packet includes useful sensor information, such as temperature or pressure, as well as fields required to route and validate communication, including addresses, identifiers and counters.
The section containing measurements is called the payload.

Before a node is put into operation, its activation mode must be established:
- OTAA, Over-The-Air Activation: the device performs a join procedure and negotiates session keys with the network.
- ABP, Activation By Personalization: the session and its keys are configured manually in advance, so the join procedure is omitted.
OTAA join and session keys
An OTAA node sends a JoinRequest message to request admission. If the request is valid, the Network Server replies with a JoinAccept.

During this exchange, session keys such as AppSKey and NwkSKey are derived. Until the session is established, the node cannot validly transmit its sensor information.

These keys are derived from a root key called AppKey. If an AppKey is predictable, reused or exposed, communication confidentiality and authenticity may be compromised.
Key idea: security does not depend on encryption alone. It also requires root-key protection, appropriate rotation and control over device provisioning.
Part III presents a node-spoofing scenario, explains the role of the frame counter and analyzes the consequences for a Smart City.