Block diagram of IoT Device Contd… IoT device consists of Interfaces • I/O interfaces for sensors and actuators • Internet Connection • Memory and storage • Audio/video Contd… • IoT device gather data from sensors and distribute to cloud based servers or other devices. • IoT devices connected with actuators to interact with the physical objects. • IoT devices may be of type Wearable sensors, Smart watches, In-Vehicle sensors and sensors in industries. OSI Reference Model IoT Protocols Link Layer Physical layer or medium IEEE 802.3(i/j/ae) – coaxial cable, Copper- twisted pair, fiber optic and fiber (10Mb/s – 40Gb/s). IEEE 802.11(a/b/g/n/ac/ad) – WLAN (5Ghz,2.4Ghz,2.4Ghz – 5Ghz,5Ghz,60Ghz) with 1Mb/s – 6.75 Gb/s. IEEE 802.16 – Wireless broadband standards with 1.5Mb/s – 1Gb/s. 802.16m with 100Mb/s(mobile station) and 1Gb/s(fixed stations). Contd… IEEE 802.15.4 – Low Rate Wireless Personal Area Network, high level communication protocol with 40Kb/s – 250Kb/s. Low cost and Low speed, power constrained. 2G/3G/4G – Mobile communication, GSM&CDMA, UMTS&CDMA2000, 4G-LTE with 9.6Kb/s - 100Mb/s. Network generations Network Layer(Internet Layer) • IP datagrams from source network to destination network • Host addressing and Packet routing • Datagram with source and destination addresses – route across multiple networks • Hierarchical IP addressing Schemes - IPv4, IPv6 and 6LoWPAN Contd… IPv4 – IP for identifying devices on a network , do not guarantee packet delivery (handled by TCP) with 32 bit address scheme. IPv6 – 128 bit address scheme 6LoWPAN – IPv6 over Low power WPAN for low-powered devices in 2.4Ghz frequency range with 250Kb/s and works with 802.15.4 link layer protocol. Transport Layer • End-End message with or without handshake approach(TCP/UDP). • Functions - error control, segmentation, flow and congestion control TCP ₋ Web browsers with HTTP and HTTPS , email programs with SMTP and File transfer with FTP. ₋ Connection-oriented, stateful protocol ₋ Send packets, ensure reliable transmission ₋ Error detection and retransmission of lost packets ₋ Flow control and congestion control Contd… UDP ₋ Transaction oriented, stateless protocol ₋ require initial setup procedure ₋ Small data units exchange ₋ No guaranteed packet delivery ₋ No ordering of messages ₋ No duplicate elimination Application Layer • Interface with lower layer protocol – data over the network • Data encoded – application layer protocol and encapsulated – transport layer protocol • Transaction oriented communication • Port numbers – application addressing to provide process-process connections. HTTP HTTP – Hyper Text Transfer Protocol(WWW) Commands -> GET, PUT, POST,DELETE, HEAD, TRACE, OPTIONS Stateless Protocol with request – response model HTTP client - Browser or application on IoT device or mobile app Uses URI - HTTP resources Request and status lines Methods Status codes Contd… Pros and Cons Pros Platform Independent Not connection oriented hence Less Overhead Stateless protocol Less resources is required since the connections are closed once the data transfer is completed Cons No reliable exchange of data Too complicated and too much overhead even for less payload Only point to point Communication CoAP CoAP – Constrained Application Protocol Web transfer protocol with request-response model M2M applications - constrained devices and network Client-server architecture , interface with HTTP and supports same commands of HTTP Contd… • Runs on top of UDP instead of TCP • Uses client server architecture where client communicate with servers using connectionless datagrams • Supports methods such as • GET, PUT, POST and DELETE Contd… WebSocket WebSocket – Full-duplex communication protocol – single socket connection TCP based - messages between client and server Allows stream of messages to be sent back and forth between client and server The client can be a Browser Mobile Applications IoT device MQTT MQTT – Message Queue Telemetry Transport Light weight messaging protocol - publish- subscribe model Client – server architecture IoT device(Client) connects MQTT broker(Server) Constrained environments with limited processing and memory resources, low network bandwidth. Pros and Cons Pros Less Overhead Multiple QoS types for Reliable exchange of data Provides secured communication with SSL Mutual authentication Requires Less bandwidth Cons Connection oriented – The MQTT brokers requires more resources than the HTTP servers XMPP
XMPP – Extensible Messaging and Presence
Model Decentralized protocol with client-server and server-server Real time communication with XML data between IoT devices(small units) Applications - Messaging , presence syndication, gaming, voice-video calls and chat DDS DDS – Data Distribution Service Data centric middleware with device-device Publish-subscribe model gather & distribute data - receive generated data Publisher is an object responsible for data distribution ( Generation) - Creates topic Subscriber responsible for receiving published data - Subscribes to topic Provides QoS control with configurable reliability AMQP AMQP – Advanced Message Queuing Protocol Open application protocol for business messaging Point-point, publish-subscribe model, routing and queuing Receive messages and route them connections Publish messages – exchange – distribute messages to queues Messages delivered – consumers -> pull messages from queues