Download - Null mumbai-iot-workshop
![Page 1: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/1.jpg)
Null Mumbai – IOT Workshop
![Page 2: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/2.jpg)
About Us1) Nitesh Malviya -
• Security Consultant with Payatu Technologies,
• Experience in Web Pentesting, VAPT and Mobile Appsec
• An IOT enthusiast and learner
![Page 3: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/3.jpg)
2) Ganesh Naik
• Consultant in Embedded Linux & Embedded Android Product Development at Levana Technologies
• Author of
![Page 4: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/4.jpg)
What is IoT ??• The internet of things (IoT) is the network of physical devices,
vehicles, buildings and other items—embedded with electronics, software, sensors, actuators, and network connectivity that enable these objects to collect and exchange data(Wikipedia)
• Internet of things increases the connectedness of people and things on a scale that once was unimaginable.
![Page 5: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/5.jpg)
Various Names, One Concept• M2M (Machine to Machine)
• “Internet of Everything” (Cisco Systems)
• “World Size Web” (Bruce Schneier)
• “Skynet” (Terminator movie)
Education – Partnership – Solutions
Information SecurityOffice of Budget and Finance
![Page 6: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/6.jpg)
Where is IoT?
Education – Partnership – Solutions
Information SecurityOffice of Budget and Finance
It’s everywhere!
![Page 7: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/7.jpg)
Education – Partnership – Solutions
Information SecurityOffice of Budget and Finance
![Page 8: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/8.jpg)
Devices like…• Networking devices(routers, firewalls, IDS) • Set-top boxes• Medical devices(Health monitors)• Mobile phones. • Home security systems • Vehicles, in-flight entertainment. • Thermostats, metering systems, consumer electronics Displays
![Page 9: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/9.jpg)
Components Of IOT• Physical Objects – Things• Sensors - Sense the physical environment• Actuators - Affect the physical environment• People - Humans can control the environment via mobile apps• Services - Cloud services • Platforms - Type of middleware used to connect IoT components to
IOT.• Networks - IoT components are tied together by networks, using
various wireless and wireline technologies
![Page 10: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/10.jpg)
Common Processor Architectures
• ARM (ARM7, ARM9, Cortex)• Intel ATOM• MIPS• Atmel AVR• Motorola 6800/68000 (68k)• Ambarella• Axis CRIS
![Page 11: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/11.jpg)
Common Buses• Serial buses - SPI, I2C, 1-Wire, UART• PCI, PCIExpress • AMBA – SOC Chip
![Page 12: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/12.jpg)
Common Communication Lines• Ethernet - RJ45• CAN/FlexRay - BMW Cars • Bluetooth• WIFI• Infrared• Zigbee• Other radios (ISM-Band etc)• GPRS
![Page 13: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/13.jpg)
Common Directly Addressable Memory
• DRAM - Dynamic RAM• SRAM – Static RAM• ROM – READ ONLY MEMORY• Flash Memory
![Page 14: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/14.jpg)
Common Operating Systems• Linux - Perhaps most favourite and most encoutered• VxWorks• Cisco IOS• Windows CE/NT• L4• eCos• DOS• Symbian• JunOS• Ambarella
![Page 15: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/15.jpg)
Common Bootloaders • Bootloader is a piece of code that runs before any operating system is
running. • Bootloader are used to boot other operating systems
Common Bootloaders – a. U-Bootb. Perhaps most favourite and most encouteredc. RedBootd. BareBoxe. Ubicom bootloader
![Page 16: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/16.jpg)
Common Libraries and Dev Envs
• busybox + uClibc - Perhaps most favourite and most encoutered• Buildroot• openembedded• crosstool• crossdev
![Page 17: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/17.jpg)
Firmware Formats/Flavors• Ar• YAFFS• JFFS2• SquashFS• CramFS• ROMFS• UbiFS• xFAT• NTFS• extNfs• iHEX• SREC/S19• PJL• CPIO/Ar/Tar/GZip/BZip/LZxxx/RPM
![Page 18: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/18.jpg)
IoT Protocol Stack/Communication Layer
Management Layer(cloud, apps...)
Communication Layer
(network...)
Sensing Layer
(devices...)
![Page 19: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/19.jpg)
Sensing Layer•Dont take it literally :)•Data collection from the physical world•And/Or operation for physical world•Sensors, monitors, camera, readers etc
![Page 20: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/20.jpg)
Communication Layer•Information exchange between two layers
•Provides a channel for data transmission/ communication
- Wifi
- Wired
- Mobile Data
- …
![Page 21: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/21.jpg)
Management Layer•Making sense of the data
•Data Processing
•Storage
•Presentation•Action
![Page 22: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/22.jpg)
Functional Architecture
![Page 23: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/23.jpg)
Common Protocols used in IoT devices
• Protocol – Way 2 or more device/s can communicate with each other.
• Ex – HTTP,FTP,SMTP,SNMP etc
• For IOT can same be use??
• Protocols – MQTT, CoAP, XMPP, RESTful HTTP etc.
![Page 24: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/24.jpg)
Common Protocols used in IoT devices
![Page 25: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/25.jpg)
MQTT Protocol• MQTT was developed by Andy Stanford-Clark and Arlen Nipper in 1999
• Lightweight messaging protocol designed for sensors and devices with • Flaky network connectivity • Low computing power
• Connections where bandwidth is at a premium
• Uses a publish/subscribe architecture in contrast to HTTP with its request/response paradigm
• Components - Publisher/Client, Broker and Subscriber.
![Page 26: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/26.jpg)
MQTT Overview• Each client that wants to receive messages subscribes to a certain
topic and the broker delivers all messages with the matching topic to the client. Therefore the clients don’t have to know each other, they only communicate over the topic
![Page 27: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/27.jpg)
MQTT WORKFLOW• Central concept in MQTT to dispatch messages are Topics.
• A topic is a simple string that can have more hierarchy levels, which are separated by a slash. Example - house/living-room/temperature
• Client can subscribe to the exact topic or on the other hand use a wildcard (# or +)
• The subscription to house/+/temperature would result in all message send to the previously mention topic house/living-room/temperature as well as any topic with an arbitrary value in the place of living room, example house/kitchen/temperature.
• If you need to subscribe to more than one level, for example to the entire subtree, there is also a multilevel wildcard (#). It allows to subscribe to all underlying hierarchy levels. Example house/# is subscribing to all topics beginning with house
![Page 28: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/28.jpg)
Protocol Use Case• Let us see the practical implementation of Protocol.
• Raspberry Pi has a sensor and sends message to Broker
• Broker has a list of subscriber and sends message to them
• For practical Implementation - http://www.hivemq.com/blog/how-to-get-started-with-mqtt
![Page 29: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/29.jpg)
Cloud Service Providers• Amazon• Microsoft• IBM• Google• Salesforce • Cisco• Oracle• SAP• Bosch…..
![Page 30: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/30.jpg)
IOT Prototyping boardsPrototyping boards are microcontrollers and microprocessors with chipsets to handle wireless connections. These development board with Cloud IoT platform enable a fast prototyping process.
They are –a. Arduino Uno b. Arduino MKR1000c. BeagleBone blackd. Raspberry PI e. UDOOf. Particle Photon
![Page 31: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/31.jpg)
What we will be using ?? Arduino Uno Raspberry PI
![Page 32: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/32.jpg)
Arduino • What is Arduino – A development board which include programming
interface, power circuit, basic I/O pins, buttons, LEDs etc as shown
![Page 33: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/33.jpg)
What is the Arduino
![Page 34: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/34.jpg)
Arduino IDE
See: http://arduino.cc/en/Guide/Environment for more information
![Page 35: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/35.jpg)
Getting Started• Check out: http://arduino.cc/en/Guide/HomePage
1. Download & install the Arduino environment (IDE)2. Connect the board to your computer via the USB cable3. If needed, install the drivers (not needed in lab)4. Launch the Arduino IDE5. Select your board6. Select your serial port7. Open the blink example8. Upload the program
![Page 36: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/36.jpg)
Try It: Connect the USB Cable
![Page 37: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/37.jpg)
todbot.com/blog/bionicarduino
![Page 38: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/38.jpg)
Add an External LED to pin 13
• File > Examples > Digital > Blink• LED’s have polarity
– Negative indicated by flat side of the housing and a short leg
www.instructables.com
![Page 39: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/39.jpg)
A Little Bit About Programming
• Code is case sensitive
• Statements are commands and must end with a semi-colon
• Comments follow a // or begin with /* and end with */
• loop and setup
![Page 40: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/40.jpg)
Our First Program
![Page 41: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/41.jpg)
Terminology
![Page 42: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/42.jpg)
Digital I/0
pinMode(pin, mode)Sets pin to either INPUT or OUTPUT
digitalRead(pin)Reads HIGH or LOW from a pin
digitalWrite(pin, value)Writes HIGH or LOW to a pin
Electronic stuff Output pins can provide 40 mA of currentWriting HIGH to an input pin installs a 20KΩ pullup
![Page 43: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/43.jpg)
Arduino Timing• delay(ms)
– Pauses for a few milliseconds• delayMicroseconds(us)
– Pauses for a few microseconds• More commands: arduino.cc/en/Reference/
HomePage
![Page 44: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/44.jpg)
Good Referenceswww.arduino.ccwww.ladyada.net/learn/arduinowww.EarthshineElectronics.com
![Page 45: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/45.jpg)
RaspberryPi
![Page 46: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/46.jpg)
What is a Raspberry Pi?
• A credit card sized PC• Plugs into a TV or monitor• Inexpensive(ish) ~$30-40 each• Capability:
• Programming• Electronic Projects• Office• Play HD Videos
![Page 47: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/47.jpg)
Kit Components• Essential:
• Raspberry Pi board• Prepared Operating System SD Card• USB keyboard• Display (with HDMI, DVI, or Composite input)• Power Supply
• Highly suggested extras include:• USB mouse• Internet connectivity - LAN cable• Powered USB Hub• Case
![Page 48: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/48.jpg)
Programming Languages• The Raspberry Pi Foundation recommends Python• Any language which will compile for ARMv6 can be used• Installed by default on the Raspberry Pi:
• C• C++• Java• Scratch• Ruby• Python
![Page 49: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/49.jpg)
Setup
![Page 50: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/50.jpg)
![Page 51: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/51.jpg)
Power5v micro
USB connector
(Similar to the one on a lot of mobile phones!)
![Page 52: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/52.jpg)
3.5mm AudioStandard
headphone socketRCA Video
(works with most older
TVs)
HDMI Audio & Video(works with modern TVs and DVI
monitors)
A/V (Audio/Video)
![Page 53: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/53.jpg)
GPIO(Gener
alPurpos
eInput &Output)
10/100MbEthernet
2 x USB 2.0ports
Connectivity
![Page 54: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/54.jpg)
DSI(display
interface)
SOC (System On a Chip)Broadcom BCM2835 700Mhz
Internals LAN Controller
CSI(camera
interface)
![Page 55: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/55.jpg)
SD Card Slot(supports SD cards up to
32GB)
Storage
![Page 56: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/56.jpg)
DEMO TIME – LIVE PROJECTS
![Page 57: Null mumbai-iot-workshop](https://reader036.vdocuments.mx/reader036/viewer/2022070518/58e588611a28abbf5d8b6385/html5/thumbnails/57.jpg)
THANK YOU