IoT
UNIT-II PROTOCOLS
Protocol Standardization for IoT
• The Internet of Things (IoT) consists of a vast network of connected devices that
communicate and exchange data. To ensure seamless interoperability, reliability, and
security, standardized communication protocols are essential. These protocols enable
IoT devices to interact efficiently across different platforms, networks, and
manufacturers.
• IoT protocols can be categorized into three main types:
1. Device-to-Device (D2D) Communication
2. Device-to-Gateway (D2G) Communication
3. Device-to-Cloud (D2C) Communication
Network and Communication Protocols
Messaging and Application Layer Protocols
Data and Device Management Protocols
Efforts
• Since IoT connects billions of devices worldwide, standardization efforts
are essential to ensure interoperability, security, and scalability across
different industries and technologies. Various global organizations and
consortiums are working to establish universal IoT standards.
• Key Standardization Efforts in IoT:
1. International Standardization Organizations
2. Industry Alliances and Consortiums
3. Government and Regional Efforts
1. International Standardization Organizations
• ISO/IEC (International Organization for Standardization &
International Electrotechnical Commission): Focuses on security,
architecture, and data management in IoT. Example: ISO/IEC 30141 –
Reference architecture for IoT systems.
• ITU (International Telecommunication Union): Defines global
communication protocols for IoT devices. Example: ITU-T Y.2060 – IoT
framework and terminology.
2. Industry Alliances and Consortiums
• IETF (Internet Engineering Task Force): Develops networking protocols like 6LoWPAN,
CoAP, and RPL for IoT communication.
• IEEE (Institute of Electrical and Electronics Engineers): Defines wireless communication
standards such as IEEE 802.15.4 (Zigbee) and IEEE 802.11ah (Wi-Fi HaLow for IoT).
• OneM2M: Focuses on machine-to-machine (M2M) communication standards.
• Industrial Internet Consortium (IIC): Works on industrial IoT (IIoT) standards for
manufacturing and automation.
• AllSeen Alliance & Open Connectivity Foundation (OCF): Develops open-source IoT
frameworks for device interoperability.
3. Government and Regional Efforts
• EU’s AIOTI (Alliance for Internet of Things Innovation): Promotes IoT
standardization across Europe.
• US NIST (National Institute of Standards and Technology): Works on IoT security,
privacy, and trustworthiness standards.
• China’s National IoT Standards: Focuses on IoT security and smart city applications.
Machine-to-Machine (M2M) Protocols
• M2M refers to direct communication between devices without human
intervention.
• These devices exchange information using wired or wireless networks and
often send data to a central server or cloud platform for further processing.
• M2M is commonly used in industries for automation and monitoring,
where machines interact with each other to optimize processes, reduce
costs, and improve efficiency.
• Several communication protocols enable M2M communication. MQTT (Message
Queuing Telemetry Transport) is widely used due to its lightweight nature and low
bandwidth requirements, making it suitable for devices with limited resources.
• Another important protocol is CoAP (Constrained Application Protocol), which is
designed for small IoT devices to communicate efficiently over the internet.
• HTTP (Hypertext Transfer Protocol) is often used for web-based applications,
while AMQP (Advanced Message Queuing Protocol) ensures secure and reliable
messaging in enterprise IoT solutions.
• Example: M2M communication is a smart thermostat that automatically adjusts
the temperature based on the user’s preferences and external weather conditions.
M2M Protocols
1. CoAP (Constrained Application Protocol): A lightweight, binary protocol used
for constrained networks and devices. Just like HTTP.
2. MQTT (Message Queue Telemetry Transport): A lightweight, publish
subscribe-based protocol used for device communication.
3. LWM2M (Lightweight Machine-to-Machine): A device management protocol
designed for constrained devices and networks. Used in remote device management
4. HTTP/2: An updated version of the HTTP protocol, which provides improved
performance, security, and multiplexing capabilities.
Wireless Sensor Network (WSN) Protocols
• WSNs consist of multiple sensors deployed in an area to collect and transmit data wirelessly.
These sensors work together to monitor various environmental conditions such as temperature,
humidity, pressure, and air quality.
• Zigbee is a popular choice for low-power, short-range communication in applications like
smart homes and industrial automation.
• LoRaWAN (Long Range Wide Area Network) is designed for long-distance, low-power
communication, making it ideal for agriculture, smart cities, and environmental monitoring.
• Bluetooth Low Energy (BLE) is another common protocol that is widely used in wearable
devices and healthcare applications due to its low power consumption.
• For E.g. smart agriculture, soil moisture sensors deployed in a field can transmit data
wirelessly to a cloud-based system and smart cities, traffic sensors placed on roads can monitor
congestion levels and adjust traffic signals to improve traffic flow.
WSN Protocols
• IEEE 802.15.4
• Zigbee
• Thread
• RPL (Routing Protocol for Low-Power and Lossy Networks)
• 6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks)
Difference Between M2M and WSN
SCADA (Supervisory Control and Data Acquisition)
• SCADA is a system used for remote monitoring and control of industrial processes. It
collects real-time data from sensors, machines, and other devices, allowing operators to
supervise and manage operations from a central location. SCADA is widely used in
industries like power plants, water treatment, oil and gas, and manufacturing to ensure
efficient and automated processes.
How SCADA Works?
• Sensors and PLCs (Programmable Logic Controllers) collect data from
machines and equipment.
• This data is sent to a central SCADA system via communication networks.
• The SCADA system processes the data and displays it on a monitoring
dashboard for human operators.
• Operators can control machines remotely based on the collected data, ensuring
safety and efficiency.
• For e.g. SCADA monitors water levels, pressure, and chemical balance
RFID (Radio Frequency Identification) Protocol
• RFID is a wireless communication technology used for identifying, tracking, and
managing objects. It works by using RFID tags attached to objects and RFID
readers that scan these tags to retrieve information. RFID is commonly used in
logistics, inventory management, security systems, and smart transportation.
• How RFID Works?
1. An RFID tag (attached to an object) contains a unique ID and data.
2. An RFID reader emits radio waves that activate the tag.
3. The tag sends back data to the reader.
4. This data is processed and stored in a central database for tracking and
management.
Types of RFID Tags
• Passive RFID Tags – Do not have a battery; powered by the reader’s radio waves.
Used for inventory tracking and access control.
• Active RFID Tags – Have their own battery and can send signals over long
distances. Used for vehicle tracking, toll collection, and large asset monitoring.
• For e.g. Retail Stores to reducing manual stock checking, Airports to track
luggage and reduce lost baggage incidents and Toll Collection on vehicles allow
automatic toll payments without stopping at booths.
Difference Between SCADA and RFID
Issues with IoT Standardization
• Lack of Universal Standards
• Interoperability Issues
• Security and Privacy Challenges
• Scalability Limitations
• Data Compatibility Issues
• Regulatory and Compliance Challenges
• Power and Connectivity Constraints
Unified Data Standards in IoT
• Unified Data Standards in IoT refer to a common
framework that ensures different IoT devices and
platforms can seamlessly communicate, exchange, and
process data in a consistent, structured, and interoperable
manner. The goal of these standards is to eliminate
compatibility issues, improve data security, and enable
better integration across various IoT applications.
Why Are Unified Data Standards Important?
• Interoperability – Different IoT devices use various communication protocols. Unified
data standards ensure that data from multiple devices can be shared and understood
universally.
• Data Consistency – Standardized formats prevent data mismatches and ensure all
devices use the same structure for data collection, transmission, and storage.
• Security & Privacy – A common standard helps enforce strong encryption,
authentication, and access control policies, reducing security risks.
• Scalability – Businesses can easily expand their IoT networks when devices follow
unified standards, ensuring smooth data exchange across platforms.
• Regulatory Compliance – Many industries (e.g., healthcare, automotive, and smart
cities) require compliance with global data privacy laws (e.g., GDPR, HIPAA), which
are easier to implement with standardized data formats.
Key Unified Data Standards in IoT
Data Formats and Protocols:
1. JSON (JavaScript Object Notation) – A lightweight, human-readable format widely used for IoT data
exchange.
2. XML (Extensible Markup Language) – Another structured format used for data storage and transmission.
3. MQTT (Message Queuing Telemetry Transport) – A lightweight messaging protocol optimized for low-
bandwidth IoT communication.
4. CoAP (Constrained Application Protocol) – Used for IoT devices with limited power and memory, mainly in
sensor networks.
5. OPC UA (Open Platform Communications Unified Architecture) – A key standard for industrial IoT (IIoT),
enabling secure and platform-independent data exchange.
2. Industry-Specific Standards
• ISO/IEC 30141 – A globally recognized reference architecture for IoT systems, ensuring
uniformity in IoT infrastructure.
• oneM2M – A standardized framework that enables different IoT devices and applications to
work together across industries.
• GS1 (Global Standards for Identification & Data Capture) – Used in supply chain and retail
IoT applications for barcode and RFID-based tracking
• HL7 (Health Level 7) – A standard used in healthcare IoT for medical data exchange and
interoperability between hospitals, devices, and applications.
3. Cloud & Edge Data Standards
• O-DEF (Open Data Element Framework) – Provides a common structure for IoT data
exchange between cloud and edge devices.
• Data Distribution Service (DDS) – Enables real-time data sharing in autonomous systems,
robotics, and military applications.
• FIWARE – An open-source platform supporting smart cities and IoT applications with a
standard data model.
Challenges in Implementing Unified Data Standards
1. Multiple Competing Standards – Different industries follow their own standards, making
global unification difficult.
2. Legacy Systems – Older IoT devices may not support modern data standards, creating
integration issues.
3. Security Concerns – Ensuring end-to-end encryption and compliance with privacy laws
across various data standards is challenging.
4. Rapid Evolution of IoT – New technologies (e.g., 6G, AI-driven IoT) require continuous
updates to data standards.
Protocols in IoT
• Protocols in the Internet of Things (IoT) define the rules and standards for
communication between connected devices, sensors, gateways, and cloud platforms.
These protocols enable efficient data exchange, connectivity, and security in an IoT
ecosystem. They are broadly classified into three categories:
1. Communication Protocols (for transmitting data)
2. Networking Protocols (for connecting devices)
3. Security Protocols (for ensuring data protection)
1. Communication Protocols (Data Exchange in IoT Devices): These protocols handle the exchange
of data between IoT devices and the cloud.
• MQTT (Message Queuing Telemetry Transport)
• Lightweight and efficient protocol for low-power IoT devices.
• Works on TCP/IP and is widely used in smart homes, healthcare, and industrial automation.
• Uses a publish-subscribe model for efficient data transmission.
• CoAP (Constrained Application Protocol)
• Designed for low-power, constrained IoT devices.
• Works on UDP, making it faster than HTTP
• Used in smart grids, smart lighting, and automation.
• HTTP (Hypertext Transfer Protocol)
• Standard protocol for web-based IoT applications.
• Consumes more power, making it less ideal for battery-powered IoT devices.
• Used in smart appliances, cloud communication, and RESTful APIs.
• AMQP (Advanced Message Queuing Protocol)
• Ensures secure and reliable message delivery.
• Used in banking, cloud services, and business applications.
• DDS (Data Distribution Service)
• High-performance protocol for real-time applications.
• Used in autonomous vehicles, robotics, and military systems.
2. Networking Protocols (Connectivity for IoT Devices): These protocols enable IoT
devices to communicate over wireless or wired networks.
• Wi-Fi
• High-speed, short-range communication.
• Used in smart homes, offices, and industrial IoT (IIoT).
• Bluetooth & Bluetooth Low Energy (BLE)
• Low-power, short-range communication.
• Used in wearable devices, health monitors, and smartwatches.
• Zigbee
• Low-power, low-data rate wireless communication.
• Used in home automation (smart bulbs, smart locks), industrial monitoring.
• LoRaWAN (Long Range Wide Area Network)
• Low-power, long-range communication.
• Used in smart cities, agriculture, and environmental monitoring.
• NB-IoT (Narrowband IoT) & LTE-M
• Cellular-based IoT connectivity with low power consumption.
• Used in smart meters, smart agriculture, and industrial monitoring.
3. Security Protocols (Data Protection in IoT Networks): Security
protocols ensure encryption, authentication, and secure communication
between IoT devices.
• DTLS (Datagram Transport Layer Security)
• Provides encryption for UDP-based communication like CoAP.
• Used in smart homes, medical devices, and industrial IoT.
• TLS/SSL (Transport Layer Security / Secure Sockets Layer)
• Encrypts HTTP, MQTT, and other protocols to secure data transmission.
• Used in web applications, smart devices, and cloud-based services.
• AES (Advanced Encryption Standard)
• Encrypts IoT data to protect it from cyber threats.
• Used in IoT security systems, industrial IoT, and financial transactions.
• IPSec (Internet Protocol Security)
• Provides end-to-end encryption for secure IoT communication.
• Used in VPNs, industrial IoT, and government networks.
IEEE 802.15.4 (LR-WPAN)
• IEEE 802.15.4 is a low-cost, low-data-rate wireless personal area network i.e
LR-WPAN.
• It is a standard of personal are network
• The main aim of IEEE 802.15.4 standard defines of physical/MAC layer.
• This operates under unlicensed frequency band.
• It has low data rate solution.
• It has multilayer battery life with very low complexity.
• Features- low power consumption, reduce transmission rate.
• Applications- Home automation, remote control
IEEE 802.15.4e introduces the following general
functional enhancements
1. Low Energy (LE): This mechanism is intended for applications that can trade
latency for energy efficiency. It allows a node to operate with a very low duty
cycle.
2. Information Elements (IE): It is an extensible mechanism to exchange
information at the MAC sublayer.
3. Enhanced Beacons (EB): Enhanced Beacons are an extension of the 802.15.4
beacon frames and provide a greater flexibility. They allow to create application
specific frames.
4. Multipurpose Frame: This mechanism provides a flexible frame format that
can address a number of MAC operations. It is based on IEs.
5. MAC Performance Metric: It is a mechanism to provide appropriate
feedback on the channel quality to the networking and upper layers, so that
appropriate decision can be taken.
6. Fast Association (FastA): The 802.15.4 association procedure introduces a
significant delay in order to save energy. For time-critical application latency has
priority over energy efficiency.
IEEE 802.15.4e defines five new MAC behavior
modes
1. Time Slotted Channel Hopping (TSCH): It targets application domains such as industrial
automation and process control, providing support for multi-hop and multichannel communications,
through a TDMA approach.
2. Deterministic and Synchronous Multi-channel Extension (DSME): It is aimed to support both
industrial and commercial applications.
3. Low Latency Deterministic Network (LLDN): Designed for single-hop and single channel
networks
4. Radio Frequency Identification Blink (BLINK): It is intended for application domains such as
item/people identification, location and tracking.
5. Asynchronous multi-channel adaptation (AMCA): It is targeted to application domains where
large deployments are required, such as smart utility networks, infrastructure monitoring networks, and
process control networks.
BACnet Protocol
• A data communication protocol that is used to build an automated control network, is known as
BACnet or Building Automation Control Network.
• used for interoperability between cooperating building automation devices.
• BACnet Protocol includes a set of rules for governing the data exchange on a computer network
that simply covers all from what type of cable to utilize, to form a particular command or
request in a normal way.
• BACnet specification includes three major parts. Primary, Secondary, and tertiary.
• primary part defines a technique to represent any kind of building automation apparatus in a
normal way.
• The secondary part describes messages that can be transmitted across a network of computers to
check and manage such equipment.
• The final part describes a set of suitable LANs which are used for conveying BACnet
communications.
Why is Bacnet Protocol required?
• BACnet defines common methods that different manufacturers can follow to make their devices
work with others.
• It ensures interoperability between different systems and components.
• It explains how data is formatted and how it travels from one device to another on the network.
• BACnet provides services (like rules and messages) to send and receive data between BACnet
devices (nodes).
• It includes messages that help identify devices and their location on the network.
• BACnet is widely used in building automation systems (like HVAC, lighting, security, etc.).
• Building owners and designers use BACnet to create systems where devices from different
companies work together.
• It doesn't define what features or systems a user must have, but gives standard tools to help
design compatible systems.
• BACnet is used in all types of automated building systems.
It allows different products (from various manufacturers) to work together in systems like:
• Security systems
• Fire safety
• Lighting
• Elevators
• HVAC (Heating, Ventilation, and Air Conditioning)
• Defines a general model for how automation devices should work.
• Specifies a method to define the data inside these devices.
• Describes how one device can ask another to perform certain actions (using communication
protocols).
• To achieve seamless interoperability across different systems in a building.
BACnet Protocol Architecture
• BACnet Protocol Use: Mainly used in lighting controls, HVAC systems, and
gateways in building automation.
• Lightweight Communication: Designed for efficient, low-overhead communication.
Optimized for:
• Short messages
• Small networks
• Interconnected systems (inter-networks)
• BACnet uses a collapsed architecture, meaning it does not use all 7 layers of the OSI model.
• It maps to 4 layers of the OSI model:
Application layer, Network layer, Data link layer, Physical layer
• Only the Application Layer and Network Layer are specific to BACnet.
• Session and Transport Layers are not used in BACnet.
• The Application Layer handles the functions of the missing Session and Transport layers.
• This design is lightweight and efficient, making it suitable for:
• Short messages
• Small networks
• Inter-network communication
• Widely used in HVAC(heating, ventilation, and air conditioning), lighting controls, gateways,
and automated building systems.
BACnet Physical Layer
• The upper layers of BACnet do not depend on the physical layer.
• Physical layer of BACnet makes it feasible for BACnet to be executed on
different networks.
• The physical layers of BACnet have been specified with
ARCNET(Attached Resource Computer NETwork), Ethernet, IP tunnels,
BACnet/IP, RS-232, RS485, and Lonworks/LonTalk.
• RS232 is for point-to-point communication.
• RS485 supports up to 32 nodes with a distance of 1200 m at 76Kbps.
BACnet Protocol Link Layer
• BACnet is implemented with LonTalk or IEEE802.2 link layers.
• PTP (Point to Point) data link is used for RS-232 connections.
• MS/TP data link is used for RS-485 connections.
• BVLL (BACnet Virtual Link Layer) defines services needed at the link
layer.
• IP-BACnet uses BVLL to send control data in a virtual link header.
• No router is needed — devices communicate directly over IP networks.
• BBMD (BACnet Broadcast Management Device) is used for
broadcasting.
• BACnet broadcast messages are converted to IP-based
broadcast/multicast.
BACnet Network Layer
• This layer simply specifies the required addresses of the network for
routing.
• BACnet network includes a minimum of one or above segments that are
connected with bridges once they utilize similar LAN technologies.
• If they utilize various LAN protocols then they are connected through
routers.
Application Layer
• BACnet does not separate the presentation and application layers.
• It handles reliability, sequencing, and segmentation (usually done by session/transport
layers).
• BACnet uses devices as objects to exchange service primitives.
• These primitives are defined using ASN.1 syntax.
• Data is serialized using ASN.1 BER (Basic Encoding Rules).
BACnet Security Layer
• BACnet security enables secure communication between devices.
• Device-A requests a session key from the key server to talk securely with Device-B.
• The session key (SKab) is sent to both devices by the key server.
• BACnet uses 56-bit DES encryption for securing data exchange.
Modbus
• Modbus was developed in 1979 by Modicon for industrial automation.
• It was originally used in Modicon programmable controllers.
• It became a standard for transferring I/O data and register info between
control and monitoring devices.
• Modbus is widely accepted and is now an open, public-domain protocol.
• It requires a license, but there’s no royalty fee for using it.
• Modbus uses a master-slave (client-server) communication model.
• Only the master (client) initiates queries (transactions).
• Slaves (servers) respond by sending data or performing requested actions.
• A slave can be any device like an I/O transducer, valve, or sensor.
• A host computer is usually the master, running control software.
• Some devices can act as both master and slave.
Types of Modbus communication protocol
• Modbus serial protocol (the original version) is a master/slave protocol, e.g. one master
that controls the Modbus data transactions with multiple slaves that respond to the
master’s requests to read from or write data to the slaves.
• Modbus TCP, also known as Modbus TCP/IP, uses a client/server architecture.
• In a standard Modbus serial network, there is only one master and as many as 247
slaves, each with a unique slave address. And there are two types of serial Modbus,
Modbus RTU and ASCII.
Difference between Modbus RTU and Modbus ASCII
Feature Modbus RTU Modbus ASCII
Data Format Binary (not human-readable) Text (human-readable)
Message Size Smaller (more compact) Larger (more overhead)
Speed/Efficiency Faster due to compact size Slower due to larger size
Ease of Debugging Difficult (not readable) Easier (readable format)
Cannot communicate with Cannot communicate with
Communication Mode
ASCII devices RTU devices
Preferred in high-speed Useful in debugging and
Use Case
applications readability
Properties of Modbus ASCII and Modbus RTU
Modbus TCP (Ethernet)
• Modbus TCP is also known as Modbus TCP/IP.
• It uses the Modbus RTU protocol but runs over Ethernet via TCP/IP.
• TCP/IP handles data transmission, while Modbus defines the structure and rules for communication.
• Allows devices to easily connect and communicate over existing Ethernet or fiber networks.
Supports:
• More addresses than RS485.
• Multiple masters.
• Higher speeds (up to gigabit).
• Modbus RTU supports up to 247 nodes, while Modbus TCP can handle around
1,024 devices (depending on the network).
• Widely used in process control and industrial automation.
• Most popular and fastest-growing Modbus variant over Ethernet.
• Unlike Modbus RTU and Modbus ASCII, Modbus/TCP allows multiple
clients (masters) to communicate with the same server (slave) at the same
time.
• Since it runs over Ethernet using TCP/IP, multiple messages can be sent,
buffered, and delivered without needing:
Token passing, Full control of the communication bus
• This is different from protocols like RS485/RS422, where only one master
can control the bus at a time.
Addressing and messaging
• 16-bit Register Structure: Modbus uses 16-bit registers for storing and accessing data.
• Each register can: Hold integer values, or Represent 16 on/off (binary) states (called coils).
• Types of Registers:
Coils – Digital outputs (Read/Write)
Discrete Inputs – Digital inputs (Read-Only)
Input Registers – Analog inputs (Read-Only)
Holding Registers – Analog outputs or general-purpose data (Read/Write)
• Register Numbering (Typical):
• 0xxxx – Coils
• 1xxxx – Discrete Inputs
• 3xxxx – Input Registers
• 4xxxx – Holding Registers
• Addressing Variability: While the standard defines these ranges, some
devices may use custom addressing formats, so it’s always good to check
the device documentation.
• ADU (Application Data Unit) contains:
Slave/Server address
Function code
Start addresses
Data (to write or read)
Error checksum (CRC/LRC/Checksum)
• PDU (Protocol Data Unit) contains:
Function code
Data to be transmitted
• Size Limit:
The serial Modbus PDU is limited to 256 bytes, inherited from early Modbus networks.
Modbus Addressing:
• Slave Address Range:
• 1 to 247: For user devices.
• 248 to 255: Reserved for future use or special cases.
Modbus Transaction Types:
• Serial Modbus: Standard format with all fields: address, function, data, and CRC.
• Modbus TCP:
Similar data structure but:
Uses IP address instead of slave address.
Ethernet overhead replaces traditional CRC.
Checksum handled by the TCP/IP layer.
Slave address and CRC are not needed unless connecting to a serial device via gateway.
• Function Code:
• Indicates what action the slave should perform:
• Examples: Read data, Write data, Report device status
KNX:
• KNX (Konnex) is a standardized communication protocol
• used in smart homes, building automation, and IoT applications
• It enables devices like lighting systems, HVAC (Heating, Ventilation, and Air
Conditioning), security systems, and smart appliances to communicate with each
other for seamless automation.
• Developed by: KNX Association (based on the European Home Systems
Protocol, BatiBUS, and EIB)
• Standardized as: ISO/IEC 14543-3 (International Standard)
• Used in Smart buildings, industrial automation, IoT-enabled homes
How Does KNX Work?
• KNX follows a distributed control system where multiple devices (sensors, actuators,
controllers) communicate over a shared network.
• Each KNX device operates independently, removing the need for a central controller.
• Devices from different manufacturers can communicate using the KNX protocol.
• Example:
A motion sensor detects movement and sends a signal via KNX to turn on the lights.
A thermostat adjusts the room temperature based on data from a temperature sensor.
KNX Communication Mediums
1. KNX TP (Twisted Pair Wiring)
• Uses two-wire cables for communication
• Best for new installations in smart buildings
• Low energy consumption and reliable communication
2. KNX RF (Radio Frequency)
• Uses wireless communication (868 MHz in Europe)
• Best for retrofit solutions in existing buildings
• Suitable for smart homes and IoT applications
3. KNX IP (Ethernet & Internet Protocol)
• Uses TCP/IP over Ethernet or Wi-Fi
• Enables remote monitoring and cloud integration
• Best for IoT and cloud-based automation
4. KNX PL (Power Line)
• Uses existing electrical wiring for communication
• Best for older buildings where installing new cables is difficult
KNX Network Components
1. Sensors (Input Devices)
• Measure parameters like temperature, light levels, humidity, motion
• Send data to actuators or controllers
• Example: A light sensor detects brightness and sends data to control the room lighting.
2. Actuators (Output Devices)
• Receive signals from sensors and control devices like lights, motors, and HVAC systems
• Example: A motorized window blind adjusts automatically based on sunlight levels.
3. System Components (Controllers & Gateways)
• Controllers process sensor data and send commands to actuators
• Gateways connect KNX networks to other systems (e.g., cloud, IoT devices)
KNX & IoT Integration
• KNX is widely used in IoT-based smart buildings for:
• Smart Lighting – Automated control based on occupancy and daylight
• Energy Management – Optimizing power usage using IoT sensors
• HVAC Control – Adjusting heating/cooling based on room conditions
• Security Systems – Automated door locks, alarms, and surveillance
• Remote Access – Cloud integration for remote monitoring via smartphones
• Example: A KNX-enabled IoT thermostat adjusts room temperature using cloud-based weather forecasts.
A smart home system automatically lowers blinds, turns off lights, and locks doors when no one is home.
Advantages of KNX
• Standardized Protocol
• Scalable & Flexible
• Interoperability
• Wired & Wireless Support
• Energy Efficiency
Limitations of KNX
• Higher Initial Cost
• Complex Configuration
• Limited Speed
ZigBee:
• ZigBee is a Personal Area Network
• It is a technology of home networking.
• ZigBee is a technological standard created for controlling and sensing the network.
• ZigBee is the Personal Area Network of task group 4 so it is based on IEEE 802.15.4
• created by Zigbee Alliance.
• ZigBee is an open, global, packet-based protocol designed to provide an easy to-use architecture
for secure, reliable, low power wireless networks.
• Flow or process control equipment can be place anywhere and still communicate with the rest of
the system.
• It can also be moved, since the network doesn’t care about the physical location of a sensor, pump
or valve.
• IEEE802.15.4 developed the PHY and MAC layer whereas, the ZigBee takes
care of upper higher layers.
• ZigBee is a standard that addresses the need for very low-cost implementation of
Low power devices with Low data rates for short-range wireless
communications.
• IEEE 802.15.4 supports star and peer-to-peer topologies.
• The ZigBee specification supports star and two kinds of peer-to-peer topologies,
mesh and cluster tree.
• ZigBee compliant devices are sometimes specified as supporting point-to-point
and point-to multipoint topologies.
Types of ZigBee Devices:
• Zigbee Coordinator Device: It communicates with routers. This device is used for
connecting the devices.
• Zigbee Router: It is used for passing the data between devices.
• Zigbee End Device: It is the device that is going to be controlled.
Zigbee Network Topologies:
• Star Topology (ZigBee Smart Energy): Consists of a coordinator and several end
devices, end devices communicate only with the coordinator.
• Mesh Topology (Self Healing Process): Mesh topology consists of one coordinator,
several routers, and end devices.
• Tree Topology: In this topology, the network consists of a central node which is a
coordinator, several routers, and end devices. the function of the router is to extend the
network coverage.
Zigbee Communication Stack (Protocol Layers)
Network Layer
• Network Layer is responsible for the transmission of data or communication from one
host to another host connected in a network.
• Rather than describing how data is transferred, it implements the technique for efficient
transmission.
• In order to provide efficient communication protocols are used at the network layer.
• The data is being grouped into packets or in the case of extremely large data it is divided
into smaller sub packets.
Network Layer Protocols
• There are various protocols used in the network layer. Each protocol is used for a
different task.
1. Internet Protocol (IP)
• Uniquely identifies devices on a network.
• Responsible for data transfer between nodes.
• It's a connectionless protocol, does not guarantee delivery.
• TCP is used with IP to ensure successful data transmission.
• Two types of IP: IPv4 and IPv6.
IPv4 (Internet Protocol Version 4)
• 32-bit address format (e.g., 192.168.1.1).
• Address has 4 numeric fields separated by dots.
• Can be configured via DHCP or manually.
• Lacks built-in security features (no authentication/encryption).
• Divided into 5 classes: A, B, C, D, E.
IPv6 (Internet Protocol Version 6)
• 128-bit address format.
• Address has 8 fields, separated by colons and written in hexadecimal.
• Provides better security (supports authentication & encryption).
• Supports end-to-end connection integrity.
• Offers a much larger address space than IPv4.
2. ARP (Address Resolution Protocol)
• ARP converts an IP address (logical) into a MAC address (physical).
• Required for communication within a local network.
• When a device wants to communicate, it sends an ARP request with:
• Its own IP & MAC address
• The IP address of the destination
• The device with the matching IP replies with its MAC address.
• All devices receive the ARP request, but only the target device replies.
• Drawback: Broadcasting ARP requests increases network traffic.
• Solution: Devices maintain an ARP cache (a table of recent IP-to-MAC
mappings) to reduce traffic and improve performance.
How ARP Works
• Step 1: The host sends a broadcast ARP request on the network asking, “Who has this IP
address?”
• Step 2: All devices receive the request, but only the device with the matching IP responds.
• Step 3: The device replies with its MAC address to the requester.
• Step 4: The host adds this MAC address to:
• The datagram header (for sending data)
• The ARP cache (for future use)
Types of ARP Entries
• Static Entry: This type of entry is created when a user uses the ARP
command utility to manually enter the IP to MAC address association.
• Dynamic Entry: A dynamic entry is one that is automatically formed when
a sender broadcasts their message to the whole network. Dynamic entries
are periodically removed and are not permanent.
3. RARP (Reverse Address Resolution Protocol)
• RARP is the reverse of ARP – it maps a MAC address to an IP address.
• Used by devices that know their MAC address but not their IP address.
• Often helpful for diskless workstations to obtain IP addresses at startup.
• Works at the Network Access Layer of the OSI model.
• The RARP server maintains a mapping table of MAC to IP addresses.
• Only RARP servers can respond to RARP requests on a network.
How RARP Works
• A client device sends a RARP request using its MAC address.
• This request is broadcasted over the Ethernet network.
• The RARP server checks its table for the corresponding IP address.
• Server sends back the IP address to the requesting client.
4. ICMP (Internet Control Message Protocol)
• ICMP is part of the IP protocol suite.
• It is used for error reporting and network diagnostics.
• Helps in communicating network errors (e.g., unreachable destinations).
• Commonly used in tools like ping and traceroute.
• ICMP is a connectionless protocol (unlike TCP).
• ICMP works via IP datagrams and does not require a handshake.
Types of ICMP Messages
• Error Messages: Sent when issues occur in processing IP packets. E.g., Destination unreachable,
Time exceeded, Source quench, Redirect, Parameter problem.
• Query Messages: Used to request information from hosts or routers. E.g., Echo request/reply
(used by ping)
How ICMP Works
• ICMP messages are encapsulated within IP packets.
• No connection setup is needed—sends messages without prior agreement.
• Used to notify hosts/routers about network issues or events.
• Does not carry application data, only control messages.
5. IGMP (Internet Group Management Protocol)
• IGMP is a multicasting communication protocol.
• Used within IP networks to manage multicast group memberships.
• Helps in efficient data transmission to multiple receivers at once.
• Works alongside routers and hosts to support multicast communication.
• Reduces network load by avoiding unnecessary broadcasting.
• Part of the TCP/IP protocol suite.
• Used mostly in IPv4 networks.
Applications of IGMP
• Streaming media (e.g., live video/audio)
• Online gaming
• Web conferencing tools
• Group communication over the internet
How IGMP Works
• Multicast-capable devices (hosts and routers) use IGMP to manage multicast
group memberships.
• A host can join or leave a multicast group using IGMP.
• Members (clients) can be added or removed dynamically from the group.
• Communication happens between the host and the local multicast router.
• When a multicast group is created, the packet’s destination IP is changed to a
Class D IP address (224.0.0.0 to 239.255.255.255).
APS Layer in IoT (Zigbee)
• Full Form: APS = Application Support Sublayer
• Purpose: Manages communication between IoT applications and the Zigbee
network.
• Key Role: Acts as a bridge between:
• Application Layer
• Network Layer
• Functions:
• Handles data flow
• Manages addressing
• Ensures security
• Common in: Smart homes, industrial automation, sensor networks, etc.
Functions of APS Layer in IoT
• Binding & Addressing: Links sender and receiver devices logically.
• Security & Encryption: Encrypts data for safe communication.
• Data Transmission: Manages message flow between application and network layers.
• Fragmentation & Reassembly: Breaks large packets into smaller ones and rebuilds them at the
destination.
• Example: Helps a Zigbee thermostat communicate with a Zigbee air conditioner in a smart
home setup.
APS Layer in the Zigbee Architecture
1. Physical Layer (PHY) – Manages radio signal transmission.
2. MAC Layer – Controls how devices access the wireless medium.
3. Network Layer (NWK) – Takes care of routing and network management.
4. Application Support Sublayer (APS) – Bridges application and network layers; manages
app-level communication.
5. Application Layer (APL) – Hosts and runs IoT applications.
• Example: In an IoT factory, Zigbee sensors send temperature data to the cloud using the
APS layer for reliable transmission.
Security
• IoT Security focuses on protecting internet-connected devices and networks.
• Devices are vulnerable to remote attacks (e.g., credential theft, exploits).
• Security must cover devices, data, and networks.
Types of IoT Security
1. Network Security
• Strong perimeter (firewalls, intrusion detection).
• Zero-trust architecture (assume no device is safe by default).
• Encrypted communication using secure protocols.
2. Device Security
• Embedded security agents to detect abnormal behavior.
• Firmware hardening via testing & regular updates.
• Secure boot to ensure OS integrity on startup.
3. Data Security
• Data encryption (in transit & at rest).
• Privacy protection against unauthorized access.
• Integrity checks (e.g., checksums) to avoid tampering.
How IoT Security Works
• IoT devices store and transmit data via cloud connections.
• Unlike phones, many IoT devices lack built-in security features.
• Cloud data risks identity theft if compromised.
• Experts promote secure coding and stronger cloud defense practices.
Benefits of IoT Security
1. Network Protection
1. Detects and prevents threats like DDoS attacks.
2. Keeps the entire IoT network stable and secure.
2. Privacy Protection
1. Shields users from unauthorized surveillance and data theft.
2. Prevents device tracking and ensures data confidentiality.
3. Scalability
1. Adapts to growing IoT environments.
2. Maintains effective security as the number of connected devices increases.
4. Device Protection
1. Guards devices against malware, hacking, and unauthorized access.
2. Ensures reliable and long-lasting device performance.