← Back to articlesIoT · LoRaWAN · Part II of III

Why cybersecurity matters in LoRaWAN networks: part II

A closer look at LoRaWAN frames, node activation modes and the keys that protect communication between devices and servers.

6 min readOriginally published: February 2022Recovered: September 2026By jotita3

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.

Representation of a LoRaWAN network in a smart city

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.

Example frame with pressure, temperature, level and flow fields
A simplified example of a frame 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.

JoinRequest and JoinAccept exchange between a node and the Network Server

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.

LoRaWAN join and session-key establishment flow

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.