UNIT 1: Internet of Things - Comprehensive Study Notes
1. Fundamentals of IoT
1.1 Definition and Conceptual Overview
Internet of Things (IoT) is a system of interrelated computing devices, mechanical and digital machines, objects, animals, or people that are provided with unique identifiers and the ability to transfer data over a network without requiring human-to-human or human-to-computer interaction.
Core Idea: "Things" become smart via sensing, actuation, and connectivity, enabling data-driven decisions.
1.2 Evolution from M2M to IoT
| Aspect | M2M (Machine-to-Machine) | IoT (Internet of Things) |
|---|---|---|
| Connectivity | Point-to-point, proprietary, closed networks | IP-based, open, Internet-scale |
| Data Handling | Limited, siloed, for immediate control | Big Data, cloud analytics, predictive insights |
| Architecture | Vertical, application-specific | Horizontal, platform-based, service-oriented |
| Standardization | Early: ETSI M2M, oneM2M (service layer) | Evolved: IETF, IEEE, OMA (full stack) |
| Focus | Remote monitoring & control | Automation, optimization, new business models |
Reasons for Shift:
-
Ubiquitous IP connectivity (IPv6 address space).
-
Advancements in cloud computing and big data analytics.
-
Proliferation of low-cost sensors/actuators and wireless tech.
-
Demand for context-aware and user-centric services.
Data Analytics Difference:
-
M2M: Rule-based, real-time but volume-limited.
-
IoT: Batch & stream processing, machine learning, handles Volume, Velocity, Variety (3Vs).
1.3 IoT Ecosystem and Key Enablers
IoT Ecosystem Components:
-
Things/Devices: Sensors, actuators, embedded systems.
-
Connectivity/Gateways: Protocol translation, edge processing.
-
Cloud/Platforms: Data storage, analytics, device management.
-
Applications: User interfaces, business logic.
-
Analytics & Security: Overarching services.
Key Enablers (Building Blocks):
-
Sensors & Actuators: Physical world interface.
-
RFID/NFC: Identification & tracking.
-
Microcontrollers/SBCs: Processing (e.g., Arduino, Raspberry Pi).
-
Wireless Protocols: Wi-Fi, BLE, ZigBee, LoRaWAN, cellular (NB-IoT).
-
Cloud Platforms: AWS IoT, Azure IoT, Google Cloud IoT Core.
-
Data Analytics Tools: Stream processing (Apache Kafka), ML frameworks.
1.4 Characteristics of IoT Systems
-
Uniqueness & Identity: Each device has a unique ID (e.g., IP address, UUID).
-
Heterogeneity: Diverse hardware, OS, protocols.
-
Dynamic & Self-Adapting: Devices join/leave, topology changes.
-
Massive Scale: Billions of devices.
-
Interoperability: Need for standard protocols & data models.
-
Data-Centric: Primary value is in data collection & analysis.
-
Security & Privacy Challenges: Expanded attack surface.
1.5 Challenges and Requirements of IoT Devices
| Challenge | Requirement |
|---|---|
| Power Consumption | Battery-operated, energy harvesting, low-power modes |
| Processing & Memory | Constrained resources, lightweight OS (e.g., FreeRTOS) |
| Connectivity | Support for multiple protocols (Wi-Fi, BLE, LoRa), intermittent connectivity |
| Security | Secure boot, encryption (TLS/DTLS), authentication, OTA updates |
| Scalability | Ability to manage millions of devices |
| Interoperability | Standard data formats (JSON, CBOR), common protocols |
| Cost | Low unit cost for mass deployment |
| Robustness | Operate in harsh environments (temperature, humidity) |
[!TIP] Exam Focus: Be prepared to list at least 5 challenges and map them to specific requirements (e.g., "low power โ battery life > 1 year, sleep modes").
2. IoT Architectural Frameworks
2.1 Reference Architectures
Three-Layer Architecture:
-
Perception Layer: Sensors/actuators for data acquisition/control.
-
Network Layer: Data transmission via wired/wireless networks, gateways.
-
Application Layer: User-facing apps, data analytics, business logic.
Five-Layer Architecture (Expanded):
-
Perception Layer
-
Transport/Network Layer (connectivity, routing)
-
Processing Layer (edge/fog computing, data preprocessing)
-
Application Layer
-
Business Layer (process management, business models)
IoT-A (IoT Architecture Reference Model):
-
Developed by European research projects.
-
Defines abstraction layers and information models (e.g., ETSI M2M, oneM2M).
-
Emphasizes end-to-end security and semantic interoperability.
IoT Reference Architecture & Information Model:
-
Information Model: Standardized way to describe "Things" (attributes, services, events). Example: oneM2M's
<resource>structure. -
Architecture: Defines functional components (e.g., Application Service Entity, Common Service Entity) and reference points (interfaces).
2.2 IoT Planes and Interdependencies
2.3 Service-Oriented Architecture (SOA) for IoT
IoT SOA Services:
-
Device Management: Provisioning, monitoring, firmware updates.
-
Data Management: Storage, filtering, aggregation.
-
Analytics Services: Stream processing, ML inference.
-
Security Services: Authentication, authorization, encryption.
-
Application Enablement: APIs for app developers.
Challenges:
-
Resource Constraints: Devices cannot run full SOA stacks.
-
Latency: SOA's request-response may not suit real-time needs.
-
Discovery: Dynamic device/service discovery in large-scale systems.
-
Orchestration: Coordinating multiple services across domains.
2.4 Level-Based IoT Systems
| Level | Description | Example |
|---|---|---|
| Level 3 (Edge/Fog) | Intelligence at/near devices. Local processing, reduced latency, bandwidth saving. | Industrial IoT: PLCs doing local control; Smart cameras with on-board analytics. |
| Level 4 (Cloud-Centric) | All data sent to cloud for processing. Centralized analytics, global view. | Consumer wearables sending all data to cloud servers. |
[!TIP] Exam Key: Level 3 = Edge/Fog Computing (processing near source). Level 4 = Cloud-Only (dumb devices, smart cloud).
2.5 IoT Communication Models
-
Device-to-Device (D2D): Direct communication (e.g., Bluetooth, ZigBee).
-
Device-to-Gateway: Device talks to a gateway that connects to cloud (common for constrained devices).
-
Device-to-Cloud: Device connects directly to cloud via Wi-Fi/cellular (e.g., smart thermostat).
-
Back-End Data-Sharing: Cloud-to-cloud integration (e.g., AWS IoT to Salesforce).
2.6 Logical vs Physical Design of IoT
| Logical Design | Physical Design |
|---|---|
| What the system does (functional view). | How the system is built (hardware/implementation). |
| Layers: Perception, Network, Application (abstract). | Specific sensors, microcontrollers, communication modules (e.g., ESP32, SIM800L). |
| Defines services, APIs, data flows. | Defines circuit diagrams, PCB layouts, power budgets. |
| Example: "Temperature sensor sends data to cloud via MQTT." | Example: "DS18B20 sensor โ Arduino Uno โ ESP8266 Wi-Fi module โ MQTT broker." |
2.7 IoT Gateway Functionality and Ecosystem Operation
Gateway Functions:
-
Protocol Translation: e.g., ZigBee/Z-Wave โ Wi-Fi/Ethernet (MQTT/HTTP).
-
Data Filtering & Aggregation: Reduce cloud traffic, preprocess data.
-
Security: Firewall, encryption, device authentication.
-
Edge Computing: Local decision-making, offline operation.
-
Device Management: Onboarding, OTA updates.
Ecosystem Operation Flow:
-
Sensing: Sensors collect data.
-
Edge Processing (Gateway): Protocol conversion, local analytics.
-
Network Transmission: To cloud via IP networks.
-
Cloud Platform: Data ingestion, storage, analytics.
-
Application: User dashboard, alerts, control commands.
-
Actuation: Commands sent back via gateway to actuators.
[!TIP] Common Pitfall: Gateway is not just a router; it adds intelligence (filtering, security, protocol bridging).
3. Enabling Technologies: Devices and Sensing
3.1 Sensors
3.1.1 Types & Common IoT Sensors:
-
Environmental: Temperature (DS18B20, DHT22), Humidity (DHT11), Pressure (BMP280), Gas (MQ-series).
-
Motion/Position: Accelerometer (MPU6050), Gyroscope, GPS (Neo-6M), Proximity (IR, ultrasonic).
-
Image/Vision: Camera modules (Raspberry Pi Camera), CMOS sensors.
-
Chemical/Biological: pH sensor, COโ sensor, biosensors.
3.1.2 Sensor Features & Selection Criteria:
| Feature | Consideration |
|---|---|
| Accuracy & Precision | ยฑ% of reading, resolution. |
| Range | Min/max measurable values. |
| Power Consumption | mA during active/sleep mode. |
| Output Interface | Analog (voltage/current), digital (I2C, SPI, UART). |
| Size & Form Factor | Suitable for embedded deployment. |
| Cost | Unit price for mass deployment. |
| Environmental Rating | IP rating, operating temperature. |
3.1.3 Quantization Error in Sensor Data Acquisition
When converting analog sensor output to digital via ADC (Analog-to-Digital Converter).
-
Full-Scale Range (FSR): Max analog range (e.g., 0-5V).
-
Resolution: Number of bits
n(e.g., 10-bit ADC: 1024 levels). -
Quantization Step Size (LSB): $$\displaystyle \text{LSB} = \frac{\text{FSR}}{2^n} $$
-
Maximum Quantization Error: $$\displaystyle \pm \frac{\text{LSB}}{2} = \pm \frac{\text{FSR}}{2^{n+1}} $$
Example: 10-bit ADC, 0-5V range. $$\displaystyle \text{LSB} = \frac{5}{1024} \approx 4.88\,\text{mV} $$, Max error $$\displaystyle = \pm 2.44\,\text{mV} $$.
[!TIP] Exam Formula: $$\displaystyle \boxed{Q_e = \frac{\text{FSR}}{2^{n+1}}} $$ (maximum quantization error).
3.2 Actuators
3.2.1 Role of Actuators in IoT
Convert electrical/control signals into physical action (motion, force, switching). They are the "effectors" that change the physical world based on IoT decisions.
3.2.2 Types of Actuators:
-
Mechanical: Electric motors (DC, stepper, servo), relays, solenoids.
-
Soft Actuators: Made of flexible materials (silicone, rubber), used in robotics for safe human interaction.
-
Shape Memory Polymer (SMP) Based: Change shape with temperature/light stimulus; used in biomedical devices.
-
Pneumatic: Use compressed air; fast response, clean, used in industrial automation.
3.2.3 Four Common Characteristics for Actuator Selection:
-
Force/Torque Output: Required strength for the task.
-
Speed/Response Time: How fast it acts (ms vs s).
-
Precision & Resolution: Accuracy of positioning/control.
-
Operating Environment: Temperature, humidity, explosion-proof needs.
3.2.4 Comparison of Actuator Types:
| Type | Advantages | Disadvantages | IoT Use Case |
|---|---|---|---|
| Mechanical | High force, precise, mature tech | Rigid, noisy, maintenance | Industrial robots, valves |
| Soft | Safe, flexible, biomimetic | Low force, complex control | Wearables, assistive devices |
| SMP | Lightweight, silent, biocompatible | Slow response, temperature-sensitive | Medical stents, grippers |
| Pneumatic | Fast, clean, high power/weight | Needs air supply, less precise | Factory automation, packaging |
3.3 Microcontrollers and Interfacing
3.3.1 Review of Basic Microcontrollers:
-
Arduino (Uno, Nano): ATmega328P, 8-bit, 32KB Flash, easy IDE, great for prototyping.
-
ESP32/ESP8266: 32-bit, Wi-Fi/Bluetooth built-in, suitable for IoT nodes.
-
STM32: ARM Cortex-M, high performance, low power, industrial use.
-
Raspberry Pi Pico: RP2040 dual-core ARM, cheap, good for real-time tasks.
3.3.2 Interfacing Techniques:
-
SPI (Serial Peripheral Interface): Full-duplex, synchronous, 4-wire (MOSI, MISO, SCK, CS). Fast, point-to-point, master-slave.
-
I2C (Inter-Integrated Circuit): Half-duplex, synchronous, 2-wire (SDA, SCL). Multi-master/multi-slave, address-based, slower than SPI.
-
GPIO (General Purpose Input/Output): Digital pins for simple on/off or custom protocols. Can be input (read sensor) or output (drive LED).
[!TIP] Rule of Thumb: Use SPI for speed (display, SD card), I2C for simplicity (multiple sensors on 2 wires), GPIO for basic control.
3.4 Single-Board Computers: Raspberry Pi
3.4.1 Raspberry Pi vs Desktop Computer:
| Raspberry Pi | Desktop Computer |
|---|---|
| ARM-based SoC (System-on-Chip) | x86/AMD64 CPU |
| Low power (3-7W) | High power (65W+) |
| No internal storage (SD card) | HDD/SSD |
| Limited RAM (1-8GB) | More RAM (8-32GB+) |
| GPIO pins for hardware interfacing | No native GPIO (needs add-on cards) |
| Runs Linux (Raspbian) | Windows/Linux/macOS |
| Cost: $35-$75 | Cost: $500+ |
3.4.2 Use of SPI, I2C, GPIO on Raspberry Pi:
-
GPIO Pins: 40-pin header. Used for digital I/O, PWM, SPI, I2C, UART.
-
SPI Pins: GPIO 10 (MOSI), 9 (MISO), 11 (SCLK), 8 (CE0), 7 (CE1). Enable via
raspi-config. -
I2C Pins: GPIO 2 (SDA), 3 (SCL). Enable via
raspi-config. Usei2c-toolsto scan devices (i2cdetect -y 1). -
Example: Connect BMP280 (I2C) โ Pi's GPIO 2/3 โ Read pressure via Python
smbuslibrary.
4. Identification and Wireless Technologies
4.1 Radio Frequency Identification (RFID)
4.1.1 Principles and Concepts:
-
Tags: Passive (no battery, powered by reader's RF), Active (battery-powered), Semi-passive.
-
Reader: Emits RF signal, receives tag response.
-
Frequency Bands: LF (125-134 kHz), HF (13.56 MHz), UHF (860-960 MHz), Microwave (2.45 GHz).
-
Working: Reader sends electromagnetic field โ Passive tag's antenna induces current โ chip modulates signal โ reader decodes.
4.1.2 RFID Features & Terminology:
-
EPC (Electronic Product Code): Unique identifier for physical objects.
-
Read Range: LF (cm), HF (m), UHF (m to 10m).
-
Data Rate: Bits per second (higher freq โ higher rate).
-
Tag Types: Read-only, read-write, tamper-evident.
-
Advantages over Barcode: No line-of-sight, multiple reads, durable, rewritable.
4.1.3 Link between RFID and IoT for Smart Things:
-
RFID provides automatic identification & tracking.
-
In IoT, RFID tags make physical objects "smart" by attaching digital identity.
-
Integration: RFID reader โ IoT gateway โ Cloud platform โ Real-time inventory, supply chain visibility, asset tracking.
-
Example: Warehouse: RFID-tagged pallets โ fixed readers โ IoT platform โ stock levels updated automatically.
4.2 Near Field Communication (NFC)
4.2.1 Definition and Technologies:
-
Short-range (โค10 cm), high-frequency (13.56 MHz) wireless tech.
-
Based on RFID standards (ISO/IEC 14443, 18092).
-
Modes: Reader/Writer, Peer-to-Peer, Card Emulation (phone as smart card).
4.2.2 Applications in IoT:
-
Device Pairing: Tap-to-connect (e.g., speaker, headset).
-
Access Control: NFC door locks, ticketing.
-
Payment: Contactless cards/mobile wallets.
-
Configuration: Tap NFC tag to configure Wi-Fi credentials on IoT device.
-
Healthcare: Patient ID wristbands.
4.3 Wireless Sensor Networks (WSN)
4.3.1 Relation between WSN and IoT:
-
WSN is a subset/enabler of IoT. WSN focuses on sensing & data collection from distributed nodes.
-
IoT is broader, including actuation, cloud integration, applications.
-
Example: Precision agriculture: WSN (soil moisture sensors) โ Gateway โ IoT cloud platform โ Irrigation control (actuation).
4.3.2 Applications of WSN:
-
Environmental monitoring (forest fires, air quality).
-
Industrial monitoring (vibration, temperature in machinery).
-
Smart agriculture (crop monitoring).
-
Health monitoring (patient vital signs).
-
Military (intrusion detection).
5. Communication Protocols and Standards
5.1 Application Layer Protocols
5.1.1 MQTT (Message Queuing Telemetry Transport)
-
Role: Lightweight publish-subscribe protocol for constrained networks.
-
Components: Broker (central server), Clients (publishers/subscribers), Topics (message channels).
-
QoS Levels:
-
0: At most once (fire-and-forget).
-
1: At least once (acknowledged).
-
2: Exactly once (handshake).
-
-
Example Use Case: Remote sensor monitoring (temperature sensor publishes to
home/sensor/temp; dashboard subscribes). -
MQTT with WebSockets: Enables MQTT over TCP port 80/443, traversing firewalls; used for web-based dashboards.
5.1.2 CoAP (Constrained Application Protocol)
-
Basic Operations: RESTful (GET, PUT, POST, DELETE). Uses UDP (lightweight).
-
Request-Response Model: Confirmable (CON) messages require ACK; Non-confirmable (NON) for low latency.
-
Observe Option: Allows client to subscribe to resource changes (like MQTT).
-
Use in Constrained Networks: Low overhead (header ~4 bytes), supports multicast, designed for 6LoWPAN.
-
Example: Smart lighting: GET
/lights/1/stateto check status; PUT to turn on/off.
5.1.3 AMQP (Advanced Message Queuing Protocol)
-
Features: Binary, wire-level protocol for message-oriented middleware. Supports queues, routing, transactions.
-
Components:
-
Exchange: Receives messages from producers, routes to queues.
-
Queue: Stores messages for consumers.
-
Binding: Rules connecting exchange to queue.
-
-
Message Attributes:
content-type,correlation-id,priority,timestamp. -
Payload: Actual message body (any format: JSON, binary).
-
Frame Types: 1. Command (method frames like
basic.publish), 2. Transfer (carry message data), 3. Flow (control flow). Total 3 core frame types (plus headers/body for message transfer).
5.1.4 XMPP (Extensible Messaging and Presence Protocol)
-
How it Improves IoT Services:
-
Real-time presence: Know if device is online/offline.
-
** federation:** Inter-domain communication (e.g., different smart home systems).
-
Extensibility: XMPP Extension Protocols (XEPs) for IoT (e.g., XEP-0323: IoT Sensor Data).
-
Security: Built-in TLS, SASL authentication.
-
Example: Chat-bot controlling IoT devices via XMPP messages.
-
5.1.5 SMQTT (Secure MQTT)
-
Secure Message Transfer Mechanism:
-
Extends MQTT with lightweight encryption.
-
Uses symmetric key (AES) for payload encryption.
-
Key distribution via secure channel (e.g., TLS during connection).
-
Message format: Encrypted payload + header.
-
Goal: Confidentiality for MQTT without full TLS overhead.
-
5.1.6 WebSockets for Real-Time IoT Communication
-
Provides full-duplex communication over single TCP connection.
-
Use in IoT: Web dashboards receiving live sensor data; bidirectional control from browser to device.
-
Handshake: HTTP upgrade request (
Upgrade: websocket). -
Frame-based: Low latency, no polling.
5.2 Network/Transport Layer
5.2.1 6LoWPAN (IPv6 over Low-Power Wireless Personal Area Networks)
-
Functionality: Adaptation layer enabling IPv6 packets over IEEE 802.15.4 (max 127-byte payload). Key: Header compression (HC1/HC2) and fragmentation.
-
Comparison with IPv4/IPv6:
| IPv4 | IPv6 | 6LoWPAN | |----------|----------|-------------| | 32-bit address | 128-bit address | Compresses IPv6 header to ~1-2 bytes | | NAT required | No NAT (plenty of addresses) | Runs over 802.15.4 (not Ethernet) | | No built-in security | IPsec mandatory (optional) | Security at link layer (802.15.4) or upper (DTLS) |
5.2.2 IPv6 Addressing for IoT
-
Impact on IoT Development:
-
Massive Address Space: $$\displaystyle 2^{128} $$ addresses โ every device can have public IP.
-
Auto-configuration (SLAAC): Devices self-configure without DHCP server.
-
No NAT Traversal Issues: Peer-to-peer communication easier.
-
Built-in Security: IPsec support (though often not used due to constraints).
-
Routing Efficiency: Hierarchical addressing, aggregation.
-
-
Challenge: IPv6 overhead (40-byte header) too large for 802.15.4 MTU โ 6LoWPAN compression essential.
5.3 Physical/Link Layer
5.3.1 IEEE 802.15.4 Protocol
-
Protocol Details: Defines PHY (modulation, frequency bands: 868/915 MHz, 2.4 GHz) and MAC (CSMA-CA, beacon-enabled/non-beacon, frame structure, security).
-
Relation to IoT: Foundation for ZigBee, 6LoWPAN, WirelessHART. Low-power, low-data-rate (250 kbps max), supports star/mesh topologies.
5.3.2 ZigBee
-
Architecture:
-
Coordinator: Forms network, stores network info.
-
Router: Extends network range, relays messages.
-
End Device: Sleeps, communicates only with parent (router/coordinator).
-
-
Types:
-
ZigBee PRO (ZigBee 3.0): General-purpose, mesh, for home/building automation.
-
ZigBee RF4CE: Remote control applications (low latency, simple).
-
ZigBee IP: Based on 6LoWPAN, uses IPv6.
-
-
Features: Low power, mesh networking (AODV routing), secure (AES-128), up to 65,000 nodes.
-
Applications: Home automation (lights, locks), smart metering, industrial monitoring.
5.4 Network Topologies and Connection Types
| Topology | Diagram | IoT Use Case | Pros/Cons |
|---|---|---|---|
| Star | DiagramCANVAS: Central hub (gateway/AP) with nodes radiating out. |
Wi-Fi sensors, Bluetooth piconet | Simple, but hub is single point of failure. |
| Mesh | DiagramCANVAS: Nodes interconnected in web-like structure. |
ZigBee, Thread, 6LoWPAN | Robust, self-healing, scalable; complex routing. |
| Tree | DiagramCANVAS: Hierarchical, root at top, branches down. |
Some WSN, ZigBee cluster-tree | Easy management, but parent failure isolates children. |
| Bus | DiagramCANVAS: Single backbone cable with nodes tapped along it. |
Wired Ethernet (rare in IoT) | Simple wiring, but backbone failure breaks all. |
| Ring | DiagramCANVAS: Nodes connected in closed loop. |
Token Ring (obsolete), some industrial nets | Deterministic, but single break disrupts. |
Connection Types Classification:
-
Wired: Ethernet (TCP/IP), RS-485 (Modbus), USB.
-
Wireless:
-
Short-Range: Wi-Fi, BLE, ZigBee, Z-Wave, NFC.
-
Long-Range/Cellular: LTE-M, NB-IoT, LoRaWAN, Sigfox.
-
Satellite: For remote areas (expensive).
-
6. Cloud Computing and Data Analytics in IoT
6.1 Cloud Service Models for IoT
-
IaaS (Infrastructure as a Service): Virtual machines, storage, networking. IoT Use: Host custom IoT platforms, databases.
-
PaaS (Platform as a Service): Runtime environment, middleware, development tools. IoT Use: AWS IoT Core, Azure IoT Hub (device management, rules engine).
-
SaaS (Software as a Service): Ready-to-use applications. IoT Use: Salesforce IoT Cloud, SAP Leonardo.
6.2 Cloud Communication APIs for IoT
-
RESTful APIs (HTTP/HTTPS): Most common. CRUD operations on device shadows/twins.
-
MQTT over WebSockets: For browser-based real-time dashboards.
-
CoAP: For constrained devices to communicate with cloud proxies.
-
Vendor-Specific: AWS IoT Device SDK, Azure IoT SDKs (support MQTT, AMQP, HTTP).
6.3 Role of Data Analytics in IoT
-
Descriptive: What happened? (Dashboards, alerts).
-
Diagnostic: Why did it happen? (Root cause analysis).
-
Predictive: What will happen? (Failure prediction, demand forecasting).
-
Prescriptive: What should we do? (Automated decisions, optimization).
-
Difference from M2M: M2M analytics is reactive & siloed; IoT analytics is proactive, integrated, and uses advanced ML on massive, diverse datasets.
6.4 IoT Platforms Overview
-
Cloud-Centric: AWS IoT, Microsoft Azure IoT, Google Cloud IoT Core.
-
On-Premise/Edge: ThingsBoard (open-source), Cisco Kinetic, PTC ThingWorx.
-
Key Features: Device connectivity & management, data ingestion, rules engine, analytics, visualization, security.
7. Security and Privacy in IoT
7.1 Why Security is Required in IoT?
-
Expanded Attack Surface: Billions of devices, often poorly secured.
-
Critical Impact: Compromise can lead to physical harm (medical devices, industrial control), privacy breaches, DDoS attacks (Mirai botnet).
-
Heterogeneity: Diverse devices/OS make uniform security hard.
-
Resource Constraints: Limited CPU/memory hinder strong crypto.
7.2 Security Models in IoT
-
Three-Layer Model: Device security (secure boot, TPM), Network security (firewalls, IDS, encryption), Cloud/Application security (auth, access control).
-
Zero Trust Model: "Never trust, always verify." Every request authenticated/authorized.
-
End-to-End Security: Security from sensor to cloud (e.g., DTLS for CoAP, TLS for MQTT).
-
Security by Design: Security integrated from the start, not bolted on.
7.3 Vulnerabilities Observed in IoT Systems
-
Weak/Default Passwords: Hardcoded credentials.
-
Insecure Network Services: Open ports, unnecessary services.
-
Lack of Secure Update Mechanism: No OTA or unsigned updates.
-
Insecure Data Transfer: No encryption (plaintext้ไฟก).
-
Insecure Interfaces: Web/mobile app vulnerabilities (XSS, CSRF).
-
Privacy Insufficiencies: Excessive data collection, no user consent.
7.4 Attacks on IoT Systems (Focus: Application/Service Layer)
| Attack | Target | Description |
|---|---|---|
| DDoS (Distributed Denial of Service) | Cloud service, network | Botnet (e.g., Mirai) floods target with traffic. |
| Man-in-the-Middle (MitM) | Data in transit | Intercepts/alters communication (e.g., between device and cloud). |
| Replay Attack | Authentication | Captures valid message and replays it later. |
| Injection Attacks | Application layer | SQLi, command injection via device APIs. |
| Cross-Site Scripting (XSS) | Web dashboard | Injects malicious scripts into IoT web interface. |
| Firmware Reverse Engineering | Device firmware | Extracts secrets, finds vulnerabilities. |
7.5 Security and Privacy Issues in IoT
-
Security Issues: Authentication, authorization, confidentiality, integrity, availability.
-
Privacy Issues:
-
Data Collection: What data is collected? (location, habits)
-
User Consent: Is user informed and agreeing?
-
Data Sharing: With third parties? Anonymized?
-
Regulatory Compliance: GDPR, CCPA.
-
-
Mitigation: Encryption, anonymization, privacy policies, data minimization, user controls.
8. Applications and Case Studies
8.1 Smart Home Automation (Design with Raspberry Pi)
Components:
-
Controller: Raspberry Pi 3/4 (runs Linux, Node-RED/Python).
-
Sensors: DHT22 (temp/humidity), PIR (motion), MQ-2 (gas).
-
Actuators: Relay module (control lights/fans), servo motor (door lock).
-
Communication: Wi-Fi (Pi to router), MQTT (Pi to cloud).
-
Cloud: AWS IoT Core (device shadow, rules).
-
Application: Mobile app (React Native) or web dashboard (Grafana).
Workflow:
-
Sensors read data โ Pi via GPIO/I2C.
-
Pi publishes to MQTT topic
home/sensor/dht22. -
Cloud stores data, triggers rules (e.g., if temp > 30ยฐC โ publish to
home/actuator/fanON). -
Pi subscribes to actuator topics, drives relays.
8.2 Other IoT Application Domains
-
Industrial IoT (IIoT): Predictive maintenance, asset tracking, process optimization.
-
Healthcare IoT: Remote patient monitoring, smart pills, wearable ECG.
-
Smart Agriculture: Soil moisture monitoring, automated irrigation, livestock tracking.
-
Smart Cities: Traffic management, waste management, smart lighting.
-
Retail: Inventory management, personalized offers, smart shelves.
8.3 Case Studies of IoT Implementations
Example: Difficult Cloud IoT Integration & Solution
-
Problem: Legacy industrial PLCs (Modbus RTU) need cloud integration. PLCs use serial RS-485, no IP stack. Cloud platform (AWS IoT) requires MQTT over TLS.
-
Challenges: Protocol conversion, security (TLS handshake from constrained device), data format mapping.
-
Solution:
-
Use IoT Gateway (Raspberry Pi + USB-to-RS485 adapter) running Node-RED.
-
Gateway reads Modbus data, converts to JSON.
-
Gateway uses MQTT with TLS to publish to AWS IoT Core.
-
Implement certificate-based auth on gateway (device certificate).
-
Use AWS Greengrass for local lambda functions if cloud latency is issue.
-
-
Outcome: Seamless integration, secure data flow, legacy systems modernized.
9. Advanced Topics and Integration Challenges
9.1 Issues in IoT LAN Development and Implementation
-
Interference: Wi-Fi, Bluetooth, ZigBee all in 2.4 GHz โ coexistence problems.
-
Scalability: Number of devices per access point (Wi-Fi ~30-50, ZigBee ~65k).
-
Coverage: Dead zones, need for mesh/repeaters.
-
Power Management: Battery life vs. reporting frequency.
-
Security: WPA2/WPA3 for Wi-Fi, but many IoT devices use weak encryption.
-
Management: Provisioning, troubleshooting hundreds of devices.
9.2 Cloud IoT Integration Challenges and Solutions
| Challenge | Solution |
|---|---|
| Protocol Mismatch | Use gateways/protocol converters (e.g., Modbus โ MQTT). |
| Security Gaps | End-to-end encryption (TLS/DTLS), mutual authentication, VPC peering. |
| Data Volume & Cost | Edge filtering, compression, selective data transmission. |
| Latency | Edge computing (AWS Greengrass, Azure IoT Edge). |
| Vendor Lock-in | Use open standards (MQTT, CoAP), multi-cloud strategies. |
| Scalability | Serverless backends (AWS Lambda), auto-scaling groups. |
9.3 Software Defined Networking (SDN) for IoT
-
Definition: Separates control plane (centralized controller) from data plane (switches/routers). Enables programmatic network management.
-
Benefits for IoT:
-
Dynamic Traffic Management: Prioritize critical IoT traffic (e.g., medical data).
-
Security: Centralized firewall rules, anomaly detection.
-
Mobility: Handles device roaming seamlessly.
-
Resource Allocation: QoS for different IoT applications.
-
-
Maturity of SDN for IoT: Emerging but not fully mature. Challenges:
-
Scalability: Controllers may become bottleneck for millions of IoT devices.
-
Security: Centralized controller is high-value target.
-
Standardization: Lack of IoT-specific southbound APIs (OpenFlow is generic).
-
Resource Constraints: IoT devices cannot run SDN agents; need lightweight protocols (e.g., POF, ForCES).
-
Use Cases: Mostly in enterprise/campus IoT (smart building networks), not widespread in massive public IoT.
-
[!TIP] Exam Answer: SDN for IoT is promising for network management and security but faces scalability and standardization hurdles; currently more common in controlled environments (factories, campuses) than public deployments.
END OF UNIT 1 NOTES
Aligned with RGPV past papers (2022-2025). Focus on definitions, comparisons, diagrams, and protocol details.