Upload
bhavin-chandarana
View
596
Download
0
Embed Size (px)
Citation preview
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
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
→ Hardware agnostic→ Software agnostic→ Protocols matter !→ Concerns:
↠ Battery life, energy consumption↠ Connectivity vs Security↠ Processing Power & Memory
Ideal IoT solution
Broadly 3 types
MicrocontrollersJust a simple μctrl with peripherals.There’s no OS installed.Usually constrained in memory, computing power, battery life.Really cheap.E.g: Arduino, ESP8266, etc.
Single Board Comp.Full-fledged comp. with RAM, storage, etcUsually Linux basedBetter computing power, memoryNot battery poweredCostlier than μctrlE.g: Raspberry Pi, Beaglebone, etc
HybridIs both an SBC & embedded platformHas both linux & embedded firmware installedUsually no batteriesQuite costlyE.g: UDOO, Intel® Edison
μctrl - ComparisonProps Arduino ESP8266
Microcontroller ATmega328 Tensilica L106
Operating Voltage 5V 5V
Input Voltage (recmd.) 7-12V 5V
Input Voltage (limits) 6-20V 5V
Digital I/O Pins 14 (~6) 11 (~9)
Analog Input Pins 6 1
DC Current per I/O Pin 40 mA 10mA
DC Current for 3.3V Pin 50 mA 12mA
Flash Memory 32 KB - ATmega328 (0.5 KB - Bootloader) 512KB
SRAM 2 KB (ATmega328) 64 KB
EEPROM 1 KB (ATmega328) None
Clock Speed 16 MHz 26-52MHz
Connectivity W5100 Ethernet Controller (PoE ready) WiFi built in
Onboard Storage Micro SD card None
UART 1 1
Temp Sensor None Embedded
IR Remote None 38kHz (NEC)
SPI / I2C Yes Yes
Price ₹ 1,200 ₹ 400
SBC - Comparison
Props Raspberry Pi 2 Beaglebone
ChipBroadcom BCM2836 Arm7 Quad Core Processor SoC 1GHz TI Sitara AM3359 ARM Cortex A8 SoC
CPU900 MHz Low Power ARM1176JZ-F Applications Processor Cortex-A8 + 2xPRU(200Mhz)
GPUDual Core VideoCore IV® Multimedia Co-Processor PowerVR SGX530
Memory 1GB RAM 512 MB
Ethernet onboard 10/100 Mbps Ethernet RJ45 jack
USB 2.0 4 2
Video Output HDMI, Composite RCA 1 Micro-HDMI
Audio Output 3.5mm jack, Stereo over HDMI Stereo over HDMI
Onboard Storage Micro SD card slot 2 GB on-board eMMC + MicroSD
Operating System
Raspbian, Ubuntu, Android, ArchLinux, FreeBSD, OpenELEC, Raspbmc
Angstrom, Ubuntu, Android, ArchLinux, Gentoo, Minix
Power Draw 210-460 mA @ 5V 150-350 mA @ 5V
Price: ₹ 3,500 ₹ 5,000
Hybrid - UDOO (Quad)
CPU Freescale i.MX 6 ARM Cortex-A9 Quad core 1GHzGPU Vivante GC 2000 + Vivante GC 355 + Vivante GC 320Integrated accelerators for 2D, OpenGL® ES2.0 3D and OpenVG™Atmel SAM3X8E ARM Cortex-M3 CPU (same as Arduino Due)RAM DDR3 1GB76 fully available GPIO: 62 digital + 14 digital/analogArduino-compatible R3 1.0 pinoutHDMI and LVDS + Touch2 Micro USB (1 OTG type a+b)2 USB type A (x2) and 1 USB connector (requires a specific wire)Analog Audio and MicCSI Camera Connectionon board Micro SD card reader (boot device)Input Voltage (recommended) 6-15 VEthernet RJ45 (10/100/1000 MBit)WiFi ModuleSATA
Hybrid - UDOO (Neo)
ProcessorFreescale™ i.MX 6SoloX applications processor with an embedded ARM Cortex-A9 core and a Cortex-M4 Core
Memory 512MB (Basic) or 1GB (only Extended and Full)Graphics Integrated 2d/3d graphics controller
Video OutMicro HDMI interfaceLVDS interface + touch (I2C signals)
Video InAnalog camera connection supporting NTSC and PAL8-bit parallel camera interface*
Mass StorageMicroSD card slot onboard8-bit SDIO interface*
AudioHDMI audio transmitterS/PIDF & I2S*
USB1x USB 2.0 Type A ports1x USB OTG (micro-AB connector)
Networking
Fast ethernet RJ45 – 10/100Mbps (only Basic and Full)Wi-Fi 802.11 b/g/n,Direct Mode SmartConfig and Bluetooth 4.0 Low Energy(only Extended and Full)
Serial Ports3x UART ports*2x CAN Bus interfaces*
*Available on Pin Header
Hybrid - UDOO (Neo)
Other Interfaces
8x PWM signals*3x I2C interface*1x SPI interface*6x multiplexable signals*
Power Supply
5 V DC Micro USB6-15 V DC Power JackRTC Battery Connector
LEDsGreen Power Status LEDUser Configurable LEDs (Red and Orange)
Integrated Sensors
3-Axis Accelerometer (only Extended and Full)3-Axis Magnetometer (only Extended and Full)3-Axis Digital Gyroscope (only Extended and Full)1x Sensor Snap-In I2C connector (only Extended and Full)
Dimensions 89mm x59mm (3.50″ x 2.32″)
Arduino PinoutArduino-Compatible through the standard Arduino Pins layout and compatible with Arduino shields.
Digital I/O Pins32 extended GPIOs (A9 dedicated)22 arduino GPIOs (M4 dedicated)
Analog Input Pins 6 available Pins
Operating System Android Lollipop & Linux UDOObuntu2 (14.04 LTS) *Available on Pin Header
Hybrid - UDOO (Neo)
Other Interfaces
8x PWM signals*3x I2C interface*1x SPI interface*6x multiplexable signals*
Power Supply
5 V DC Micro USB6-15 V DC Power JackRTC Battery Connector
LEDsGreen Power Status LEDUser Configurable LEDs (Red and Orange)
Integrated Sensors
3-Axis Accelerometer (only Extended and Full)3-Axis Magnetometer (only Extended and Full)3-Axis Digital Gyroscope (only Extended and Full)1x Sensor Snap-In I2C connector (only Extended and Full)
Dimensions 89mm x59mm (3.50″ x 2.32″)
Arduino PinoutArduino-Compatible through the standard Arduino Pins layout and compatible with Arduino shields.
Digital I/O Pins32 extended GPIOs (A9 dedicated)22 arduino GPIOs (M4 dedicated)
Analog Input Pins 6 available Pins
Operating System Android Lollipop & Linux UDOObuntu2 (14.04 LTS) *Available on Pin Header
MQTT - Brokers
ServerQoS
0QoS
1QoS
2auth
bridge
$SYS
SSL
dynamic topics
cluster
websockets
plugin system
mosquitto ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✘ ✔ ✔
RSMB ✔ ✔ ✔ ✔ ✔ ✔ ✘ ✔ ✘ ✘ ?WebSphere MQ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ? ? ?HiveMQ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
Apache Apollo ✔ ✔ ✔ ✔ ✘ ✘ ✔ ✔ ? ✔ ?Apache ActiveMQ ✔ ✔ ✔ ✔ ✘ ✘ ✔ ✔ ✔ ✔ ✔
my-Channels Nirvana Messaging ✔ ✔ ✔ § ✘ ✘ ✔ ✘ ? ? ?RabbitMQ ✔ ✔ ✘ ✔ ✘ ✘ ✔ ✔ ? ? ?Solace ✔ ✔ ✘ ✔ § ✔ ✔ ✔ ✔ ✔ ✘
MQTT.js ✔ ✔ ✔ § ✘ ✘ ✔ ✔ ✘ ✔ ✘
moquette ✔ ✔ ✘ ? ? ? ? ? ✘ ✘ ✘
mosca ✔ ✔ ✘ ✔ ? ? ? ? ✘ ✔ ✘
IBM MessageSight ✔ ✔ ✔ ✔ ✘ ✔ ✔ ✔ § ✔ ✘
MQTT - Brokers
ServerQoS
0QoS
1QoS
2auth
bridge
$SYS
SSL
dynamic topics
cluster
websockets
plugin system
2lemetry ✔ ✔ ✔ ✔ ✔ § ✔ ✔ ✔ ✔ ✘
GnatMQ ✔ ✔ ✔ ✔ ✘ ✘ ✘ ✔ ✘ ✘ ✘
JoramMQ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
ThingMQ ✔ ✔ ✔ ✔ ✔ ✘ ✔ ✔ ✔ ✔ ✔
VerneMQ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
emqttd ✔ ✔ ✔ ✔ ✔ ✔ ✔ ? ✔ ✔ ✔
MQTT - Clients
→ Mosquitto: mosquitto_pub, mosquitto_sub→ Paho
↠ (Embedded) C/C++↠ Javascript↠ Java↠ Python↠ .NET
→ MQTT.js→ HiveMQ→ PubSubClient.h (for Arduino)
Also need to worry about . . .
→ Backend: Preferably node.js→ Backend API: (REST API with MVC framework)
↠ Sails.js, Express.js, RoR, laravel, Django→ Frontend: (could follow MVC framework)
↠ AngularJS↠ ReactJS
→ Mobile↠ Cordova/phonegap/ionic - hybrid↠ React - Native
Gateway/TransportUsing existing security principles
Easy to implement
Maintenance & support is easier
e.g: Firewalls, VPNs, MQTTS, etc.
Security
EmbeddedNew, uncharted territory
Performance issues
Maintenance & support is difficult
e.g: EPID, MQTTS (TLS/SSL)
LAN enforcementBecome increasingly important with more and more potentially hackable devicesLAN enforcement identifies that is device is compromised, notifies user/admin and quarantines the infected devices
Enhanced Privacy ID
→ Patent by Intel. Used by Intel, Atmel, Microchip
→ ISO standard for identity and privacy and has been shipping in Intel platforms since 2011
↠ http://csrc.nist.gov/groups/ST/PEC2011/presentations2011/brickell.pdf
↠ http://csrc.nist.gov/groups/ST/IBE/documents/June08/LI_Enhanced%20Privacy%20ID.pdf
Enhanced Privacy ID
→ EPID is a crypto protocol that provides proof of membership in a group with properties:↠ Anonymous↠ Unlinkable (optional)↠ Issuer does not keep a database of all
members’ private keys↠ Revocable if private key is revealed↠ Proof that private key not used in some specific
previous transaction↠ Auditable revocation list
Enhanced Privacy ID
→ EPID is a Direct Anonymous Attestation (DAA) scheme with enhanced revocation capabilities↠ DAA has been adopted in TCG Trusted Platform
Module (TPM) Spec v1.2
→ EPID is different from a group signatures scheme in that:↠ Nobody can open a group signature and find
out who signs it↠ Member’s privacy is intact (until revoked)
Battery
ZigBee Wi-Fi Bluetooth Smart
Standards-based Yes (802.15.4) Yes (802.11) Yes
Standards Body ZigBee Alliance Wi-Fi Alliance Bluetooth SIG
Application FocusMonitoring & Control Web, Email, Video Sensors
Type of Battery Coin-cell Rechargeable (Li-ION) Coin-cell
Number of Nodes < 10 to 1,000 + < 10 to 250 < 10
Required Throughput (Kbps) < 250 > 500 < 250
Typical Range (Meters) 1 to 100 1 to 100 1 to 70
Network Topology
Self-healing Mesh, Star, Point-to-Point Star, Point-to-Point Star, Point-to-Point
Optimized ForScalability, Low Power, Low Cost
Ubiquity, High Throughput
Ubiquity, Low Power, Low Cost
Battery
→ Duty Cycle: Determining the required transmission strength, duration and duty-cycle between active and sleep states is very important
→ Hardware Config: Adjusting MCU Polling Frequency Saves Power with No User Impact↠ MCU capacitive events are monitored in a
relatively slow, millisecond duty cycle rate since people are accustomed to relatively slow human interface responses compared to most MCU capabilities. This saves battery power without sacrificing usability
Battery
https://www.silabs.com/iot/Pages/battery-life-in-connected-wireless-iot-devices.aspx
Cloud & Mobile
→ Realtime: Designing your mobile app for a more realtime you helps↠ Push Notifications/Widgets/Services↠ Micro-moments
→ IoT Middleware: Readymade middleware can be helpful. The market is heating up!↠ AWS IoT↠ IBM Bluemix®
↠ 2lemetry
Connectivity
→ IPv4 has to be phased out in favor of IPv6
→ 6LowPAN: protocol for (smart) cities of the future↠ defined encapsulation and header compression
mechanisms that allow IPv6 packets to be sent and received over IEEE 802.15.4 based networks
→ Innovative approaches in networking↠ Mesh, DODAG, etc.
Transport LevelWhen the goal is to provide confidentiality TLS/SSL transport encryptionSecure and proven wayNo Men in the MiddleAsymmetric
MQTTS
Network LevelUsing a physically secure network or VPNSuitable for gateway applications, where the gateway is connected to devices on the one hand and with the broker over VPN on the other side.
Application LevelThe MQTT protocol provides a client identifier and username/password credentialsACL settings can be used in conjunction to authenticationPayload Encryption
http://www.hivemq.com/blog/mqtt-security-fundamentals
Moore’s Lawnumber of components on chip doubles every year
Koomey’s Lawenergy efficiency of computation doubles roughly every 1.5 years
Metcalfe’s Lawvalue of a network with n nodes ∝O(n2)
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