UNIT2-Fundamentals of SCADA IOT or .pptx

gefomag559 33 views 90 slides Oct 10, 2024
Slide 1
Slide 1 of 90
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85
Slide 86
86
Slide 87
87
Slide 88
88
Slide 89
89
Slide 90
90

About This Presentation

scada for u guys


Slide Content

ICSF- 302 Fundamentals of SCADA & IOT Aditya Rajesh More Unit II

Smart Objects: The “Things” in IoT Smart objects are any physical objects that contain embedded technology to sense and/or interact with their environment in a meaningful way by being interconnected and enabling communication among themselves or an external agent. Sensors, Actuators, and Smart Objects: This section defines sensors, actuators, and smart objects and describes how they are the fundamental building blocks of IoT networks. Sensor Networks: This section covers the design, drivers for adoption, and deployment challenges of sensor networks. Fundamentals of SCADA and IoT Unit II- by Aditya More 2

Sensors A sensor does exactly as its name indicates: It senses. More specifically, a sensor measures some physical quantity and converts that measurement reading into a digital representation. That digital representation is typically passed to another device for transformation into useful data that can be consumed by intelligent devices or humans. Naturally, a parallel can be drawn with humans and the use of their five senses to learn about their surroundings. Sensors are not limited to human-like sensory data. They can measure anything worth measuring. In fact, they are able to provide an extremely wide spectrum of rich and diverse measurement data with far greater precision than human senses; sensors provide superhuman sensory capabilities. Sensors can be readily embedded in any physical objects that are easily connected to the Internet by wired or wireless networks. Fundamentals of SCADA and IoT Unit II- by Aditya More 3

Categories of Sensors Active or Passive: Active Sensors: Produce an energy output and usually need an external power supply. Example: radar sensors. Passive Sensors: Only receive energy and generally don't need an external power supply. Example: thermocouples. Invasive or Non-Invasive: Invasive Sensors: Are placed directly into the environment they are measuring. Example: glucose sensors inserted into the body. Non-Invasive Sensors: Measure the environment without being placed in it. Example: infrared thermometers. Fundamentals of SCADA and IoT Unit II- by Aditya More 4

Categories of Sensors Contact or No-Contact: Contact Sensors: Require physical contact with what they are measuring. Example: temperature probes. No-Contact Sensors: Measure without needing to touch the object. Example: ultrasonic distance sensors. Absolute or Relative: Absolute Sensors: Measure on an absolute scale, providing a direct value. Example: absolute pressure sensors. Relative Sensors: Measure based on a difference with a reference value. Example: differential pressure sensors. Fundamentals of SCADA and IoT Unit II- by Aditya More 5

Categories of Sensors Area of Application: Industry-Specific Sensors: Categorized based on the specific industry they are used in, like healthcare, automotive, or manufacturing. How Sensors Measure: Measurement Mechanism: Classified by the physical mechanism used to detect input. Examples include thermoelectric sensors (measure heat), electrochemical sensors (measure chemical properties), and piezoresistive sensors (measure pressure). What Sensors Measure: Measurement Type: Based on the specific physical variables they measure, such as temperature, pressure, humidity, or light levels. Fundamentals of SCADA and IoT Unit II- by Aditya More 6

Types of Sensors Fundamentals of SCADA and IoT Unit II- by Aditya More 7

Types of Sensors Fundamentals of SCADA and IoT Unit II- by Aditya More 8

Types of Sensors Fundamentals of SCADA and IoT Unit II- by Aditya More 9

Actuators Actuators are natural complements to sensors. Sensors are designed to sense and measure practically any measurable variable in the physical world. They convert their measurements (typically analog) into electric signals or digital representations that can be consumed by an intelligent agent (a device or a human). Actuators, on the others hand, receive some type of control signal (commonly an electric signal or digital command) that triggers a physical effect, usually some type of motion, force, and so on. Much like sensors, actuators also vary greatly in function, size, design, and so on. Fundamentals of SCADA and IoT Unit II- by Aditya More 10

Actuators Fundamentals of SCADA and IoT Unit II- by Aditya More 11

Actuators Humans use their five senses to gather information about their environment, converting sensory data into electrical signals sent to the brain for processing. Similarly, IoT sensors detect physical changes and send electrical signals to a microprocessor for analysis. Just as the brain sends signals to muscles to cause movement, a processor can send signals to an actuator to create movement or perform tasks. This interaction between sensors, processors, and actuators mirrors biological systems and is fundamental to fields like robotics and biometrics. Fundamentals of SCADA and IoT Unit II- by Aditya More 12

Types of Actuators Fundamentals of SCADA and IoT Unit II- by Aditya More 13

Smart Objects Smart Objects despite some semantic differences, is often used interchangeably with terms such as smart sensor, smart device, IoT device, intelligent device, thing, smart thing, intelligent node, intelligent thing, ubiquitous thing, and intelligent product. A smart object, as described a device that has, at a minimum, the following four defining characteristics. Processing unit : A smart object has some type of processing unit for acquiring data, processing and analyzing sensing information received by the sensor(s), coordinating control signals to any actuators, and controlling a variety of functions on the smart object, including the communication and power systems. The specific type of processing unit that is used can vary greatly, depending on the specific processing needs of different applications. The most common is a microcontroller because of its small form factor, flexibility, programming simplicity, ubiquity, low power consumption, and low cost. Fundamentals of SCADA and IoT Unit II- by Aditya More 14

Smart Objects Sensor(s) and/or actuator(s) : A smart object is capable of interacting with the physical world through sensors and actuators. As described in the previous sections, a sensor learns and measures its environment, whereas an actuator is able to produce some change in the physical world. A smart object does not need to contain both sensors and actuators. In fact, a smart object can contain one or multiple sensors and/or actuators, depending upon the application. Communication device : The communication unit is responsible for connecting a smart object with other smart objects and the outside world (via the network). Communication devices for smart objects can be either wired or wireless. Overwhelmingly, in IoT networks smart objects are wirelessly interconnected for a number of reasons, including cost, limited infrastructure availability, and ease of deployment. There are myriad different communication protocols for smart objects. Fundamentals of SCADA and IoT Unit II- by Aditya More 15

Smart Objects Power source: Smart objects have components that need to be powered. Interestingly, the most significant power consumption usually comes from the communication unit of a smart object. As with the other three smart object building blocks, the power requirements also vary greatly from application to application. Typically, smart objects are limited in power, are deployed for a very long time, and are not easily accessible. This combination, especially when the smart object relies on battery power, implies that power efficiency, judicious power management, sleep modes, ultra-low power consumption hardware, and so on are critical design elements. For long-term deployments where smart objects are, for all practical purposes, inaccessible, power is commonly obtained from scavenger sources (solar, piezoelectric, and so on) or is obtained in a hybridized manner. Fundamentals of SCADA and IoT Unit II- by Aditya More 16

Smart Objects Fundamentals of SCADA and IoT Unit II- by Aditya More 17

Sensor Network A sensor/actuator network (SANET), as the name suggests, is a network of sensors that sense and measure their environment and/or actuators that act on their environment. The sensors and/or actuators in a SANET are capable of communicating and cooperating in a productive manner. Effective and well-coordinated communication and cooperation is a prominent challenge, primarily because the sensors and actuators in SANETs are diverse, heterogeneous, and resource-constrained. SANETs offer highly coordinated sensing and actuation capabilities. Smart homes are a type of SANET that display this coordination between distributed sensors and actuators. For example, smart homes can have temperature sensors that are strategically networked with heating, ventilation, and air-conditioning (HVAC) actuators. When a sensor detects a specified temperature, this can trigger an actuator to take action and heat or cool the home as needed. Fundamentals of SCADA and IoT Unit II- by Aditya More 18

Sensor Network The following are some advantages and disadvantages that a wireless-based solution offers: Advantages: Greater deployment flexibility (especially in extreme environments or hard-to-reach places) Simpler scaling to a large number of nodes Lower implementation costs Easier long-term maintenance Effortless introduction of new sensor/actuator nodes Better equipped to handle dynamic/rapid topology changes Disadvantages: Potentially less secure (for example, hijacked access points) Typically lower transmission speeds Greater level of impact/influence by environment Fundamentals of SCADA and IoT Unit II- by Aditya More 19

Connecting Smart Objects- Communications Criteria IoT devices and sensors must be connected to the network for their data to be utilized. In addition to the wide range of sensors, actuators, and smart objects that make up IoT, there are also a number of different protocols used to connect them. Range Short Range: Short-range communication technologies are used for connecting devices that are close to each other, usually up to tens of meters. Examples include Bluetooth (IEEE 802.15.1) and Visible Light Communications (IEEE 802.15.7). These technologies are commonly found in personal devices like wireless headphones and smart home gadgets. They are easy to set up and allow devices to be mobile. However, in the IoT world, they are less common because of their limited range. Fundamentals of SCADA and IoT Unit II- by Aditya More 20

Communications Criteria- Range Medium-range communication is the most commonly used in IoT applications, covering distances from tens to hundreds of meters, often within a mile. Technologies like Wi-Fi (IEEE 802.11) and Wireless Personal Area Networks (WPAN) such as IEEE 802.15.4 are popular in this category. These technologies provide a good balance of range, data speed, and power use, making them ideal for smart homes, office buildings, and industrial settings. Wired options like Ethernet (IEEE 802.3) and Narrowband Power Line Communications (IEEE 1901.2) are also used. Long-range communication technologies are used when devices need to connect over distances greater than a mile. Examples include cellular networks (2G, 3G, 4G) and Low-Power Wide-Area (LPWA) technologies. LPWA is particularly useful for battery-powered sensors that need to operate for a long time without needing new batteries. These technologies can send data over long distances while using very little power. Fundamentals of SCADA and IoT Unit II- by Aditya More 21

Communications Criteria- Range Fundamentals of SCADA and IoT Unit II- by Aditya More 22

Communications Criteria- Frequency Bands Frequency Bands: Radio spectrum is regulated by organizations like the International Telecommunication Union (ITU) and the Federal Communications Commission (FCC), which define regulations and transmission requirements for various frequency bands allocated for different types of telecommunications such as radio, television, and military use. For IoT access technologies, frequency bands are divided into licensed and unlicensed bands. Licensed spectrum, used mainly for long-range technologies, requires users to subscribe to services, adding complexity but ensuring exclusive frequency usage and better service guarantees. Examples of IoT technologies using licensed spectrum include cellular, WiMAX, and Narrowband IoT (NB-IoT). Fundamentals of SCADA and IoT Unit II- by Aditya More 23

Communications Criteria- Frequency Bands On the other hand, unlicensed spectrum, like the ISM (Industrial, Scientific, and Medical) bands, is used by many short-range devices and does not require service provider subscriptions. This makes deployment simpler but can lead to more interference. Common ISM bands include 2.4 GHz (used by Wi-Fi IEEE 802.11b/g/n), Bluetooth (IEEE 802.15.1), and WPAN (IEEE 802.15.4). Regulations for these bands still mandate compliance with parameters like transmit power and channel hopping. Unlicensed sub-GHz bands, such as 433 MHz, 868 MHz, and 915 MHz, allow for greater distances between devices and better penetration through obstacles compared to higher frequencies like 2.4 GHz. These bands are well-suited for IoT applications that do not require high data rates, such as wireless water and gas metering. Fundamentals of SCADA and IoT Unit II- by Aditya More 24

Communications Criteria- Power Consumption Power Consumption: IoT devices can be broadly categorized into powered nodes and battery-powered nodes. Powered nodes are connected directly to a power source, meaning their communications are not constrained by power consumption. However, their deployment is limited by the availability of power sources, complicating mobility. Battery-powered nodes offer greater flexibility for IoT devices. These nodes are often classified by their battery life requirements. Some nodes, like water or gas meters, need a battery life of 10 to 15 years. Others, such as smart parking sensors, can operate with a battery life of 5 to 7 years, with batteries replaced during street maintenance. Devices under regular maintenance might only need a 2 to 3-year battery life. Fundamentals of SCADA and IoT Unit II- by Aditya More 25

Communications Criteria- Power Consumption IoT wireless access technologies must meet the needs for low power consumption and connectivity for battery-powered nodes, leading to the development of Low-Power Wide-Area (LPWA) environments. While any wireless technology can technically run on batteries, operational deployments are impractical if they require frequent battery changes. Even wired IoT access technologies with powered nodes must consider power optimization. For example, deploying smart meters over Power Line Communication (PLC) must avoid high power consumption. If each meter's radio interface consumed 5 to 10 watts, a large-scale deployment could result in significant energy usage, making the solution inefficient. Fundamentals of SCADA and IoT Unit II- by Aditya More 26

Communications Criteria- Topology Topology: Star Topology: Star topology is prevalent in both long-range and short-range IoT technologies, such as cellular, LPWA, and Bluetooth networks. In this setup, a central base station or controller communicates with all endpoints, simplifying network management and connectivity. This model is straightforward and efficient for handling many devices from a single control point, making it ideal for technologies requiring central coordination. Peer-to-Peer Topology: In medium-range IoT technologies, peer-to-peer topology is commonly used. This setup allows any device to communicate directly with any other device within range. Peer-to-peer topologies rely on multiple full-function devices, enabling more complex formations. This flexibility supports dynamic networking needs where devices frequently change roles and communicate directly without a central point Fundamentals of SCADA and IoT Unit II- by Aditya More 27

Communications Criteria- Topology Mesh Topology: It is also common in medium-range technologies and involves nodes relaying traffic for other nodes, thus extending the network's coverage. This setup is used in outdoor Wi-Fi networks and technologies like IEEE 802.15.4, IEEE 802.15.4g, and IEEE 1901.2a PLC. Mesh networks handle low transmit power effectively by having intermediate nodes forward messages to reach greater distances. They require Layer 2 forwarding protocols (mesh-under) or Layer 3 protocols (mesh-over) on each intermediate node to function efficiently. Fundamentals of SCADA and IoT Unit II- by Aditya More 28

DSSS Vs PSSS Fundamentals of SCADA and IoT Unit II- by Aditya More 29 Feature DSSS (Direct Sequence Spread Spectrum) PSSS (Parallel Sequence Spread Spectrum) Concept Spreads one signal across a wider frequency band using a high-frequency code Uses multiple parallel channels to send data simultaneously Spreading Method Spreads one signal with a high-frequency code Uses multiple parallel channels to send data Interference Good resistance to single-frequency interference Robust against interference due to multiple channels Data Rate Lower (one signal spread out) Higher (multiple signals sent in parallel) Complexity Simpler More complex Usage Wi-Fi, secure communication High data rate applications Why It Is Used Used for its ability to minimize interference and support secure communication Used for its high data rates and robustness in complex environments Example Single Conversation: Speaking quietly in a coded language that only someone with the same code can understand Multiple Conversations: Several people each saying part of the message simultaneously on different frequencies

IoT Access Technologies: IEEE 802.15.4 IEEE 802.15.4 is a wireless access technology for low-cost and low-data-rate devices that are powered or run on batteries. In addition to being low cost and offering a reasonable battery life, this access technology enables easy installation using a compact protocol stack while remaining both simple and flexible. Several network communication stacks, including deterministic ones, and profiles leverage this technology to address a wide range of IoT use cases in both the consumer and business markets. IEEE 802.15.4 is commonly found in the following types of deployments: Home and building automation Automotive networks Industrial wireless sensor networks Interactive toys and remote control Fundamentals of SCADA and IoT Unit II- by Aditya More 30

IoT Access Technologies: IEEE 802.15.4 Physical Layer: The IEEE 802.15.4 standard supports a variety of physical layer (PHY) options for different frequencies in the Industrial, Scientific, and Medical (ISM) bands. The original IEEE 802.15.4-2003 standard defined three PHY options using direct sequence spread spectrum (DSSS) modulation, which spreads the signal across a wider frequency range for better reliability. These options were: 2.4 GHz band: 16 channels with a data rate of 250 kbps, operating worldwide. 915 MHz band: 10 channels with a data rate of 40 kbps, mainly in North and South America. 868 MHz band: 1 channel with a data rate of 20 kbps, used in Europe, the Middle East, and Africa. Fundamentals of SCADA and IoT Unit II- by Aditya More 31

IoT Access Technologies: IEEE 802.15.4 Later versions of the standard, such as IEEE 802.15.4-2006, 802.15.4-2011, and 802.15.4-2015, introduced additional PHY options to improve performance and extend usability. These included: OQPSK PHY: A DSSS (Direct Sequence Spread Spectrum) PHY using offset quadrature phase-shift keying (OQPSK) modulation. This technique uses four different bit values represented by changes in phase (the way the signal is sent). The offset function helps in making the data transmission more reliable. BPSK PHY: A DSSS PHY using binary phase-shift keying (BPSK) modulation. BPSK encodes data using two distinct phase shifts. It’s a simpler method to encode data. ASK PHY: A parallel sequence spread spectrum (PSSS) PHY using amplitude shift keying (ASK) and BPSK modulation. ASK uses changes in amplitude instead of phase to signal data, and PSSS provides better range, throughput, and signal integrity compared to DSSS. Fundamentals of SCADA and IoT Unit II- by Aditya More 32

IoT Access Technologies: IEEE 802.15.4 MAC Layer: The IEEE 802.15.4 MAC layer manages access to the PHY channel by defining how devices in the same area will share the frequencies allocated. At this layer, the scheduling and routing of data frames are also coordinated. The 802.15.4 MAC layer performs the following tasks: Network beaconing for devices acting as coordinators (New devices use beacons to join an 802.15.4 network) PAN association and disassociation by a device Device security Reliable link communications between two peer MAC entities The MAC layer achieves these tasks by using various predefined frame types. In fact, four types of MAC frames are specified in 802.15.4: Data frame: Handles all transfers of data Beacon frame: Used in the transmission of beacons from a PAN coordinator Acknowledgement frame: Confirms the successful reception of a frame MAC command frame: Responsible for control communication between devices Fundamentals of SCADA and IoT Unit II- by Aditya More 33

IoT Access Technologies: IEEE 802.15.4 Topology: IEEE 802.15.4-based networks can be structured in three main ways: star, peer-to-peer, or mesh topologies. A mesh network connects many nodes together, allowing nodes that are out of direct communication range to use intermediary nodes to relay messages. This setup enables better coverage and reliability. In an IEEE 802.15.4 network, every Personal Area Network (PAN) must have a unique PAN ID, which all nodes in that network must use. For example, if a network has a PAN ID of 1, all nodes in that network should be configured to use this ID. Fundamentals of SCADA and IoT Unit II- by Aditya More 34

IoT Access Technologies: IEEE 802.15.4 There are two types of devices in IEEE 802.15.4 networks: full-function devices (FFDs) and reduced-function devices (RFDs). An FFD can communicate with any other device in the network, whereas an RFD can only communicate with FFDs. Each network needs at least one FFD to act as the PAN coordinator, which helps other devices join the network and facilitates communication. In mesh networks, the IEEE 802.15.4 standard doesn't specify how to choose communication paths (called path selection) within the MAC layer. This can be managed at using standard routing protocols like the IPv6 Routing Protocol for Low Power and Lossy Networks (RPL). Fundamentals of SCADA and IoT Unit II- by Aditya More 35

IoT Access Technologies: IEEE 802.15.4 Security: The IEEE 802.15.4 standard uses the Advanced Encryption Standard (AES) with a 128-bit key to secure its data. AES, established by the US National Institute of Standards and Technology in 2001, is a block cipher that encrypts data in fixed-size blocks. It is widely used in both government and private sectors for symmetric key cryptography, where the same key is used to encrypt and decrypt data. In IEEE 802.15.4, AES not only encrypts data but also validates it using a message integrity code (MIC). The MIC is calculated for the entire data frame using the same AES key, ensuring that the data has not been tampered with. To enable AES encryption in IEEE 802.15.4, the frame format is slightly altered, and part of the payload is used for security features. This is done by setting the Security Enabled field in the Frame Control section of the 802.15.4 header to 1. This single-bit field indicates that security features, including AES encryption, are enabled for the frame. Fundamentals of SCADA and IoT Unit II- by Aditya More 36

IoT Access Technologies: IEEE 802.11ah In networks without major limitations, IEEE 802.11 Wi-Fi is the most widely used wireless technology. It connects high-data-rate devices like fog computing nodes, sensors, and audio or video analytics devices. It also supports Wi-Fi backhaul infrastructures in various environments like smart cities and industrial areas. However, traditional Wi-Fi has some limitations: it doesn't support sub-GHz frequencies for better signal penetration, isn't optimized for low power consumption, and struggles to support many devices. To address these issues, the IEEE 802.11 working group created a sub-GHz version of Wi-Fi called IEEE 802.11ah. Fundamentals of SCADA and IoT Unit II- by Aditya More 37

IoT Access Technologies: IEEE 802.11ah IEEE 802.11ah is designed for three main use cases: Sensors and Meters in Smart Grids: Used for environmental monitoring, industrial sensors, healthcare systems, and home automation. Backhaul Aggregation: Connecting industrial sensors and meter data, and potentially integrating IEEE 802.15.4g subnetworks. Extended Range Wi-Fi: Providing long-range Wi-Fi for outdoor hotspots or offloading cellular traffic where standard Wi-Fi isn't sufficient. Fundamentals of SCADA and IoT Unit II- by Aditya More 38

Comparison of IEEE 802.15.4 and IEEE 802.11ah Fundamentals of SCADA and IoT Unit II- by Aditya More 39 Feature IEEE 802.15.4 IEEE 802.11ah Purpose Low-power, low-data-rate wireless communication for IoT devices and sensors. Extended-range, low-power Wi-Fi for IoT applications and backhaul connectivity. Frequency Bands 2.4 GHz, sub-GHz (e.g., 868 MHz in Europe, 915 MHz in the Americas) Sub-GHz frequencies (around 900 MHz) Data Rate Lower data rates (20-250 kbps) Higher data rates (up to 347 Mbps) Network Topologies Supports star, peer-to-peer, and mesh topologies Primarily star topology but can support other topologies with proper configuration Range Short to medium range (up to hundreds of meters) Extended range (up to 1 km or more) Power Consumption Very low power consumption, suitable for battery-powered devices Low power consumption, but higher than IEEE 802.15.4 Device Density Designed for networks with a high density of low-power devices Supports a large number of devices (up to 8192 stations per access point) Typical Use Cases Environmental monitoring, smart home, and industrial sensors Smart grid, long-range Wi-Fi hotspots, industrial IoT, and backhaul for other networks

IoT Access Technologies: IEEE 802.11ah Physical Layer: IEEE 802.11ah is a version of Wi-Fi that operates in the sub-GHz frequency bands, which are not licensed. Different regions use various sub-GHz bands for this purpose, such as: 868–868.6 MHz for Europe, Middle East, Africa, and Russia (EMEAR) 902–928 MHz for North America and Asia-Pacific regions 314–316 MHz, 430–434 MHz, 470–510 MHz, and 779–787 MHz for China This standard is based on Orthogonal Frequency-Division Multiplexing (OFDM) modulation. It uses channels that are 1, 2, 4, 8, or 16 MHz wide. These channels are narrower than those used in IEEE 802.11ac, which operates at 5 GHz with channel widths up to 160 MHz. As a result, 802.11ah channels offer about one-tenth the data rates of 802.11ac. Fundamentals of SCADA and IoT Unit II- by Aditya More 40

IoT Access Technologies: IEEE 802.11ah MAC Layer: The IEEE 802.11ah standard is designed to support sub-GHz Wi-Fi with low power consumption and the ability to connect many devices. Here are the key enhancements and features of its MAC layer: Increased Device Support: Can handle up to 8192 devices per access point. Efficient Communication: Shortened MAC header allows more efficient data transmission. Null Data Packet (NDP) Support: Extends to control and management frames, making communication more efficient and saving power by avoiding unnecessary decoding of the MAC header and data payload. Grouping and Sectorization: Uses sector antennas and groups stations to reduce network contention, improving performance in large networks. Fundamentals of SCADA and IoT Unit II- by Aditya More 41

IoT Access Technologies: IEEE 802.11ah Restricted Access Window (RAW): Controls access to the network to avoid simultaneous transmissions, reducing collisions and saving power. Target Wake Time (TWT): Allows devices to wake up only at scheduled times, conserving energy and reducing network collisions. Speed Frame Exchange: Enables efficient frame exchange during reserved times, reducing medium contention and extending battery life by keeping devices in low-power states when not in use. Fundamentals of SCADA and IoT Unit II- by Aditya More 42

IoT Access Technologies: IEEE 802.11ah Topology: IEEE 802.11ah uses a star network where all devices connect to a central access point (AP). To extend its range, it includes a relay function. This means one device can act as a relay to pass data to another device further away, similar to a mesh network. The clients, not the AP, manage this relay function. Usually, it involves two hops. Devices closer to the AP use higher transmission rates, while those further away use lower rates. This keeps the system efficient and ensures that close devices don't experience slow communication. Sectorization helps manage interference and reduce collisions in areas with many clients. It divides the coverage area into sectors using an antenna array and beam-forming techniques. This way, each sector has less interference, making communication smoother and more reliable, especially in large coverage areas with multiple access points. Fundamentals of SCADA and IoT Unit II- by Aditya More 43

IoT Access Technologies: IEEE 802.11ah Fundamentals of SCADA and IoT Unit II- by Aditya More 44

IoT Access Technologies: IEEE 802.11ah Security: No additional security has been identified for IEEE 802.11ah compared to other IEEE 802.11 specifications. These protocols include IEEE 802.15.4, IEEE 802.15.4e, and IEEE 1901.2a, and the security information for them is also applicable to IEEE 802.11ah. Fundamentals of SCADA and IoT Unit II- by Aditya More 45

IoT Access Technologies: LoRaWAN In recent years, Low-Power Wide-Area (LPWA) technologies have gained significant attention from the industry and the press. These technologies are particularly well-suited for long-range, battery-powered devices, making them ideal for IoT solutions. LPWA technologies offer new business opportunities for service providers and enterprises. One example of an unlicensed-band LPWA technology is LoRaWAN . It is well-established and supported by a substantial industry alliance. This makes LoRaWAN a reliable choice for IoT implementations. Fundamentals of SCADA and IoT Unit II- by Aditya More 46

IoT Access Technologies: LoRaWAN Physical Layer: Semtech LoRa uses chirp spread spectrum modulation, which trades lower data rates for better receiver sensitivity, significantly increasing communication distance. This modulation allows demodulation below the noise floor, making it robust against noise and interference. It also supports multiple channels and spreading factors, enabling LoRa devices to receive signals on various channels simultaneously. LoRaWAN 1.0.2 regional specifications use main unlicensed sub-GHz frequency bands like 433 MHz, 779–787 MHz, 863–870 MHz, and 902–928 MHz. Different regions use specific subsets of these bands; for example, Australia uses 915–928 MHz, South Korea uses 920–923 MHz, and Japan uses 920–928 MHz. Fundamentals of SCADA and IoT Unit II- by Aditya More 47

IoT Access Technologies: LoRaWAN Understanding LoRa gateways is critical to understanding a LoRaWAN system. A LoRa gateway is deployed as the center hub of a star network architecture. It uses multiple transceivers and channels and can demodulate multiple channels at once or even demodulate multiple signals on the same channel simultaneously. LoRa gateways serve as a transparent bridge relaying data between endpoints, and the endpoints use a single-hop wireless connection to communicate with one or many gateways. In LoRaWAN , the data rate varies depending on the frequency bands and an algorithm called Adaptive Data Rate (ADR). ADR is a smart system that adjusts the data rate and signal strength for each device (endpoint) to ensure the network runs efficiently. It dynamically changes the transmission settings based on the quality of the radio link, optimizing performance for every device. Fundamentals of SCADA and IoT Unit II- by Aditya More 48

IoT Access Technologies: LoRaWAN MAC Layer: LoRaWAN leverages the LoRa physical layer to enhance battery life and ensure effective communication with various devices. There are three distinct classes of LoRaWAN devices: Class A: Default Class and Energy-Efficient: This is the default mode for all LoRaWAN devices and is specifically optimized for battery-powered devices. Bidirectional Communication: Devices can both send and receive data. However, the receiving capability is structured to conserve battery power. Receive Windows: After each transmission, the device opens two short receive windows. These windows allow the device to listen for any incoming data from the gateway. This design minimizes the time the device spends in receive mode, thereby conserving battery life. The first receive window opens shortly after transmission, followed by the second window if no data is received during the first. Fundamentals of SCADA and IoT Unit II- by Aditya More 49

IoT Access Technologies: LoRaWAN Class B: Extended Receive Windows: This class provides more opportunities for the device to receive data, making it suitable for applications that require more frequent downlink communication. Beacon Synchronization: To facilitate these additional receive windows, gateways send periodic beacon signals. These beacons synchronize the devices, ensuring they wake up at the correct times to listen for incoming data. This synchronization is crucial for maintaining efficient communication and minimizing power consumption during idle periods. Experimental Status: In LoRaWAN 1.0.1, Class B was designated as experimental, indicating ongoing development and refinement to better define its specifications and optimize its performance. Fundamentals of SCADA and IoT Unit II- by Aditya More 50

IoT Access Technologies: LoRaWAN Class C: Continuous Receive Mode: Class C devices are designed for applications where power consumption is less of a concern, typically because the devices are connected to a constant power source. Always Listening: Unlike Class A and B, Class C devices keep their receive windows open at all times when they are not transmitting. This means they can receive data from the gateway almost immediately, providing low-latency communication. Power Consumption: While this mode offers the most responsiveness, it also consumes the most power, making it unsuitable for battery-operated devices. Fundamentals of SCADA and IoT Unit II- by Aditya More 51

IoT Access Technologies: LoRaWAN Topology: LoRaWAN uses a "star of stars" network structure to connect endpoints, gateways, and a central network server. Endpoints are devices like sensors that send and receive data. These devices communicate directly with one or more gateways, which act as bridges to relay data to the central network server. Gateways connect to the network using standard internet protocols (IP). Gateways play a key role by receiving data from endpoints and forwarding it to the network server. Multiple gateways can capture the same data packet, ensuring reliability and redundancy. The network server removes duplicate packets and manages the data rate and radio frequency settings for each endpoint using the Adaptive Data Rate (ADR) algorithm. This optimizes network performance and conserves battery life for the endpoints. Fundamentals of SCADA and IoT Unit II- by Aditya More 52

IoT Access Technologies: LoRaWAN Data in LoRaWAN is sent over the LoRaWAN MAC layer on supported PHY layer frequency bands. The data can be raw or use upper-layer protocols like ZigBee, CoAP, or MQTT for specific applications. These upper layers are not regulated by the LoRa Alliance but follow industry best practices. The network server processes the data and forwards it to the appropriate application servers. This efficient and scalable communication structure makes LoRaWAN suitable for a wide range of IoT applications, from simple sensor networks to complex, large-scale deployments. Fundamentals of SCADA and IoT Unit II- by Aditya More 53

IoT Access Technologies: LoRaWAN Fundamentals of SCADA and IoT Unit II- by Aditya More 54

IoT Access Technologies: LoRaWAN Security: The first layer, called “network security” but applied at the MAC layer, guarantees the authentication of the endpoints by the LoRaWAN network server. Also, it protects LoRaWAN packets by performing encryption based on AES. Each endpoint implements a network session key ( NwkSKey ), used by both itself and the LoRaWAN network server. The NwkSKey ensures data integrity through computing and checking the MIC of every data message as well as encrypting and decrypting MAC-only data message payloads. The second layer is an application session key ( AppSKey ), which performs encryption and decryption functions between the endpoint and its application server. Furthermore, it computes and checks the application-level MIC, if included. Fundamentals of SCADA and IoT Unit II- by Aditya More 55

IoT Access Technologies: LoRaWAN This ensures that the LoRaWAN service provider does not have access to the application payload if it is not allowed that access. Endpoints receive their AES-128 application key ( AppKey ) from the application owner. This key is most likely derived from an application-specific root key exclusively known to and under the control of the application provider. For production deployments, it is expected that the LoRaWAN gateways are protected as well, for both the LoRaWAN traffic and the network management and operations over their backhaul link(s). This can be done using traditional VPN and IPsec technologies that demonstrate scaling in traditional IT deployments. Additional security add-ons are under evaluation by the LoRaWAN Alliance for future revisions of the specification. Fundamentals of SCADA and IoT Unit II- by Aditya More 56

IoT Access Technologies: LoRaWAN Fundamentals of SCADA and IoT Unit II- by Aditya More 57

IoT Access Technologies: LoRaWAN Security: The first layer, called “network security” but applied at the MAC layer, guarantees the authentication of the endpoints by the LoRaWAN network server. Also, it protects LoRaWAN packets by performing encryption based on AES. Each endpoint implements a network session key ( NwkSKey ), used by both itself and the LoRaWAN network server. The NwkSKey ensures data integrity through computing and checking the MIC of every data message as well as encrypting and decrypting MAC-only data message payloads. The second layer is an application session key ( AppSKey ), which performs encryption and decryption functions between the endpoint and its application server. Furthermore, it computes and checks the application-level MIC, if included. Fundamentals of SCADA and IoT Unit II- by Aditya More 58

6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks) 6LoWPAN is a network protocol that facilitates the transmission of IPv6 packets over low-power, low-bandwidth wireless networks, particularly those conforming to the IEEE 802.15.4 standard. This protocol is crucial for the advancement of the Internet of Things (IoT), as it allows seamless connectivity for small, low-power devices. 6LoWPAN initially came into existence to overcome the conventional methodologies that were adapted to transmit information. But still, it is not so efficient as it only allows for the smaller devices with very limited processing ability to establish communication using one of the Internet Protocols, i.e., IPv6. It has very low cost, short-range, low memory usage, and low bit rate. Fundamentals of SCADA and IoT Unit II- by Aditya More 59

6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks) Key Features of 6LoWPAN Compatibility with IEEE 802.15.4: 6LoWPAN is designed to work seamlessly with IEEE 802.15.4, specifically operating in the 2.4 GHz band. This standard is widely used for low-power, low-cost communication networks, making it ideal for IoT applications. IPv6 Integration: 6LoWPAN adapts the capabilities of IPv6, including a vast address space and end-to-end connectivity, to the constraints of low-power wireless networks. This adaptation supports the large number of devices typical in IoT deployments. Low-Power Operation: The protocol is designed for energy efficiency, ensuring minimal power consumption. This feature is vital for devices that operate on batteries, extending their operational life and reducing maintenance costs. Fundamentals of SCADA and IoT Unit II- by Aditya More 60

6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks) Efficient Packet Delivery: 6LoWPAN employs header compression techniques to reduce the size of IPv6 headers, making efficient use of limited bandwidth. Techniques like stateless header compression (SCHC) and header compression schemes defined in RFC 6282 enable this efficiency. Mesh Networking: Supports mesh networking, allowing devices to forward data on behalf of others, extending the network's range and improving reliability. This feature is particularly useful in environments where direct line-of-sight communication is not possible. Interoperability: Promotes interoperability between different devices and networks, ensuring seamless integration into larger IP networks. This interoperability is a significant advantage for diverse IoT ecosystems. Fundamentals of SCADA and IoT Unit II- by Aditya More 61

6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks) Outdoor Range: 6LoWPAN networks can achieve an outdoor range of approximately 200 meters, providing sufficient coverage for various applications such as smart agriculture and environmental monitoring. Data Rate: The protocol supports a maximum data rate of 200 kbps, which is adequate for transmitting sensor data and control signals in IoT applications. Node Capacity: 6LoWPAN networks can accommodate up to 100 nodes, making it scalable for small to medium-sized deployments in smart homes, industrial automation, and other IoT ecosystems. Fundamentals of SCADA and IoT Unit II- by Aditya More 62

6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks) Components of a 6LoWPAN Network 6LoWPAN Nodes: These are low-power devices equipped with 6LoWPAN capabilities, commonly used in sensors and actuators for various applications such as environmental monitoring and smart homes. Edge Routers: Gateways that connect 6LoWPAN networks to larger IP networks, translating between 6LoWPAN and traditional IP packets. Edge routers are critical for enabling communication between IoT devices and the broader internet. Mesh Routers: Intermediate nodes that assist in routing packets within the 6LoWPAN network. They enhance network coverage, robustness, and reliability by creating multiple pathways for data to travel. Fundamentals of SCADA and IoT Unit II- by Aditya More 63

6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks) Fundamentals of SCADA and IoT Unit II- by Aditya More 64

6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks) Advantages of 6LoWPAN Robust Mesh Networking: 6LoWPAN is a mesh network that is robust, scalable, and capable of self-healing. This ensures continuous operation and reliability even if some nodes fail. It also offers one-to-many and many-to-one routing, providing flexibility in communication patterns. Energy Efficiency: In the network, leaf nodes can remain in sleep mode for extended periods, significantly conserving energy and extending battery life. Low-Cost Communication: It delivers low-cost communication, making it economically viable for large-scale IoT deployments. Fundamentals of SCADA and IoT Unit II- by Aditya More 65

6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks) IPv6 Integration: Uses the IPv6 protocol, allowing direct routing to cloud platforms and seamless integration into larger IP networks. This capability is essential for IoT devices that need to interact with cloud services. Scalability: Supports a large number of devices, making it suitable for extensive IoT deployments in smart cities and industrial settings. Flexibility: Compatible with various applications and devices due to its IPv6 foundation, allowing it to be used in a wide range of IoT scenarios. Secure Communication: Although less secure than some other protocols, 6LoWPAN still provides a level of security suitable for many IoT applications, especially when paired with additional security measures. Fundamentals of SCADA and IoT Unit II- by Aditya More 66

6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks) Challenges and Considerations Security: Ensuring secure communication in resource-constrained environments is challenging. Implementing robust encryption and authentication mechanisms while maintaining low power consumption is essential. Network Management: Managing large-scale 6LoWPAN networks can be complex. Efficient network management protocols and tools are required to monitor and maintain network performance. Interference and Reliability: Wireless communication is susceptible to interference and signal degradation. Techniques to mitigate these issues, such as frequency hopping and robust error correction, are crucial. Fundamentals of SCADA and IoT Unit II- by Aditya More 67

IoT Application Layer Protocols- CoAP The Constrained Application Protocol (CoAP) is a specialized web transfer protocol designed for use with constrained nodes and constrained networks in the Internet of Things (IoT). CoAP is intended for applications such as smart energy and building automation, where devices often have limited processing power, memory, and battery life. Fundamentals of SCADA and IoT Unit II- by Aditya More 68

IoT Application Layer Protocols- CoAP Fundamentals of SCADA and IoT Unit II- by Aditya More 69 As you can see in Figure 6-7, the CoAP message format is relatively simple and flexible. It allows CoAP to deliver low overhead, which is critical for constrained networks, while also being easy to parse and process for constrained devices.

IoT Application Layer Protocols- CoAP Fundamentals of SCADA and IoT Unit II- by Aditya More 70 CoAP Message Header Description Ver (Version) Indicates the CoAP version number. T (Type) Indicates message type viz. confirmable (0), non-confirmable (1), ACK (2) or RESET(3). Token Every request carries a token (but it may be zero length) whose value was generated by the client. TKL (Token Length) Indicates the length of the variable-length Token field, which may be 0–8 bytes in length. Code The three most significant bits form a number known as the "class", which is analogous to the class of HTTP status codes. The five least significant bits form a code that communicates further detail about the request or response. Message ID Used to detect message duplication and to match messages of type acknowledgement/reset to messages of type confirmable/non-confirmable.

IoT Application Layer Protocols- CoAP Fundamentals of SCADA and IoT Unit II- by Aditya More 71

IoT Application Layer Protocols- CoAP Key Features Lightweight: CoAP is designed to be simple and lightweight, making it suitable for devices with limited resources. It minimizes the overhead required for message exchanges compared to traditional web protocols like HTTP. RESTful Architecture: CoAP follows a RESTful architecture, similar to HTTP, using methods such as GET, POST, PUT, and DELETE. This makes it easy to integrate with existing web services and simplifies the development of IoT applications. Message Exchange: CoAP messages are exchanged asynchronously over UDP (User Datagram Protocol), reducing the complexity and overhead associated with TCP-based communication. It supports both confirmable and non-confirmable messages, ensuring reliability where needed. Fundamentals of SCADA and IoT Unit II- by Aditya More 72

IoT Application Layer Protocols- CoAP Built-in Support for Discovery: CoAP includes mechanisms for resource discovery, allowing devices to find and interact with each other dynamically. This is essential for the scalability and flexibility of IoT networks. Multicast Support: CoAP supports multicast communication, enabling efficient distribution of information to multiple devices simultaneously. This is useful in applications like firmware updates and sensor data dissemination. Low Header Overhead: CoAP messages have a small header size, typically 4 bytes, which conserves bandwidth and reduces processing requirements. Fundamentals of SCADA and IoT Unit II- by Aditya More 73

IoT Application Layer Protocols- CoAP Observability: CoAP supports the observe pattern, allowing clients to register their interest in a resource and receive updates when the resource state changes. This is beneficial for monitoring and real-time applications. Security: CoAP can be secured using DTLS (Datagram Transport Layer Security), providing confidentiality, integrity, and authentication for communication between devices. Fundamentals of SCADA and IoT Unit II- by Aditya More 74

IoT Application Layer Protocols- CoAP Advantages of CoAP Efficiency: CoAP is designed to be efficient in terms of bandwidth and power consumption, making it ideal for constrained environments. Interoperability: Follows a RESTful model similar to HTTP, which makes it easy to integrate with existing web technologies and services. Flexibility: Supports asynchronous communication and can handle both unicast and multicast traffic, providing flexibility in communication patterns. Scalability: Built-in discovery and resource observation mechanisms support the dynamic and scalable nature of IoT networks. Security: Can be secured using DTLS, ensuring secure communication even in constrained environments. Fundamentals of SCADA and IoT Unit II- by Aditya More 75

IoT Application Layer Protocols- CoAP Disadvantages of CoAP UDP-Based: Relies on UDP, which does not provide guaranteed delivery, ordering, or congestion control, unlike TCP. This can be mitigated through CoAP's confirmable message feature, but it may not be suitable for all applications. Limited Bandwidth: While CoAP is efficient, the use of a small header size and UDP may limit the amount of data that can be effectively transmitted in a single message. Resource Constraints: Although designed for constrained devices, implementing DTLS for security can still be resource-intensive, potentially impacting device performance. Fundamentals of SCADA and IoT Unit II- by Aditya More 76

IoT Application Layer Protocols- MQTT Message Queuing Telemetry Transport, or MQTT, is a communications protocol designed for Internet of Things devices with extremely high latency and restricted low bandwidth. Message Queuing Telemetry Transport is a perfect protocol for machine-to-machine (M2M) communication since it is designed specifically for low-bandwidth, high-latency settings. MQTT is a simple, lightweight messaging protocol used to establish communication between multiple devices. It is a TCP-based protocol relying on the publish-subscribe model. This communication protocol is suitable for transmitting data between resource-constrained devices having low bandwidth and low power requirements Fundamentals of SCADA and IoT Unit II- by Aditya More 77

IoT Application Layer Protocols- MQTT Fundamentals of SCADA and IoT Unit II- by Aditya More 78

IoT Application Layer Protocols- MQTT An MQTT client can act as a publisher to send data (or resource information) to an MQTT server acting as an MQTT message broker. In the example illustrated in Figure, the MQTT client on the left side is a temperature (Temp) and relative humidity (RH) sensor that publishes its Temp/RH data. The MQTT server (or message broker) accepts the network connection along with application messages, such as Temp/RH data, from the publishers. It also handles the subscription and unsubscription process and pushes the application data to MQTT clients acting as subscribers. The application on the right side of Figure is an MQTT client that is a subscriber to the Temp/RH data being generated by the publisher or sensor on the left. This model, where subscribers express a desire to receive information from publishers. Fundamentals of SCADA and IoT Unit II- by Aditya More 79

IoT Application Layer Protocols- MQTT With MQTT, clients can subscribe to all data (using a wildcard character) or specific data from the information tree of a publisher. In addition, the presence of a message broker in MQTT decouples the data transmission between clients acting as publishers and subscribers. In fact, publishers and subscribers do not even know (or need to know) about each other. A benefit of having this decoupling is that the MQTT message broker ensures that information can be buffered and cached in case of network failures. This also means that publishers and subscribers do not have to be online at the same time. MQTT control packets run over a TCP transport using port 1883. Fundamentals of SCADA and IoT Unit II- by Aditya More 80

IoT Application Layer Protocols- MQTT Message Format MQTT is a lightweight protocol because each control packet consists of a 2-byte fixed header with optional variable header fields and optional payload. You should note that a control packet can contain a payload up to 256 MB. Fundamentals of SCADA and IoT Unit II- by Aditya More 81

IoT Application Layer Protocols- MQTT Compared to the CoAP message format in Figure, you can see that MQTT contains a smaller header of 2 bytes compared to 4 bytes for CoAP. The first MQTT field in the header is Message Type, which identifies the kind of MQTT packet within a message. Fourteen different types of control packets are specified in MQTT version 3.1.1. Each of them has a unique value that is coded into the Message Type field. Note that values 0 and 15 are reserved. Fundamentals of SCADA and IoT Unit II- by Aditya More 82

IoT Application Layer Protocols- MQTT Fundamentals of SCADA and IoT Unit II- by Aditya More 83

IoT Application Layer Protocols- MQTT The next field in the MQTT header is DUP (Duplication Flag). This flag, when set, allows the client to notate that the packet has been sent previously, but an acknowledgement was not received. The QoS header field allows for the selection of three different QoS levels. The next field is the Retain flag. Only found in a PUBLISH message, the Retain flag notifies the server to hold onto the message data. This allows new subscribers to instantly receive the last known value without having to wait for the next update from the publisher. Fundamentals of SCADA and IoT Unit II- by Aditya More 84

IoT Application Layer Protocols- MQTT MQTT sessions between each client and server consist of four phases: session establishment, authentication, data exchange, and session termination. Each client connecting to a server has a unique client ID, which allows the identification of the MQTT session between both parties. When the server is delivering an application message to more than one client, each client is treated independently. Subscriptions to resources generate SUBSCRIBE/SUBACK control packets, while unsubscription is performed through the exchange of UNSUBSCRIBE/UNSUBACK control packets. Graceful termination of a connection is done through a DISCONNECT control packet, which also offers the capability for a client to reconnect by re-sending its client ID to resume the operations. Fundamentals of SCADA and IoT Unit II- by Aditya More 85

IoT Application Layer Protocols- MQTT The MQTT protocol offers three levels of quality of service (QoS). QoS 0: Best-Effort Delivery (At Most Once) QoS 0 is the simplest level of data service, often referred to as "at most once" delivery. In this mode, the publisher sends its message to a server, which then transmits it to the subscribers. However, there are no guarantees that the message will be received. The receiver does not send any acknowledgment, and the sender does not attempt to resend the message. As a result, the message might arrive at the receiver once or not at all. Fundamentals of SCADA and IoT Unit II- by Aditya More 86

IoT Application Layer Protocols- MQTT QoS 1: Guaranteed Delivery (At Least Once) QoS 1 ensures that messages are delivered at least once between the publisher and the server, and subsequently between the server and the subscribers. This level includes a packet identifier in the variable header of PUBLISH and PUBACK packets. If the message is not acknowledged by a PUBACK packet, the sender will resend it. This process guarantees that the message is delivered at least once, even if it means the message could be received more than once. Fundamentals of SCADA and IoT Unit II- by Aditya More 87

IoT Application Layer Protocols- MQTT QoS 2: Exactly Once Delivery (Guaranteed Service) QoS 2 is the highest level of service, designed for scenarios where neither message loss nor duplication is acceptable. This level involves more overhead because each packet contains an optional variable header with a packet identifier. The confirmation of message receipt requires a two-step acknowledgment process. First, the PUBLISH message is acknowledged with a PUBREC packet. Then, a PUBREL packet is sent by the sender and acknowledged by a PUBCOMP packet from the receiver. This ensures that each message is delivered exactly once, regardless of how many times it needs to be retried. Fundamentals of SCADA and IoT Unit II- by Aditya More 88

CoAP Vs MQTT Fundamentals of SCADA and IoT Unit II- by Aditya More 89 Feature CoAP (Constrained Application Protocol) MQTT (Message Queuing Telemetry Transport) Protocol Type CoAP is an application layer protocol designed for constrained environments. MQTT is an application layer protocol often used for reliable communication in IoT. Communication Model CoAP operates on a client-server model. MQTT uses a publish-subscribe model. Transport Protocol CoAP uses UDP (User Datagram Protocol) for transport. MQTT uses TCP (Transmission Control Protocol) for transport. Message Size CoAP supports smaller message sizes, making it suitable for devices with limited resources. MQTT typically has larger message sizes compared to CoAP. Reliability CoAP supports confirmable and non-confirmable messages with optional acknowledgments to ensure reliability. MQTT provides three Quality of Service (QoS) levels: QoS 0 (at most once), QoS 1 (at least once), and QoS 2 (exactly once) to ensure message delivery.

CoAP Vs MQTT Fundamentals of SCADA and IoT Unit II- by Aditya More 90 Feature CoAP (Constrained Application Protocol) MQTT (Message Queuing Telemetry Transport) Resource Discovery CoAP has built-in resource discovery using URIs, which helps in identifying and accessing resources easily. MQTT does not have built-in resource discovery mechanisms. Message Overhead CoAP has lower message overhead, making it suitable for low-power and lossy networks. MQTT has higher message overhead due to the use of TCP and additional QoS mechanisms. Security CoAP uses DTLS (Datagram Transport Layer Security) for secure communication. MQTT uses SSL/TLS (Secure Sockets Layer/Transport Layer Security) for secure communication. Suitability CoAP is ideal for constrained environments like IoT devices with limited resources. MQTT is suitable for applications requiring reliable and ordered message delivery, often used in industrial and enterprise environments. Use Cases CoAP is commonly used in smart home devices, environmental monitoring, and other low-power, low-bandwidth applications. MQTT is widely used in industrial automation, remote monitoring, and other applications requiring reliable communication.