IoT Zigbee
IoT Zigbee
IoT Zigbee
Standards
IEEE 802.15.4 ZigBee
2ECDE65 Internet of Things
IEEE 802.15.4
The IEEE 802.15.4 standard is a specification for low-rate wireless
personal area networks (LR-WPANs).
It defines the physical (PHY) and medium access control (MAC) layers
for wireless communication devices with low power consumption,
short range, and low data rates.
IEEE 802.15.4 serves as the foundation for various wireless
communication protocols, including Zigbee, WirelessHART, and
ISA100.11a etc.
• Physical Layer (PHY): The IEEE 802.15.4 PHY layer specifies the radio
characteristics, modulation schemes, and frequency bands for
communication. It operates in the unlicensed 2.4 GHz ISM (Industrial,
Scientific, and Medical) band, as well as other frequency bands like
868 MHz and 915 MHz in some regions. The PHY layer supports
multiple data rates, ranging from 20 kbps to 250 kbps, depending on
the frequency band and modulation used.
• Medium Access Control (MAC) Layer: The MAC layer of IEEE 802.15.4
defines the rules for accessing the shared wireless medium. It includes
features like channel access mechanisms (based on Carrier Sense
Multiple Access with Collision Avoidance, CSMA-CA), frame structures,
addressing, and acknowledgment mechanisms.
IEEE 802.15.4 Protocol Stack
Features
1.The direct sequence spread spectrum (DSSS) modulation technique is used in
IEEE 802.15.4 for communication purposes, enabling a wider bandwidth of
operation with enhanced security by the modulating pseudo-random noise signal.
This standard exhibits high tolerance to noise and interference and offers better
measures for improving link reliability.
Direct Sequence Spread Spectrum (DSSS) is a modulation technique used in
wireless communication to improve the security, reliability, and resistance to
interference of data transmission.
In DSSS, the data signal is spread over a wider bandwidth than the original signal
by mixing it with a much higher bit rate pseudo-random noise (PN) sequence,
known as a spreading code.
DSSS
In DSSS, the sender and receiver agree on a specific spreading code,
which is a pseudo-random binary sequence. This code is used to
"spread" the original data signal by multiplying it with the code
sequence. The result is a signal that occupies a much larger
frequency band.
The original data signal is multiplied by the spreading code, bit by
bit. If the data bit is '1,' the code is left unchanged, but if the data bit
is '0,' the code is inverted. This process is called chip-level
modulation. As a result, the data signal is "spread out" over the
entire bandwidth.
2. The low-speed versions of the IEEE 802.15.4 standard use binary phase
shift keying (BPSK), whereas the versions with high data rate implement
offset quadrature phase shift keying (O-QPSK) for encoding the message
to be communicated.
In CSMA/CA, before transmitting data, a device may send a short Request to Send (RTS) frame to
the intended recipient. If the recipient is ready to receive the data, it responds with a Clear to
Send (CTS) frame. This exchange helps ensure that the channel will be reserved for the upcoming
data transmission and reduces the chances of collision.
After sending a data frame, the sender expects to receive an acknowledgment (ACK) frame from
the recipient. If the sender doesn't receive an ACK within a certain timeframe, it assumes that a
collision occurred or that the data was not successfully received, prompting it to retransmit the
data.
To further reduce the possibility of collisions, CSMA/CA devices may introduce a random backoff
period after sensing that the channel is busy. This means that if a device detects the channel is
busy after attempting to transmit, it will wait for a random amount of time before retrying. This
randomization minimizes the likelihood of multiple devices retrying their transmissions
simultaneously.
Power Consumption
1 Low Duty Cycle Operation : Typically less than 1% . Remaining time
in sleep mode
2 Low Data Rate
3 MAC Layer efficient protocols
4 Sleep mode synchronizations
5 Beacon Mode
6 Energy efficient routing
7 Typical power consumption: 0.5 mW
8 Line of Sight transmission range varying from 10 m to 75 m
RFD and FFD
The IEEE 802.15.4 standard supports two types of devices:
1) reduced function device (RFD) and 2) full function devices (FFD).
FFDs can talk to all types of devices and support full protocol stacks.
However, these devices are costly and energy consuming due to
increased requirements for support of full stacks.
RFDs can only talk to an FFD and have lower power consumption
requirements due to minimal CPU/RAM requirements.
Discuss the following Terms:
1. Direct Sequence Spread Spectrum
2. Offset – QPSK
3. Carrier Sense Multiple Access – Collision Avoidance
4. FFD and RFD
IEEE 802.15.4 supported devices and N/W
IEEE 802.15.4 Network
The IEEE 802.15.4 standard supports two network types: 1) Beacon-
enabled networks and 2) non-beacon-enabled networks.
The periodic transmission of beacon messages characterizes beacon-
enabled networks. Here, the data frames sent via slotted CSMA/CA
with a super frame structure managed by a personal area network
(PAN) coordinator.
These beacons are used for synchronization and association of other
nodes with the coordinator. The scope of operation of this network
type spans the whole network.
Non-Beacon Enabled N/W
In contrast, for non-beacon-enabled networks, unslotted CSMA/CA
(contention based) is used for transmission of data frames, and
beacons are used only for link layer discovery.
This network typically requires both source and destination IDs of
the communicating nodes.
As the IEEE 802.15.4 is primarily a mesh protocol, all protocol
addressing must adhere to mesh configurations such that there is a
decentralized communication amongst nodes.
IEEE 802.15.4 Frame
Beacon frames are used for signaling and
synchronization;
Data transmission is done through the data
frames; and message reception is confirmed
using the acknowledgment frames.
MAC and command frames are used for
association requests/responses, dissociation
requests, data requests, beacon requests,
coordinator realignment, and orphan
notifications.
Explain IEEE 802.15.4 Network components.
Application Customer
API
Security
32- / 64- / 128-bit encryption ZigBee
Alliance
Network
Star / Mesh / Cluster-Tree
MAC
IEEE
PHY 802.15.4
868MHz / 915MHz / 2.4GHz
802.15.4 PHY
Explain the main features of Zigbee Protocol.
Device Classes
Traffic Type
Full function device (FFD)
◦ Periodic data
◦ e.g. sensors Can function in any topology
◦ Intermittent data Capable of being Network coordinator
◦ e.g. light switch Can talk to any other device (FFD/RFD)
◦ Repetitive low latency data Reduced function device (RFD)
◦ e.g. mouse
Limited to star topology
Cannot become network coordinator
Talks only to FFDs
IEEE 802.15.4 MAC Layer
Cluster Tree
Advantage
• Low routing cost
• Allow multihop communication
Cluster Tree PAN coordinator
Disadvantage
• Route reconstruction is costly Full Function Device
• Latency may be quite long Reduced Function Device
ZigBee Device Types
Security
•Zigbee provides three security mechanisms:
◦ Access Control Lists (ACL):Set of rules or permissions that determine what actions are
allowed or denied on a network or computer system
◦ 128-bit AES encryption: Advanced Encryption Standard-Same key for Encrypt and Decrypt
◦ Message freshness timers: Messages are up to date and not expired
•Multiple keys:
◦ Master key: The master key may be pre-installed by a manufacturer or entered by a manual
process with the user.
◦ Network key: This key will provide protection at a network level for outside attackers.
◦ Link key: This forms a secure binding between two devices
Zigbee uses 128-bit keys as part of its specification within the MAC and NWK layers.
Zigbee
• ZigBee is a technological standard designed for control and sensor networks
• Based on the IEEE 802.15.4 Standard
• Created by the ZigBee Alliance –
• Organization defining global standards for reliable, cost‐effective, low power
wireless applications
Slave device/node:
• These devices perform actions based on commands they receive.
• These devices cannot communicate with neighbour slave nodes
unless instructed to do so via a command.
• Slaves can store routing information but do not compute or update
routing tables.
• Acts as a repeater in a mesh.
Z-Wave addressing
The addressing scheme is kept simple to minimize traffic
and conserve power.
There are two fundamental addressing identifiers:
• Home ID:
• This is a 32-bit unique identifier that is pre-
programmed in controller devices to assist with
identifying Z-Wave networks from each other.
• During network start, all Z-wave slaves have a
home ID of zero and the controller will
systematically populate the slave nodes with the
correct home ID.
• Node ID:
• This is an 8-bit value that is assigned to each slave
by the controller and provides addressing of slaves
in the Z-wave network.
Compare ZigBee an Z-wave.
ND is the process of discovering new neighbours, as a mesh can grow, shrink, and
transform, resulting in new and changing neighbour relations.
There are two basic processes and four basic message types in ND:
• Finding neighbours: Includes Neighbour Registration (NR) and Neighbour
Confirmation (NC) phases
• Finding routers: Includes Router Solicitation (RS) and Router Advertisement (RA)
phases
Explain Neighbour Discovery for 6LoWPAN protocol.
Header Compression
Header compression in 6LoWPAN is a technique that reduces the size of IPv6
headers before they are transmitted over the air. This is necessary because
low-power wireless networks typically have very small MTUs (Maximum
Transmission Units).
Header compression is a critical feature of 6LoWPAN (IPv6 over Low-Power
Wireless Personal Area Networks) that helps reduce the overhead associated
with transmitting IPv6 packets over low-power and low-bandwidth wireless
networks. Given the constrained nature of these networks, header
compression is essential to optimize the utilization of available resources.
6LoWPAN header compression works by exploiting the following properties of
IPv6 headers:
• Some of the fields in the IPv6 header can be inferred from other fields or from
the context of the communication.
• The values of some of the fields in the IPv6 header are often predictable.
• Motivation: The standard IPv6 header is 40 bytes in size, which is relatively large for networks with
constrained resources. In contrast, the typical IEEE 802.15.4 frame, commonly used in 6LoWPAN
networks, has a much smaller frame size, often around 127 bytes. Transmitting full-sized IPv6 packets
without compression would result in significant overhead and inefficient use of bandwidth.
• Context-based compression: 6LoWPAN header compression can exploit the context of the
communication to reduce the size of the IPv6 header. For example, if the source and destination
addresses have already been exchanged in previous messages, then the source and destination
addresses can be compressed.
• There are two main header compression formats defined in 6LoWPAN: LOWPAN_HC1 and
LOWPAN_HC2.
1. LOWPAN_HC1: This format is designed for scenarios where the source and destination are part of the
same 6LoWPAN network and share a common prefix. It compresses the IPv6 header down to as few as
two bytes.
2. LOWPAN_HC2: LOWPAN_HC2 is used when the source and destination devices do not share a
common prefix. It provides a more general-purpose compression mechanism and is slightly less efficient
than HC1 but works in a wider range of network topologies.
Fragmentation and Reassembly: When header compression is applied to an IPv6
packet, it is important to note that the size of the compressed packet might still
exceed the maximum frame size supported by the wireless network. In such cases, the
packet is fragmented into smaller fragments that fit within the frame size. Header
compression is applied separately to each fragment. The receiving end reassembles
the fragments and decompresses the headers to reconstruct the original IPv6 packet.