IoT Protocols • Application-LayerProtocols: • MQTT: Broker-based publish-subscribe (TCP). Unlimited data rate assumes underlying transport (e.g., Wi-Fi). • CoAP: UDP-based, supports multicast. 10x smaller header than HTTP. • HTTP: Stateless, not optimized for IoT but widely supported. • Network-Layer Protocols: • LoRaWAN: Max payload drops to 51 bytes with ADR enabled. • NB-IoT: Supports 50,000 devices per cell tower. • BLE: Data rate drops to 125 Kbit/s at max range (long-range mode). • Security: • DTLS (CoAP) vs TLS (MQTT): DTLS is lighter but lacks session resumption. • AES-128: Standard for LPWANs (LoRaWAN/Zigbee).
11.
Application Layer • Applicationlayer is the topmost layer in IoT architecture, responsible for data formatting, communication rules, and user-facing functionalities. It enables devices and cloud platforms to exchange meaningful information • What it does: • Standardizes how data is structured (e.g., JSON, XML). • Defines communication patterns (request-response, publish-subscribe). • Manages authentication and encryption for secure data transfer. • Why it matters: • Ensures interoperability between devices and cloud platforms. • Optimizes for low power (critical for battery-operated IoT devices).
12.
Protocol Communication Model Transport Power UseSecurity Best For MQTT Publish-Subscribe TCP Low TLS/SSL Cloud messaging, remote monitoring CoAP Request-Response UDP Very Low DTLS Constrained devices (sensors) HTTP/1.1 Request-Response TCP High TLS/SSL Web APIs, legacy systems AMQP Message Queuing TCP Medium SASL/TLS Enterprise IoT (banking, healthcare) LwM2M Device Management CoAP/UDP Ultra-Low DTLS Firmware updates, telemetry
13.
Deep Dive AboutMQTT & CoAP • MQTT (Message Queuing Telemetry Transport) • Developed by: IBM (1999), standardized by OASIS (2014) • CoAP (Constrained Application Protocol) • Developed by: IETF (2014) for low-power devices. • MQTT in Tesla's IoT Ecosystem • Tesla vehicles act as IoT edge devices, constantly streaming telemetry data to Tesla's cloud platform (Tesla Fleet Telemetry). MQTT is used due to its: • Low bandwidth usage (critical for cellular networks). • Publish-Subscribe model (efficient for one-to-many communication). • QoS support (ensures critical data like battery status is never lost).
14.
MQTT • MQTT brokeris a server that acts as a central messaging hub in IoT systems, enabling bidirectional communication between devices (clients) using the publish-subscribe (Pub-Sub) model. It routes messages between senders (publishers) and receivers (subscribers) based on topics, ensuring efficient and scalable data exchange • Devices Connect to the broker (e.g., via TCP/IP or WebSocket). -> Publishers send messages to topics (e.g., car/battery) -> Subscribers receive messages if they’re subscribed to matching topics. -> Broker Filters messages and forwards them to the right clients. Type Example Brokers Use Case Cloud-Based AWS IoT Core, Azure IoT Hub Large-scale IoT deployments Self-Hosted Mosquitto, EMQX, HiveMQ Private IoT networks (on- premises) Lightweight VerneMQ, NanoMQ Edge computing (Raspberry Pi)
Network Layer Protocols •The Network Layer (Layer 3 in the OSI model) is responsible for routing data packets across different networks, ensuring devices can communicate even if they’re not directly connected. In IoT, it handles tasks like addressing, fragmentation, and logical routing. • Key Functions of the Network Layer • Logical Addressing: Uses IP addresses (e.g., IPv4/IPv6) to identify devices globally. • Routing: Determines the best path for data (e.g., via routers in a smart city network). • Fragmentation: Breaks large packets into smaller ones for transmission (e.g., over LoRaWAN). • Error Handling: Detects and manages packet loss/corruption (critical for industrial IoT).