Top Banner
Internet of Things
50

Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

Apr 15, 2017

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

Internet of Things

Page 2: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

HELLO!I am BhavinI am here because I love technologyYou can find me at @BhvainIoT

IIT Madras - grad. May 2014: M.Tech (Dual Degree)Co-founder AviPulse - Jan 2014 - presentCo-founder Phaneron Inc. - Launching in Apr 2016

Page 3: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

Logistics

Takeoff Session (Protocols): Introduction to IoTProtocols: MQTT, CoAP, HTTPMQTT in depth: Headers, QoS, Topics, Persistence & WillConclusion: Comparison of protocols

Consolidation Session (Implementation): Hardware: Arduino, ESP8266 & NodeMCU, Raspberry Pi, UDOOSoftware: Brokers, APIs, FrameworksPractices: Cloud, Battery Life, Mobile Apps, SecuritFuture: Smart Cities, Mission 2020

Hands-on Session (Demo): The Participants will form groups and make a hands on “Minimal Viable Prototype” demo using lean principles and concepts learned in the above sessions

120 mins 10 mins 30 mins 60 mins 20 mins

120 mins 40 mins 40 mins 30 mins 10 mins

120 mins

Page 4: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

1. IntroductionLet’s start with the basics

Page 5: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

Big PictureWhat is IoT really?

Page 6: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

The Internet of Things (IoT) is the network of physical objects, devices, vehicles, buildings and other items which are embedded with electronics, software, sensors, and network connectivity, which enables these objects to collect and exchange data.[1] The Internet of Things allows objects to be sensed and controlled remotely across existing network infrastructure,[2] creating opportunities for more-direct integration between the physical world and computer-based systems, and resulting in improved efficiency, accuracy and economic benefit

"Things," in the IoT sense, can refer to a wide variety of devices such as heart monitoring implants, biochip transponders on farm animals, electric clams in coastal waters,[15] automobiles with built-in sensors, DNA analysis devices for environmental/food/pathogen monitoring[16] or field operation devices that assist firefighters in search and rescue operations.[17] These devices collect useful data with the help of various existing technologies and then autonomously flow the data between other devices

Source: Wikipedia

Page 7: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

→ Hardware agnostic→ Software agnostic→ Protocols matter !→ Concerns:

↠ Battery life, energy consumption↠ Connectivity vs Security↠ Processing Power & Memory

Ideal IoT solution

Page 8: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

2. ProtocolsHTTP, MQTT, CoAP

Page 9: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

OSI Model

Page 10: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

Bits & Frames - Wireshark

Page 11: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

Protocols in Transport Layer

Page 12: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

Protocols in Transport Layer

Page 13: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

TCP/IP and UDP

→ (Slightly more than) Transport Layer Protocols↠ TCP/UDP contain functions such as graceful close

that OSI assigns to Session Layer↠ They are closest to class 4 (TP4) of OSITCP: Reliability over Latency UDP: Latency over Reliability

Page 14: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

TCP

→ TCP provides reliable, ordered, and error-checked delivery of a stream of octets between applications running on hosts communicating over an IP network

→ The sequence (SEQ) of octets matters→ Receiver has to acknowledge (ACK) and

synchronize (SYN) the sequence with the transmitter

Page 15: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

TCP

Page 16: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

TCP

Page 17: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

UDP

→ With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol (IP) network without prior communications to set up special transmission channels or data paths

→ Un-sequenced data with no ACK or error handling

Page 18: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

UDP

Page 19: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

TCP→ Reliable→ Ordered→ Heavyweight→ Slow(er)→ Streaming→ Congestion Control→ Unicast (1 to 1)

TCP vs UDP

UDP→ Unreliable→ Unordered→ Lightweight→ Fast(er)→ Datagrams→ No Congestion Control→ Broadcast (1 to many)

Multicast (many to many)

Page 20: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

Protocol Stacks

→ HTTP: TCP like session on top of TCP

→ MQTT: UDP like session on top of TCP

→ CoAP: TCP like session on top of UDP (also, it has binary headers)

Page 21: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

This is a slide title

→ Here you have a list of items→ And some text→ But remember not to overload your slides

with content

You audience will listen to you or read the content, but won’t do both.

Page 22: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

HTTP

→ The Hypertext Transfer Protocol (HTTP) is a protocol for distributed, collaborative, hypermedia information systems

→ HTTP functions as a request response protocol in a client-server computing model

→ HTTP resources are identified and located on the network by uniform resource locators (URLs), using the uniform resource identifier (URI) schemes http and https. URIs and hyperlinks in HTML documents form inter-linked hypertext documents

→ URI:

Page 23: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

HTTP

Page 24: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

HTTP

Methods/Verbs→ GET*$

→ POST$

→ PUT$

→ DELETE$

→ HEAD*→ CONNECT→ PATCH→ TRACE*→ OPTIONS*

* No changes to database $: REST API

Page 25: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

HTTP

→ HTTP is a stateless protocol. A stateless protocol does not require the HTTP server to retain information or status about each user for the duration of multiple requests.

→ However, some (read: most) web applications implement states or server side sessions using for instance HTTP cookies or hidden variables within web forms

Page 26: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

→ MQTT is Client-Server publish/subscribe messaging transport protocol

→ It is lightweight, simple, open, and designed to be as easy to implement

→ It runs over TCP/IP but can be implemented over any stack that provides ordered, lossless, bi-directional connections

→ MQTT is an OASIS standard since v3.1.1 (current version)

Note: MQTT = MQ Telemetry Transport. MQ doesn’t stand for message queue. Infact there’s NO queuing in MQTT

Page 27: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 28: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 29: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

CoAP

→ Constrained Application Protocol→ Works over UDP. Has Binary Headers→ Provides a RESTful API over UDP→ CoAP was the de-facto “IoT” protocols since before IoT

was mainstream→ It is especially useful in embedded devices with limited

processing power and memory→ But it hasn’t aged well with Moore’s law→ With competition in IoT hardware market, a lot powerful

devices are available for cheap

Page 30: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

CoAP

Page 31: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

CoAP

Page 32: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

3. Diving into MQTTAll about MQTT Protocol

Page 33: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 34: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 35: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 36: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 37: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 38: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 39: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 40: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 41: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 42: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 43: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 44: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 45: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 46: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

MQTT

Page 47: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

4. ConclusionAn Overview of what we’ve covered

Page 48: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

Comparisons: MQTT vs HTTP

Page 49: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

Comparisons: MQTT vs CoAP

Page 50: Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 1/2

THANKS!Any questions?See you in the next session!I’m Bhavin Chandarana, find me at→ @BhavinIoT→ [email protected]→ +91-8380013130 | +91-9840425583

Do Checkout:http://www.meetup.com/Internet-Of-Things-Pune-IoTPune