Unit 2: Introduction to IoT
I. Orientation — The IoT Concept
The Internet of Things (IoT) is a system of physical objects equipped with sensing, processing, communication, and actuation capabilities. These objects exchange data through local networks or the Internet so that physical conditions can be monitored, analyzed, and controlled with limited human intervention.
- Things: Devices such as temperature sensors, smart meters, vehicles, cameras, medical monitors, and industrial machines.
- Identity: Each relevant device or resource must be distinguishable through identifiers such as a MAC address, IPv6 address, URI, or application-level device ID.
- Connectivity: Devices communicate through technologies including Ethernet, Wi-Fi, Bluetooth Low Energy, IEEE 802.15.4, cellular networks, and LPWAN.
- Sensing and actuation: Sensors convert physical quantities into data; actuators convert control commands into physical actions.
- Intelligence: Edge or cloud software filters data, detects patterns, makes decisions, and initiates actions.
- Constraints: Many IoT nodes have limited energy, memory, processing power, bandwidth, and frame size.
- Interoperability: Useful IoT systems require heterogeneous devices, networks, protocols, and data models to work together.
- Security: Authentication, confidentiality, integrity, authorization, secure updates, and privacy must cover the complete device lifecycle.
II. IoT Foundations and Organization
A. Understanding Internet of Things fundamentals
IoT fundamentals explain how identifiable physical objects become participants in digital information and control systems.
- Basic operation: A sensor measures a property, a processor interprets or packages the reading, and a network interface transmits it.
- A thermostat may measure
24.5 °C, compare it with a22 °Csetpoint, and command an air conditioner.
- A thermostat may measure
- Telemetry: Devices periodically or eventfully report measurements such as temperature, location, voltage, vibration, or occupancy.
- Commands: Applications send instructions such as opening a valve, changing motor speed, or switching a lamp off.
- Device-to-device communication: Nearby devices exchange data directly, as when a motion sensor activates a light.
- Device-to-cloud communication: A device connects to an Internet service for storage, analytics, visualization, or remote control.
- Gateway communication: Constrained devices communicate through a gateway that performs aggregation, protocol translation, or security enforcement.
- Closed-loop control: Measurements influence automatic actions through a feedback cycle:
Physical process -> Sensor -> Controller -> Actuator -> Physical process- IoT versus traditional Internet: IoT traffic often consists of small, frequent machine-generated messages rather than large human-requested documents.
B. Internet of Things architecture and protocols
IoT architecture divides the system into cooperating layers so that sensing, communication, processing, and business functions can evolve independently.
- Perception layer: Sensors, RFID readers, cameras, and actuators interact with the physical environment.
- Network layer: IPv6, 6LoWPAN, routing protocols, gateways, and access networks transfer data between endpoints.
- Processing or middleware layer: Message brokers, databases, device registries, rules engines, and analytics platforms manage information.
- Application layer: Domain software provides functions such as patient monitoring, fleet tracking, or energy management.
- Business layer: Policies, workflows, billing, governance, and performance indicators convert technical output into organizational value.
- Protocol selection: The choice depends on payload size, latency, reliability, range, power consumption, topology, and security requirements.
- End-to-end path: A typical stack is
IEEE 802.15.4 -> 6LoWPAN -> IPv6 -> UDP -> CoAP, while a Wi-Fi device may useIP -> TCP -> MQTT.
III. Internet Protocol Layers
A. Network layer
The network layer provides logical addressing, packet forwarding, and routing between devices located on different links.
- IPv6: Its
128-bitaddress space can uniquely address very large device populations and supports stateless address autoconfiguration. - Packet forwarding: Routers examine an IPv6 destination address and select the next hop toward the destination network.
- RPL: The Routing Protocol for Low-Power and Lossy Networks organizes constrained nodes into a Destination-Oriented Directed Acyclic Graph.
- Nodes commonly select parents using metrics such as hop count, latency, or expected transmission count.
- ICMPv6: It reports network errors and supports functions such as Neighbor Discovery, although constrained networks may optimize standard discovery procedures.
- Lossy-link issue: Wireless interference, weak signals, sleeping nodes, and battery limitations make IoT routes less stable than conventional wired routes.
- Address versus identity: An IP address identifies a network attachment point; an application device ID may remain constant when the address changes.
B. Transport layer
The transport layer provides process-to-process delivery using port numbers and determines how reliability, ordering, and congestion are handled.
-
TCP: Connection-oriented and reliable.
- TCP acknowledges data, retransmits losses, preserves byte order, and applies flow and congestion control.
- MQTT commonly uses TCP; TLS can protect the connection.
- Handshakes, connection state, and retransmissions impose costs on constrained nodes.
-
UDP: Connectionless and lightweight.
- UDP sends independent datagrams without guaranteeing delivery, ordering, or duplicate suppression.
- CoAP commonly uses UDP and implements only the application-level reliability it requires.
- DTLS can protect UDP traffic, while OSCORE can protect CoAP messages end to end.
- Port addressing: A socket endpoint combines an IP address with a
16-bittransport port, allowing several applications to share one device. - Selection rule: TCP suits reliable streams; UDP suits short exchanges, multicast, and latency-sensitive constrained communication.
C. Application layer
The application layer defines message formats, resource operations, service discovery, and communication patterns visible to IoT software.
- MQTT: A lightweight publish-subscribe protocol in which clients exchange messages through a broker.
- Publishers send to topics such as
factory/motor7/vibration; subscribers receive matching topic messages. - Quality of Service levels are
0for at most once,1for at least once, and2for exactly once delivery.
- Publishers send to topics such as
- CoAP: A REST-oriented protocol for constrained devices, with methods resembling HTTP:
GET,POST,PUT, andDELETE.- Confirmable messages support retransmission; observation allows a client to receive resource updates.
- HTTP/HTTPS: Widely interoperable but generally carries more header and connection overhead than CoAP.
- AMQP: Supports reliable messaging, queues, routing, and enterprise integration, usually on less constrained systems.
- Data representation: JSON is readable but verbose; CBOR provides a compact binary representation for small IoT messages.
- Security boundary: Application authorization must decide whether an authenticated device may read a resource, publish a topic, or execute an actuator command.
IV. IoT Ecosystems and Operation
A. Various platforms for Internet of Things
An IoT platform supplies reusable services for connecting, managing, storing, and analyzing device data.
- Cloud platforms: Services such as AWS IoT Core, Microsoft Azure IoT, and open-source ThingsBoard provide device registries, messaging, rules, dashboards, and integrations.
- Device management: Platforms support provisioning, configuration, health monitoring, credential rotation, and over-the-air firmware updates.
- Data services: Time-series storage records timestamped values such as
motor_speed = 1450 rpm. - Rules and analytics: A rule may generate an alert when bearing temperature exceeds
80 °Cfor five consecutive readings. - Edge platforms: Local gateways run filtering or inference near devices, reducing latency, bandwidth use, and cloud dependence.
- Selection factors: Protocol support, scalability, pricing, data ownership, offline operation, security controls, and vendor lock-in must be assessed.
B. Real-time examples of Internet of Things
Real-time IoT applications continuously convert current physical events into timely information or control actions.
- Smart home: Occupancy, lighting, locks, smoke detectors, and energy meters coordinate through a home hub or cloud application.
- Healthcare: Wearable sensors report heart rate or blood oxygen levels, while alerts identify measurements outside clinical thresholds.
- Industrial IoT: Vibration and temperature sensors support predictive maintenance by detecting changes before equipment failure.
- Smart agriculture: Soil-moisture data controls irrigation valves, conserving water while maintaining crop conditions.
- Transportation: GPS-equipped vehicles transmit position and speed for route optimization, maintenance scheduling, and arrival prediction.
- Smart city: Connected parking spaces, streetlights, waste bins, and air-quality sensors improve municipal resource allocation.
- Timing requirement: “Real time” is application-specific; collision avoidance may require milliseconds, while irrigation can tolerate seconds or minutes.
C. Overview of Internet of Things components and communication technologies
An IoT solution combines hardware, embedded software, networking, services, and user-facing applications.
- Sensors: Measure physical quantities; examples include thermistors, accelerometers, gas sensors, and photodiodes.
- Actuators: Produce physical effects through relays, motors, pumps, heaters, locks, or valves.
- Controllers: Microcontrollers such as ESP32-class devices execute firmware with limited RAM, flash storage, and energy.
- Gateways: Aggregate traffic, translate protocols, cache data, and connect local networks to IP or cloud services.
- Short-range technologies: Wi-Fi offers high throughput; BLE emphasizes low energy; IEEE 802.15.4 supports low-rate mesh networking.
- Long-range technologies: LoRaWAN supports low-data-rate wide-area links; NB-IoT and LTE-M use licensed cellular infrastructure.
- Technology trade-off: No radio simultaneously maximizes range, throughput, battery life, and low cost; design balances these variables.
V. Constraints and Specialized Protocols
A. Challenges in Internet of Things
IoT challenges arise from constrained hardware, physical exposure, large deployments, and dependence on heterogeneous infrastructure.
- Security: Default passwords, exposed interfaces, insecure firmware, and weak key storage can permit unauthorized control.
- Privacy: Location, health, audio, and occupancy data may reveal personal behavior; collection and retention should be minimized.
- Scalability: Thousands of devices require automated provisioning, addressing, monitoring, and certificate renewal.
- Interoperability: Different vendors may use incompatible radios, message formats, topic structures, and semantic models.
- Energy consumption: Radio transmission is expensive for batteries, so nodes use sleep schedules, batching, and low-power links.
- Reliability: Packet loss, gateway failure, intermittent connectivity, and sensor drift require retries, buffering, redundancy, and calibration.
- Lifecycle management: Devices may remain deployed for years and need authenticated updates, rollback protection, and secure retirement.
- Safety: Compromise of a medical pump or industrial actuator can produce physical harm, making fail-safe behavior essential.
B. 6LoWPAN adaptation layer
The IPv6 over Low-Power Wireless Personal Area Networks adaptation layer enables IPv6 communication over constrained links, especially IEEE 802.15.4.
- Placement: It operates between the link layer and IPv6, adapting large IPv6 packets to small link-layer frames.
- Header compression: LOWPAN_IPHC removes or compresses predictable IPv6 fields, including common prefixes and derivable interface identifiers.
- Fragmentation: IPv6 requires links to support a
1280-byteminimum MTU, while IEEE 802.15.4 frames are at most127 bytes; 6LoWPAN fragments and reassembles packets. - Mesh support: Mesh-under forwarding can deliver frames across multiple link-layer hops, while route-over designs route IPv6 packets at each hop.
- Dispatch values: Compact dispatch fields identify whether a frame contains compressed IPv6, fragmentation information, or other adaptation headers.
- Benefit: Existing IP applications can address low-power nodes without requiring a non-IP protocol island.
- Limitation: Fragment loss can force an entire IPv6 packet to be retransmitted, consuming scarce bandwidth and energy.
C. CoSIP protocol and its specification
CoSIP, or Constrained Session Initiation Protocol, adapts session-control concepts associated with SIP to constrained IoT environments.
- Purpose: It supports establishing, modifying, and terminating communication sessions involving resource-limited devices.
- Session model: Signaling negotiates participants and session parameters separately from the application data exchanged during the session.
- Constrained design: Compact encoding and reduced signaling are intended to lower message size, memory use, processing cost, and wireless transmissions.
- Relationship to SIP: CoSIP retains the request-response idea and session-management semantics of SIP while avoiding assumptions suited mainly to powerful Internet endpoints.
- Typical exchange: An initiating endpoint sends a session request, the destination returns a status response, and successful negotiation establishes state for subsequent communication.
- Specification status: CoSIP is described in research and Internet-Draft work rather than being a widely deployed Internet Standards Track protocol comparable to IPv6, UDP, or CoAP.
- Use case: A constrained sensor and controller may negotiate a temporary media or data session without carrying the full textual overhead of conventional SIP.
- **# Unit 2: Introduction to IoT
I. Orientation: The Internet of Things
A. Understanding Internet of Things fundamentals
The Internet of Things (IoT) is a system in which physical objects equipped with sensing, processing, communication, and actuation capabilities exchange data through networks with limited or no direct human intervention.
- Things: Physical entities such as temperature sensors, smart meters, vehicles, medical wearables, and industrial machines are given digital identities.
- Sensing: Sensors convert physical quantities into data; for example, a digital temperature sensor may report
27.5 °C. - Actuation: Actuators convert commands into physical action, such as opening a valve or changing a motor's speed.
- Connectivity: Devices communicate through technologies such as Ethernet, Wi-Fi, Bluetooth Low Energy, IEEE 802.15.4, cellular networks, and LoRaWAN.
- Intelligence: Edge or cloud software filters data, detects patterns, makes decisions, and triggers actions.
- Identity: IPv6 addresses, device IDs, RFID tags, or cryptographic credentials distinguish devices and resources.
- Constraints: Many IoT nodes have limited memory, processing power, battery capacity, and link bandwidth.
- Feedback loop:
- A sensor observes the environment.
- A processor interprets the observation.
- The network transfers data or commands.
- An actuator changes the environment.
II. IoT System Design
A. Internet of Things architecture and protocols
IoT architecture organizes devices, communication services, data processing, and applications into interoperable layers.
- Perception layer: Sensors, RFID readers, cameras, and actuators interact directly with physical objects.
- Network layer: Gateways, routers, and Internet protocols transfer observations and control messages.
- Processing layer: Edge and cloud platforms provide storage, stream processing, device management, and analytics.
- Application layer: Software converts processed data into services such as smart irrigation or patient monitoring.
- Business layer: Policies, dashboards, billing, compliance, and operational decisions govern the complete service.
- Protocol stack:
- Link: Ethernet, Wi-Fi, BLE, IEEE 802.15.4.
- Adaptation: 6LoWPAN.
- Network: IPv6, IPv4, RPL.
- Transport: UDP, TCP, and QUIC.
- Application: CoAP, MQTT, HTTP, AMQP, and CoSIP.
- Interoperability principle: Standard interfaces allow a sensor from one vendor to communicate with an application from another vendor.
B. Overview of Internet of Things components and communication technologies
An IoT system combines physical hardware, embedded software, networking, and service infrastructure.
- Sensors: Measure temperature, humidity, pressure, acceleration, light, location, or chemical concentration.
- Actuators: Relays, motors, pumps, heaters, and electronic locks execute control decisions.
- Controllers: Microcontrollers such as the ESP32 execute firmware and interface with sensors through GPIO, I²C, SPI, or UART.
- Gateways: Translate protocols, aggregate data, enforce security, and connect local device networks to IP networks.
- Cloud or edge services: Store telemetry, run analytics, maintain device registries, and distribute firmware updates.
- Short-range technologies:
- BLE emphasizes low power and typically supports personal-area applications.
- Zigbee and Thread use IEEE 802.15.4 and can form low-power mesh networks.
- Wi-Fi provides higher throughput but commonly consumes more energy.
- Long-range technologies:
- LoRaWAN supports low-data-rate communication over kilometre-scale distances.
- NB-IoT and LTE-M use licensed cellular infrastructure.
- 4G and 5G support mobile or higher-bandwidth devices.
- Selection criteria: Range, throughput in
bit/s, latency in milliseconds, energy use, topology, cost, and operating environment determine the appropriate technology.
C. Challenges in Internet of Things
IoT deployment is difficult because large numbers of heterogeneous, constrained, and physically exposed devices must remain dependable for long periods.
- Security: Weak passwords, insecure firmware, exposed APIs, and unencrypted traffic can enable unauthorized control.
- Privacy: Location, health, and household data can reveal sensitive behaviour even when individual readings appear harmless.
- Interoperability: Different data models, radio technologies, and proprietary interfaces complicate integration.
- Scalability: A platform may need to authenticate, monitor, and update millions of devices concurrently.
- Resource constraints: An IEEE 802.15.4 frame has a maximum size of
127 bytes, leaving little space after headers and security fields. - Reliability: Wireless interference, packet loss, device failure, and intermittent connectivity require retries and fault-tolerant operation.
- Energy management: Battery-powered nodes use sleep schedules, low-power radios, and infrequent transmissions to extend lifetime.
- Lifecycle management: Secure provisioning, configuration, key rotation, diagnostics, and signed over-the-air updates are needed from installation to disposal.
- Safety: Failures in medical, automotive, or industrial IoT can cause physical harm, so control systems require fail-safe states.
III. Internet Protocol Stack for IoT
A. Network layer
The network layer provides logical addressing and routes packets between IoT nodes located on different links.
- Internet Protocol: IPv4 uses
32-bitaddresses, while IPv6 uses128-bitaddresses and better accommodates very large device populations. - Packet delivery: Routers examine the destination IP address and select a next hop; IP itself provides best-effort delivery without guaranteeing arrival.
- IPv6 functions: Neighbor Discovery supports address resolution and router discovery, while ICMPv6 carries errors and control information.
- RPL routing: The IPv6 Routing Protocol for Low-Power and Lossy Networks builds a destination-oriented directed acyclic graph, commonly rooted at an IoT gateway.
- Routing metrics: Hop count, link quality, latency, and expected transmission count can influence route selection.
- IoT requirement: Protocol overhead must remain small because constrained links offer short frames, low bandwidth, and variable reliability.
B. Transport layer
The transport layer provides process-to-process communication through port numbers and may add reliability, ordering, congestion control, or security.
-
UDP: UDP has an
8-byteheader and sends independent datagrams without connection establishment, delivery guarantees, or ordering.- It suits short sensor messages and protocols such as CoAP.
- Reliability, when required, is implemented by the application protocol.
-
TCP: TCP establishes a connection and provides ordered, reliable byte-stream delivery using acknowledgements and retransmissions.
- MQTT and HTTP commonly operate over TCP.
- Connection state and retransmission overhead can burden constrained devices.
- Transport security: TLS protects TCP applications, while DTLS provides similar authentication, integrity, and confidentiality for UDP datagrams.
- Port identification: A communication endpoint is identified by an IP address and transport-layer port, such as an MQTT broker listening on TCP port
1883.
C. Application layer
The application layer defines message formats and interaction models through which IoT devices expose data and services.
- CoAP: The Constrained Application Protocol uses a REST model with methods such as
GET,POST,PUT, andDELETE, usually over UDP. - MQTT: A broker-based publish/subscribe protocol distributes messages through hierarchical topics such as
factory/line1/temperature. - HTTP: A widely supported request-response protocol suited to web integration, although its textual headers may be expensive for constrained links.
- AMQP: Provides brokered messaging with queues and routing features, commonly for enterprise back-end integration.
- Communication models:
- Request-response: A client requests a resource and waits for a response.
- Publish-subscribe: Producers and consumers communicate indirectly through a broker.
- Observe or streaming: Updates are delivered when a resource changes.
- Payload formats: JSON is human-readable; CBOR offers compact binary representation suitable for constrained messages.
IV. IoT Platforms and Deployments
A. Various platforms for Internet of Things
IoT platforms provide reusable services for connecting devices, processing telemetry, managing fleets, and building applications.
- Cloud platforms: AWS IoT Core, Azure IoT Hub, and similar services provide device registries, message ingestion, policy enforcement, and integration with storage or analytics.
- Open platforms: ThingsBoard supports dashboards, rule processing, telemetry, and device management in cloud or self-hosted deployments.
- Development platforms: Arduino and ESP-IDF support firmware development, sensor interfacing, and communication on embedded boards.
- Edge platforms: EdgeX Foundry and gateway software process data near devices, reducing latency and dependence on cloud connectivity.
- Selection factors: Protocol support, security, scalability, pricing, data ownership, analytics, integration APIs, and vendor lock-in affect platform choice.
B. Real-time examples of Internet of Things
Real-time IoT systems continuously observe events and respond within application-specific timing limits.
- Smart homes: Motion and light sensors trigger lighting, while mobile applications monitor locks, energy use, and alarms.
- Healthcare: Wearable devices send heart rate or blood oxygen readings so abnormal values can generate timely alerts.
- Agriculture: Soil-moisture sensors control irrigation valves, reducing water use while maintaining crop conditions.
- Industry: Vibration and temperature sensors detect equipment degradation before a motor or bearing fails.
- Smart cities: Connected parking sensors, streetlights, waste bins, and air-quality monitors support municipal operations.
- Logistics: GPS and temperature sensors track vehicle position and cold-chain conditions for food or medicines.
- Timing distinction: A factory shutdown may require millisecond-scale action, whereas a soil reading transmitted every
30 minutescan tolerate greater delay.
V. Adaptation for Constrained IPv6 Networks
A. 6LoWPAN adaptation layer
The IPv6 over Low-Power Wireless Personal Area Networks adaptation layer enables IPv6 communication over links such as IEEE 802.15.4.
- Placement: 6LoWPAN operates between the data-link layer and IPv6, adapting large IPv6 packets to constrained frames.
- Header compression: It compresses predictable IPv6 and UDP fields; this reduces the impact of the normal
40-byteIPv6 header. - Fragmentation: IPv6 requires links to support an MTU of at least
1280 bytes, while IEEE 802.15.4 frames are limited to127 bytes, so packets may be divided into fragments. - Reassembly: The receiving endpoint uses datagram size, tag, and fragment offset information to reconstruct the original IPv6 packet.
- Mesh support: Mesh addressing can assist forwarding across multiple link-layer hops, although route-over designs perform routing at the IP layer.
- Benefit: Standard IPv6 addressing allows constrained nodes to participate in end-to-end Internet communication through a border router.
- Limitation: Fragment loss can force the entire IPv6 packet to be retransmitted, increasing energy use and delay.
VI. Constrained Session Control
A. CoSIP protocol and its specification
CoSIP, or Constrained Session Initiation Protocol, adapts session-establishment concepts associated with SIP to constrained IoT devices and low-power networks.
- Purpose: CoSIP coordinates communication sessions, including discovering participants, negotiating parameters, modifying a session, and terminating it.
- Constrained design: Compact representations and reduced signalling are intended to consume less bandwidth, memory, and energy than conventional text-heavy SIP exchanges.
- Roles: A constrained endpoint may act as a client or server, while proxies or gateways can connect constrained networks with conventional SIP infrastructure.
- Session operations: A specification must define request methods, responses, endpoint identifiers, message fields, transaction behaviour, retransmission, and timeout rules.
- Description data: Session parameters can identify media or sensor-data formats, endpoint addresses, transport choices, and communication capabilities.
- Reliability: When deployed over an unreliable datagram transport, acknowledgement, duplicate detection, message identifiers, and retransmission timers are required.
- Security: Endpoint authentication, message integrity, replay protection, authorization, and confidentiality must protect session control.
- Protocol status: CoSIP is a specialized constrained-environment approach rather than a universally deployed IoT application standard; compatibility depends on the particular specification and gateway implementation.
- Use case: A constrained alarm device can establish a temporary communication session with a monitoring service, negotiate supported data parameters, transmit event information, and explicitly close the session.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill. The rest comes out of a student's own pocket: the domain, the storage, and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason. to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it. What it pays for →