Developing robust & enterprise io t applications

171
Developing Robust & Enterprise IoT Applications Debasis Das Principal Consultant ECD Zone

Transcript of Developing robust & enterprise io t applications

Development eco-system in Freer-source for IoT

Developing Robust & Enterprise IoT ApplicationsDebasis DasPrincipal ConsultantECD Zone

Debasis DasBE in Electronics Engineering, Jadavpur UniversityM Tech, EE, Computer Sc. Major, IIT, KanpurAbout 1.5 decade in DRDO working with communications technology, Remote sensing & satellite imaging, pilotless drones, computers and microcomputer technologiesMore than two decades in software development delivering projects to international clientele in US, Europe, Japan and China in a range of technologies5 recent years in academics, MIT, Bishnupur; SR group of Institutions, Jhansi; GMIT, BaruipurConsults for ECD Zone on an on-going basis11/12/2016Debasis Das OSI 20162

ECD ZoneEngineering & Management ConsultingDistributed GeographicallyIndia (Several Locations)SingaporeUKCorporate training in leading edge technology areasEducational TechnologiesInternet of Things11/12/2016Debasis Das OSI 20163

History with IoT related Technologies(Processors, communication, Sensors)

1978-85: SSMA and frequency hopping secure communication systems1985/86: Intel 8086 based real-time processor for drones1986- 1991: M6800x and Intel x86 based processor and I/O controllers based development at HCL Development lab1987: Developed and published a practical manual of designing processor devices, interfacing with sensor, into products. Hardly any books by Indian writers were available back then1992- 2008: Software projects execution for International clientele . Worked with the client-server, web based technologies, digital media technologies for digital video broadcasts and IPTV applications2009 to now: Consultancy, strategy, technology mentoring in areas including embedded technology11/12/2016Debasis Das OSI 20164

State of Internet of Things&IoT Applications11/12/2016Debasis Das OSI 20165

Internet of ThingsThis is an evolving technology, also known as Internet of Everything. Evolved from what used to be known as Ubiquitous computing, M2M communicationThe industrial section of the applications are being hailed as the 4th industrial revolutionBasic premise is that intelligent/smart objects will be delivering data to the Internet repositories and be controlled through it Because of the Internet, this control will be possible from anywhere That opens up a whole lot of possibilities11/12/2016Debasis Das OSI 20166

Statement of PurposeUnlike other enterprise applications, IoT covers a long value chain and several technologiesSensors and actuators at one endData gathered must be transferred to the enterprise data centers or cloudData analytics and integration with enterprise IT infrastructureThe data gathering segment have their peculiar communication and energy consumption needsUnlike the IP world, communication standards have not reached the universal acceptance like the TCP/IP standardsThis segment also needs to handle a range of technologies with their own unique development needsCompared to classic software development processes, developers need be aware of a whole set of processes, standards and testing requirements

11/12/2016Debasis Das OSI 20167

State ofInternet of ThingsSensors/actuators, mobile technologies, cloud, Social Media, Connected endpoints, wireless technology, big data analytics are coming together to create a huge disruptive changeBeing a part of this change is a top concern for business leadersIt is going to evolve at an incredible rate over the next decade11/12/2016Debasis Das OSI 20168

Diverse Changes that Touch EverybodyFinding free parkingManaging the environment of your habitat-individual as well as of the surroundingsCustomized shopping experience11/12/2016Debasis Das OSI 20169

Dimensions of the Phenomenon11/12/2016Debasis Das OSI 20161050 Billion endpointsBy2020$2.5 Trillion

Giving rise to a business volume Totally new revenue over next 10 years

User ConcernsWhen the network becomes so widespread, users will be concerned with their privacyWill simple endpoint hardware have the necessary protection built in?Interactions with other network devices must in no way compromise that trust

11/12/2016Debasis Das OSI 201611

Drivers of IoTLow cost sensorsGrowing Big dataWide adoption of cloud computing and social mediaPervasiveness of wireless technologyStandardization on IP11/12/2016Debasis Das OSI 201612

Example Industry VerticalsRetail: inventory, customer, personalized and predictive services, optimized and connected inventory, social innovationAutomotive: real-time driving behavior, remote diagnostics, predictive maintenance, pollution controlHealthcare: Remote patient monitoring, lower insurance costs, clinical productivity, faster, accurate patient careOil and Gas: connected infrastructure, lower operating costs, proactive maintenance, lower fuel consumptionManufacturing: smart sensors, digital controls, faster response to market demands, improved efficiencyPublic Sector: smart cities, connected infrastructure, better security, congestion and lighting managementFacilities Management: connected buildings, smart lighting, optimized resource management, preventive maintenanceUtilities: smart meters, smart grids, lower cost servicesSupply Chain: real-time tracking, proactive problem resolutions, operational efficiency

11/12/2016Debasis Das OSI 201613

Industrial IoT/ Industrial Revolution 4.0According to a recent survey of more than 170 industry executivesSuccessful adoption of IIoT is crucial for future success -81%No clear strategy, only 25% have a vision of how to go about it

11/12/2016Debasis Das OSI 201614A study by Genpact Research Institute

Barriers to Implementation11/12/2016Debasis Das OSI 201615 Top Concerns% of respondentsData Security37%Availability of skilled people35%Move away from legacy systems34%Quality of data34%Individual privacy issues33%

A study by Genpact

Dimensions of the IoT Problem11/12/2016Debasis Das OSI 201616

Opportunities from A Successful Implementation77% see growth as the biggest opportunity75% see agility as the biggest benefit50% is seeing their companies developing IIoT strategies30 % is not likely to have a strategy in place in the next 12 months13% are not likely to have any strategy ever50% perceive increase in cyber attack susceptibility if IIoT is implemented11/12/2016Debasis Das OSI 201617A study by Genpact

Structure of IoTServicesInternetGatewayWi-Fi, Mobile, DSL, Fiber 6LowPAN, Zigbee, RFID, NFCThings- appliances, buildings, smart city systemsSensors, Actuators11/12/2016Debasis Das OSI 201618

Structure of IoTAnother View(Curtesy Microsoft)11/12/2016Debasis Das OSI 201619

Microsofts View11/12/2016Debasis Das OSI 201620

Architecture View11/12/2016Debasis Das OSI 201621

Application Ecosystem11/12/2016Debasis Das OSI 201622

Structure of IoTAnother View(Curtesy AWS)11/12/2016Debasis Das OSI 201623

IoT View11/12/2016Debasis Das OSI 201624

The M2M Connection!A set of technologies make wireless/wired communications between systems that are equipped to do that. Minimal (or no) human intervention is usedThe automatic communication between machines makes the next step up, Internet of Things, possibleThe applications, data analytics riding on this infrastructure is the IoT as we know it.11/12/2016Debasis Das OSI 201625

M2M Features & ConsiderationsMachine To Machine: (Physical sensors, Actuators; cost)A device which is monitored by means of sensor(s)A device that is instructed to actuateMachine To Machine: (Hardware, protocols, end-to-end delays, reliability; cost)A network which facilitates end-to-end connectivityUsually composed of radio, access network, gateway, core network, backend serversMachine To Machine:(middleware, software, application; cost)Computers that extract, process, display collected informationComputers which automatically control other machines11/12/2016Debasis Das OSI 201626

M2M System CharacteristicsAutonomous operationLarge number of node sending out small amounts of data once in a whileData is mission critical thoughSelf organized set upPower efficiency is essentialHigh reliability11/12/2016Debasis Das OSI 201627

ImplicationsSystems must be very simple, often supported by a simple microcontrollerSleeps most often, on-site support is not possible nor software/firmware upgradesSends out small packets of data when it wakes upFull TCP/IP software stack to integrate with Internet will be overkillAn intermediate gateway is essential11/12/2016Debasis Das OSI 201628

Likely Landscape by 2020Sensors: 212 bn; location, motion, chemical, light, heat, soundDevices: 50 bn: smartphones, wearables, automobiles, domesticNetworks: 2.5 bn, Blu-tooth, NFC, Wi-Fi, etc. connections accessing 4G/LTE networks

11/12/2016Debasis Das OSI 201629

Likely Landscape by 2020APIs: 75%, fortune 1000 companies will offer public APIs by end 2014, billing, mapping, social, search, marketing, etc.APPs: 4.4 bn, number of app users by 2017, touch interfaces, gesture tracking, augmented reality, voice recognition, etc.Data:16 ExaBytes, mobile data traffic per month, user data, transaction data, field data, inventory data, performance data, etc.

11/12/2016Debasis Das OSI 201630

M2M End-to-End NetworkConnecting sensors & actuatorsWired- cable, xDSL, optical, etc.Wireless capillary/short range- WLAN, ZigBee, IEEE 802.15.4x, etc.Wireless cellular - GSM, GPRS, EDGE, 3G, LTE-M, WiMAX, etc.Gateway - connecting access and backhaul/core networks including address translation, packet defragmentation, etc.Backhaul/Core/Internet Network connecting to computer system via the IPv6-enabled Internet

11/12/2016Debasis Das OSI 201631

Gateway11/12/2016Debasis Das OSI 201632Gateway

Full TCP/IP, IPv6 communication support to/from existing Internet

Network and transport functions forThe special needs for the WSN nodes and networks

Forms of AccessWired: sensors are hardwired to the gatewayCapillary-wired : local cluster of sensors are hardwired then connected to a xDSL, for exampleCapillary-cellular: local sensors communicate via cellular to a gateway in the building, for exampleCellular-sensors communicate to a gateway via a cellular modem on-board11/12/2016Debasis Das OSI 201633

M2M Access NetworkWired Solution dedicated cabling between sensor - gateway:Very reliable; very high rates, little delay, secureHowever, very expensive to roll out, vandalism, not scalable, no mobilityWireless Capillary Solution shared short-range link/network:Cheap to roll out, generally scalable, low powerShort range, multi-hop not a solution, low rates, weak security, interference, lack of universal infrastructure/coverageWireless Cellular Solution dedicated cellular link:Excellent coverage, mobility, roaming, generally secure, infrastructureExpensive to operate and maintain, not power efficient, delays11/12/2016Debasis Das OSI 201634

Wireless M2M Communication ChallengesCapillary CommunicationsRange, need for multi-hop mesh to increase itAssociated delay due to multi-hopReliability and securityStandardizationCellular communicationsHuge number of nodes sending very short communication messages at low ratesNeed for power efficiencyNewer applications cannot interfere with existing onesWhen nodes are woken up, they need to be operational quickly11/12/2016Debasis Das OSI 201635

Applications11/12/2016Debasis Das OSI 201636ApplicationOSS & BSSAnalyticsDataSecurityBPMBRMIoT Management ServicesWAN (Wireless)WAN (Wireline)RFIDLow power wirelessGateway functionsSensorsLAN

Diverse Standards Bodies11/12/2016Debasis Das OSI 201637

Communications(A review, reference DevNation, Jun 21-25, Boston, MA, USAIoT Protocols round-up- Brian Ashburn)11/12/2016Debasis Das OSI 201638

Type of CommunicationsM2M or machine to machineMachine to serverServer to serverHumans to Machine

11/12/2016Debasis Das OSI 201639

ProtocolsSo you are going to need different kinds of protocolsAttempt is to keep overheads down as much as possibleDevelopers need to take a call on whats going to survive and become popular

11/12/2016Debasis Das OSI 201640

An Example ProtocolA MQTT message format has a fixed header of 2 bytes, Byte 1defines message type and flagsByte 2 contains information on the remaining message lengthA variable header may/may not be included after the fixed header The payload will contain application data or protocol specific information

11/12/2016Debasis Das OSI 201641

HTTP/RESTThese protocols are based on HTTP/REST as the base on which they are builtMany systems provide frameworks to support RESTLanguage independentObviously this support will preclude many full messaging support11/12/2016Debasis Das OSI 201642

Concern of users11/12/2016Debasis Das OSI 201643Communications makes sure the whole thing works!Best protocol is decided by Available communication pathwaysProcessing power available on deviceWhat server can support

MQTT11/12/2016Debasis Das OSI 201644Open standardIt is lightweightGood QoS definitions are availablePersistent message storeNo labelling of content type is available

MQTT-SN11/12/2016Debasis Das OSI 201645TCP-less protocolIntended for sensor networksImprovements over MQTT in terms of error messages and concise message headerComplex connection mechanism is mandated (even if the network is just 2 nodes)Stateful endpoints need be usedHandling of restarts by Brokers or clients not definedFew platforms support it yet

CoAP11/12/2016Debasis Das OSI 201646Open standard based on HTTP/RESTSuited for resource constrained devicesCommunication is based on UDPPrimarily a point to point protocol

AMQP11/12/2016Debasis Das OSI 201647Full featured message protocolSupports routingData type encoding definedSupports queues and other message patternsQuite a heavyweight protocol and better suited to server to server communications

6LowPAN(IPv6 over Low Power Personal Area Network)11/12/2016Debasis Das OSI 201648

Necessity for 6LowPANIETF standard that bridges TCP/IP communications and WSN, low power sensor networks via IEEE 802.15.4 low-power radio for devices with limited space, power and memoryAn adaptation layer above the 802.15.4 link layer provides the ability of TCP/IP communication above the adaptation layer. The adaptation layer helps fit 802.15.4 frame with TCP/IP stack11/12/2016Debasis Das OSI 201649

6LowPAN Stack11/12/2016Debasis Das OSI 2016506LowPAN specific applications(using sockets)Not usedNot usedTCP/UDPIPv6 and adaptation for routing, packet fragmentation/reassemblyIEEE 802.15.4 (unslotted CSMA/CD)IEEE 802.15.4 PHYApplication layerPresentation LayerSession LayerTransport LayerNetwork LayerData Link layerPhysical Layer

6LowPAN11/12/2016Debasis Das OSI 201651Objects & Data models ex, HTML, XML, etc.LinkNetwork (IPv6) Transport, UDP/IP and TCP/IPApplication, ex. Telnet, HTTP, SMTP, SNMP.. 74326LoWPANSerial ModemsX379.5FDDI802.3Ethernet flavors

802.15.46LoWPANDSL, ISDN, GPRS, etc.802.11.xWi-Fi flavors

Adaptation LayerIP packet adaptation to fit 802.15.4; packet fragmentation and re-assemblyRouting is another function; supports multiple protocolsNeighbor discovery & multi-cast support

11/12/2016Debasis Das OSI 201652

CoAP(Constrained Application Protocol)11/12/2016Debasis Das OSI 201653

What is CoAP CoAP isA RESTful protocol , for constrained devices and networks, It is specialized for M2M applicationsEasy to proxy to/from HTTP, makes integration easyCoAP is notA replacement for HTTP but a general HTTP compressionNot available in many public cloud yet!Works within the current web environment facilitating communication of constrained devices11/12/2016Debasis Das OSI 201654

Classes of Constrained DevicesClassRAMFlashCommentsClass 0< 1 KB< 100 KBDevices use gateways to communicate, have rudimentary communication capabilities onlyClass 1~10 KB~100 KBDevices use protocols designed for IoT, using Constrained Application Protocols (CoAP). Can interact with other devices without going through a gateway.Class 2~50 KB~250 KBDevices use regular IP (IPv6) protocols and can behave as regular network devices

11/12/2016Debasis Das OSI 201655

Protocol Stack with CoAP Support11/12/2016Debasis Das OSI 201656CoAP requests/ResponsesApplicationsCoAP MessagingUDP, DTLS6LowPANIPv4, v6WPAN 802.15.4)Ethernet/Wi-FiPhysical Layer

CoAP Message Format11/12/2016Debasis Das OSI 201657Ver. (2)Type(2)Tkl (4)MessageId (16)Request/response code (8)

Token (0-8)Tk1 byteOptions if anyPayloadPayload marker (0xff)

MQTT11/12/2016Debasis Das OSI 201658

MQ Telemetry TransportA light-weight event and message oriented protocolAllows devices to asynchronously communicate efficiently across constrained networks to remote systems11/12/2016Debasis Das OSI 201659

MQTT Domain

11/12/2016Debasis Das OSI 201660

Unconstrained Use

11/12/2016Debasis Das OSI 201661

MQTT Architecture FeaturesA client/server model with every sensor node a clientMessage oriented, a chunk of data that is transparent to the brokerEvery message published to an address (topic)Clients can subscribe to multiple topicsClients open TCP connections to a broker and receive the topic subscribed toThe publisher-subscriber model allows MQTT clients to communicate one-to-one, one-to-many and many-to one11/12/2016Debasis Das OSI 201662

ArchitectureBrokerClient AClient BClient CSubscribe temperatureSubscribe temperaturePublish temperature 25temperature =25temperature =2511/12/2016Debasis Das OSI 201663

MQTT Message Characteristics 1/2Topics are hierarchical with wild card patterns matchingThree levels of QoSFire & forgetDelivered at least onceDelivered exactly onceClients can register a last will and testament message to let subscribers know when they disconnect

11/12/2016Debasis Das OSI 201664

MQTT Message Characteristics 1/2Persistent messages can be stored on the broker. Client is given the persistent messages. Only the latest persistent message could be storedUser name, password authentication and SSL/TLS supported

11/12/2016Debasis Das OSI 201665

MQTT-SNMQTT drawbacks are resolved in MQTT-SNClients must support TCP and keep the connection open all the timeTopic names could be long strings that does not fit in 802.15.4 formatsMQTT-SN utilizes UDP and supports indexing of topics11/12/2016Debasis Das OSI 201666

REPL Routing11/12/2016Debasis Das OSI 201667

REPL Features(Routing Protocol for Lossy & Low Power Network)Meant for connecting lossy and low power networks to the InternetCovers routing requirements for Urban environmentsIndustrial low-power networksHome automationBuilding automationIncludes requirements for latency, reliability, and network management capabilities

11/12/2016Debasis Das OSI 201668

LLN PeculiaritiesLLN devices can maintain very little stateAre optimized for energy savingTraffic patterns in LLNs can be more complex than unicast flowsRPL supports three traffic patterns: multipoint-to-point traffic (MP2P), point-to-multipoint traffic (P2MP), and point-to-point (P2P) trafficOften such traffic must be carried over links that can forward only small framesThese LLN characteristics impose unique routing requirements

11/12/2016Debasis Das OSI 201669

RoutingA DODAG (Destination oriented directed acyclic graph) is created for deciding routingMultiple DODAGs may be created for a set of source and destinationThese instances will be created based on intent and constraints (e.g. a low power node to be avoided) 11/12/2016Debasis Das OSI 201670

Zigbee(IEEE 802.15.4 based protocol)11/12/2016Debasis Das OSI 201671

Zigbee Standards & ReleasesZigbee 2004Zigbee 1.0 released Jun 2005Zigbee 2006Cluster library introduced, Sep 2006Zigbee 2007Two different profiles introduced, Oct, 2008Zigbee PROA profile class introduced in Zigbee 2007, additional features allow robust deployment and enhanced securityRF4CEStandard addressed to consumer electronics devices (audio/visual), 200911/12/2016Debasis Das OSI 201672

Zigbee Application CharacteristicsTransmission up to another station at up to 70m distanceCan be extended with relays802.15.4 applications are intended to be control and monitoring applications, with relatively low levels of data throughput. Remote, battery powered sensors, low power consumption is a key requirement.

11/12/2016Debasis Das OSI 201673

Zigbee PHY & MAC LayersThe system is specified to operate in one of the three bands. At 2.4 GHz there are a total of sixteen different channels available, and the maximum data rate is 250 kbps. For 915 MHz there are ten channels and the standard supports a maximum data rate of 40 kbps, while at 868 MHz there is only one channel and this can support data transfer at up to 20 kbps.The modulation techniques also vary according to the band in use. Direct sequence spread spectrum (DSSS) is used in all cases. However for the 868 and 915 MHz bands the actual form of modulation is binary phase shift keying. For the 2.4 GHz band, offset quadrature phase shift keying (O-QPSK) is employed.Since systems may operate in heavily congested environments, and in areas where levels of interference is high, the 802.15.4 specification ensures reliable operation through a quality assessment, receiver energy detection and clear channel assessment CSMA (Carrier Sense Multiple Access) techniques are used to determine when to transmit, and in this way unnecessary clashes are avoided.

11/12/2016Debasis Das OSI 201674

Data TransferData packets have a maximum size of 128 bytes, maximum payload of 104 bytes. The standard supports 64 bit IEEE addresses as well as 16 bit short addresses. The 64 bit addresses uniquely identify every device.Once a network is set up, the short addresses can be used and this enables over 65000 nodes to be supported.It also has an optional super-frame structure with a method for time synchronizationIt has a guaranteed time slot mechanism. High priority messages can be sent swiftly across the network

11/12/2016Debasis Das OSI 201675

Low Power Wi-Fi(IEEE 802.11 ah)11/12/2016Debasis Das OSI 201676

IEEE 802.11 ahIEEE 802.11ah is a new Wi-Fi standard, operates in the sub 1GHz frequency (unlicensed ISM band)IEEE 802.11ah is for extended range Wi-Fi, and the IoTA new physical layer and MAC has been developedSpeeds are lower than other 802.11 variantsAllows Wi-Fi-enabled devices to gain access for short-term transmissions in these bands that are much less congestedMakes it suitable for wide area based sensor networks, sensor backhaul systems and potential Wi-Fi off-loading11/12/2016Debasis Das OSI 201677

Free Source Development Tools/Support11/12/2016Debasis Das OSI 201678

Free Source HardwareDevelopment Boards11/12/2016Debasis Das OSI 201679

Raspberry PiArduino

OS with Raspberry PiRaspabianArch Linux ARMOpenELECPidoraRaspbmcMinepeonKali LinuxOpenWrt for Raspberry PiRaspberry Digital SignageRISC OS Pi11/12/2016Debasis Das OSI 201680

OS with ArduinoDuinOSPyxis OSArduinoMacOSTaOSFreeRTOSROS

11/12/2016Debasis Das OSI 201681

ContikiOpen source OS that includes support for the communication protocolsSupports Internet standards6LowPAN, RPL, COAPSupports standard C and COOJA simulatorRuns on a range of low power wireless devicesCommercial support available in addition to community support11/12/2016Debasis Das OSI 201682

COOJA

Cooja is a Contiki network emulator An extensible Java-based simulator capable of emulating Tmote Sky (and other) nodes The code to be executed by the node is the exact same firmware you may upload to physical nodes, allows large and small networks of motes to be simulated Motes can be emulated at the hardware level Slower but allows for precise inspection of system behavior Motes can also be emulated at a less detailed level Faster and allows simulation of larger networks

11/12/2016Debasis Das OSI 201683

COOJA - 2Cooja is a highly useful tool for Contiki development It allows developers to test their code and systems long before running it on the target hardware Developers regularly set up new simulations to debug their software to verify the behavior of their systems

11/12/2016Debasis Das OSI 201684

KAA

11/12/2016Debasis Das OSI 201685

KAA FeaturesKaa is a middleware platform for creation of IoT solutions, customizable, transport-agnostic link between the hardware and applicationsIt can build active device inventory, capture physical and logical specs for each device, collect and analyze real-time telemetry data, perform device management, provisioning, and configuration, distribute firmware updates, Enable near real-time communication across devicesComplex, time-consuming, and mundane tasks can be left to Kaa

11/12/2016Debasis Das OSI 201686

KAA AdvantagesDeployed easily deployed: on-premises, in cloud, or mixed environmentsSupports wide range of hardware from low-power MCUs to major OS supported systemsCan use virtually any communication layerPromotes structured data that is easy to use and handleThe Kaa server can be scaled up to handle millions of connected devices

11/12/2016Debasis Das OSI 201687

In ConclusionLike most new technologies things are in a fluxAs with such evolving technologies, there are several proprietary tools available to be followed by open-source onesThere are enough free source tools to get started with development projects11/12/2016Debasis Das OSI 201688

Internet of ThingsThis is an evolving technology, also known as Internet of Everything. Evolved from what used to be known as M2MThe industrial section of the applications are being hailed as the 4th industrial revolution11/12/2016Debasis Das OSI 201689

Dimensions of the Complex IoT Eco-system (by 2020)Sensors: 212 bn; location, motion, chemical, light, heat, soundDevices: 50 bn: smartphones, wearables, automobiles, domesticNetworks: 2.5 bn, Blu-tooth, NFC, Wi-fi, etc. connections accessing 4G/LTE networks11/12/2016Debasis Das OSI 201690

Dimensions of the Complex IoT Eco-system (by 2020) ContdAPIs: 75%, fortune 1000 companies will offer public APIs by end 2014, billing, mapping, social, search, marketing, etc.APPs: 4.4 bn, number of app users by 2017, touch interfaces, gesture tracking, augmented reality, voice recognition, etc.Data:16 ExaBytes, mobile data traffic per month by end 2014, user data, transaction data, field data, inventory data, performance data, etc.11/12/2016Debasis Das OSI 201691

Gartner StudyBy 202025 billion devices are going to be connectedCausing a $7 trillion opportunity for businesses11/12/2016Debasis Das OSI 201692

Industry 4.0 OpportunityIIoT could be $531 billion by 2020 through opportunities like Connected asset management, connected worker and other never-before opportunity that developsWhat customer may wantOperational efficiencyMove away from product oriented business focus to service oriented focusUnconventional revenuesFrom a recent presentation by Accenture

11/12/2016Debasis Das OSI 201693

Sensors & ActuatorsSensors help measuring things and help decide what is the current status of the environment to be controlledActuators help actuate the controls that can change these variables in the environment, when necessaryThe direction of control, the amount of control, the time for which it has to be turned on, etc. are derived from analyzing the sensory inputs. The analysis will be carried out at a processor that can be at different levels. Depending on the volume of data or the complexity of the control scenario, resources in the cloud could be used too.

11/12/2016Debasis Das OSI 201694

Sensors11/12/2016Debasis Das OSI 201695

A Sensor Node (mote)Courtesy WikipediaAsensor node, also known as amote(North America), is a node in asensor networkthat is capable of performing some processing, gathering sensory information and communicating with other connected nodes in the networkAwireless sensor network (WSN)(sometimes called awireless sensor and actor networkWSAN) are spatially distributedautonomous sensors tomonitorphysical or environmental conditions such astemperature, sound, pressure, etc. and to cooperatively pass their data through the network to a central location. The more modern networks are bi-directional, also enablingcontrolof sensor activity.11/12/2016Debasis Das OSI 201696

WSN/Mote example 111/12/2016Debasis Das OSI 201697

Typical I/O Configuration of Zolertia z111/12/2016Debasis Das OSI 201698

Mote/WSN example 211/12/2016Debasis Das OSI 201699

WSN/Mote example 311/12/2016Debasis Das OSI 2016100

Mote on a Chip11/12/2016Debasis Das OSI 2016101

Sensor Network CharacteristicsCourtesy WikipediaThe WSN is built of "nodes; from a few to several hundreds or even thousands, where each node is connected to one (or sometimes several) sensors. Each such sensor network node has typically Aradio transceiver with an internalantenna or an external oneAMicrocontroller for interfacing with the sensors and an energy source, usually abattery or an embedded form ofenergy harvesting11/12/2016Debasis Das OSI 2016102

Sensor Network Characteristics- contdThe cost of sensor nodes is variable, ranging from a few to hundreds of dollars, depending on the complexity of the individual sensor nodes Size and cost constraints on sensor nodes result in corresponding constraints on resources such as energy, memory, computational speed and communications bandwidthThe topology of the WSNs can vary from a simplestar to an multi-hop mesh The propagation technique between the hops of the network can berouting or flooding

11/12/2016Debasis Das OSI 2016103

Architecture of a Mote11/12/2016Debasis Das OSI 2016104MemoryPowerSupplyunitMicro-processorSensor 2Sensor 1ADC

Transceiver

Multi-hop Sensor Network Architecture11/12/2016Debasis Das OSI 2016105

WSN HardwareA WSN has a low cost and small/tiny in sizeInherent to sensor network adoption is the use of low power methods for radio communication and data acquisition.A WSN usually communicates with alocal area network orwide area network through a gateway. The Gateway acts as a bridge between the WSN and the other network This enables data to be stored and processed by devices with more resources in a remote server for example

11/12/2016Debasis Das OSI 2016106

WSN SoftwareWSNs may be deployed in large numbers in various environments, including remote and hostile regions, where ad hoc communications are a key component. Usually energy availability is constrained.Algorithms and protocols need to address the following issuesIncreased lifespanRobustness and fault toleranceSelf-configurationTo conserve power, wireless sensor nodes normally power off both the radio transmitter and the radio receiver when not in use in a sleep mode often

11/12/2016Debasis Das OSI 2016107

WSN OSThese are typically less complex than general-purpose operating systems. Strongly resemble embedded systemsThese networks are typically deployed in a specific situation than a general purpose useNeed for low costs and low power dictates low-power microcontrollers and thus ruling out mechanisms such as virtual memoryEmbedded operating systems such aseCos or uC/OS could be usedTiny OS is one of the first operating systems specifically designed for wireless sensor networks. TinyOS has event driven programming rather than multi-threading

11/12/2016Debasis Das OSI 2016108

WSN OS contdTinyOS programs are composed ofevent handlersandtasksthat run-to-completion. When an external event occurs, such as an incoming data packet or a sensor reading, TinyOS signals the appropriate event handler to handle the event. Event handlers can post tasks that are scheduled by the TinyOS kernel some time later.LiteOS is a more recent OS for wireless sensor networks, which provides UNIX-like abstraction and support for the C programming language.Contiki is an OS supports C and communication advances like the 6LowPAN and Protothreads

11/12/2016Debasis Das OSI 2016109

Online Collaborative Sensor Data Management PlatformsOnline collaborative sensor data management platforms are on-line database services that allow sensor owners to register and connect their devices to feed data into an online database for storage.Developers are able to access the database and build applicationsXively and Wikisensing are examplesThese platforms simplify online collaboration between users over diverse data sets

11/12/2016Debasis Das OSI 2016110

Data Management Platforms-ContdDatasets may range from energy and environment data to that collected from transport services. Other services include allowing developers to embed real-time graphs & widgets in websites; analyze and process historical data pulled from the data feeds; send real-time alerts from any data-stream to control scripts, devices and environments.The architecture of the Wikisensing lets users to include APIs and interfaces for online collaborators, a middleware containing the business logic needed for the sensor data management and processing and a storage model suitable for the efficient storage and retrieval of large volumes of data.

11/12/2016Debasis Das OSI 2016111

Xively-What It Can DoCreate innovative connected objects using any software/hardware combinationFree, open and supported libraries are provided along with tutorials and documentation to allow you to connect to Xively using the hardware you want and the languages you know. New hardware platforms are being added from a variety of vendors. The libraries leverage standards-based API over MQTT, WebSockets and HTTP to make connecting to the Internet of Things simple, intuitive and fast.

11/12/2016Debasis Das OSI 2016112

Xively Connectivity11/12/2016Debasis Das OSI 2016113HardwareActuatorsSensorsGateways

Xively CapabilitiesConnectIoT connectivity needs to be fast, secure and scalable. Xively connects millions of devices You can control access for every person, application, or thing trying to access your IoT data and plug directly into cloud-based services your business departments rely on for daily workflows.ManageAllows capturing, managing and interpreting business informationXively manages connected product business in one location by providing standard methods for defining and managing connected device users, employees, customers, partners and their data.

11/12/2016Debasis Das OSI 2016114

Xively Capabilities-ContdEngageIoT enabled devices are making support and engagement with customers more satisfying, efficient and instantXively provides a single interface for your real-time product deployment lifecycle as well as product usage and healthIt is then possible for the sales and marketing teams to identify cross-sell and up-sell opportunitiesService teams can remotely access and fix connected products in real-time

11/12/2016Debasis Das OSI 2016115

WikisensingWikiSensing is a sensor data management platformDeveloped by the Discovery Sciences Group, Department of computing, Imperial College, LondonWikiSensing runs on top of IC Cloud, the group's cloud computing infrastructure.11/12/2016Debasis Das OSI 2016116

Wikisensing API CapabilitiesA set of RESTful web services, and makes use of the POST, GET and DELETE methods of the HTTP protocol.A user first needs to register to the platform and get a unique service API key to be able to send dataThen the user can register new sensors (and their metadata) and add data to sensors that are under his/her service key.To retrieve and query data a user must use service keys. Sensors that are public have their service key prefixed withPublic_and can be retrieved using the APIUsers can use the API to query the sensor data of a sensor to get the latest data, data submitted after a particular timestamp, and data that matches specific values in one or two fields.A user can delete their sensors and their data using the corresponding web service.

11/12/2016Debasis Das OSI 2016117

Wikisensing contdSample Code is available for Test suite source code in C# Script for getting data from Wikisensing in PythonSample Application is available for viewing a live deployment of a node sensor grid monitoring office temperature, humidity and lightingData FormatsWikisensing accepts data in XML or JSON formats. Sample for XML and JSON requests and responses for each function of the web service API is providedThe content of a request must match the required structure of the corresponding XML or JSON file.

11/12/2016Debasis Das OSI 2016118

Simulation of WSNsAgent-based modeling and simulation allows the simulation of complex behavior of wireless sensors (such as flocking)Network simulators likeOPNET, NetSim and used to simulate a wireless sensor networkFree source Cooja is another tool that lets a WSN be simulated

11/12/2016Debasis Das OSI 2016119

Processors11/12/2016Debasis Das OSI 2016120

Development Tools11/12/2016Debasis Das OSI 2016121

Raspberry Pi11/12/2016Debasis Das OSI 2016122

Raspberry Pi OptionsStandard models for use as development systemsFor developing embedded applications. Includes Compute IO board, compute module, display and camera adapterCustomized boards in large scale can be ordered for production use11/12/2016Debasis Das OSI 2016123

123

Arduino (Arduino for IoT applications)11/12/2016Debasis Das OSI 2016124

Arduino OptionsFree source hardware, can be replicated at will for production needsCan be combined with other boards to configure a system for specific useFree source software, Linux based ones, are available.

11/12/2016Debasis Das OSI 2016125

Intel Galileo11/12/2016Debasis Das OSI 2016126

Galileo OptionsOffers a development kitGalileo development kitGrove sensor kitLicense to Wind River Intelligent device Platform XTSoftware support for development, integration and deployment of IoT gatewaysProvides connectivity, management and security

11/12/2016Debasis Das OSI 2016127

ConnectivityA range of networking options that can save development time & costValidated and flexible firmware provides an extensive network of connectivity choices. PAN, LAN, and WAN network accesses as well as a wide range of modem support11/12/2016Debasis Das OSI 2016128

Management FeaturesPlatform customization capabilities available. Helps stretch the product life and uptime, helps reduce development timeLong-term secure remote manageability features help simplify deployment, maintenance, and management of remote devices.

11/12/2016Debasis Das OSI 2016129

Security featuresProtection for critical data across your device networkSecure image, data, and management is supportedEncrypted communication is provided between the cloud-based console and devices.Device resources management limits exposure to untrusted applications.

11/12/2016Debasis Das OSI 2016130

Whole Range of Microprocessors8 bit to 64 bit architecturesWhole range of power consumption ratingsCustom hardware design and development takes skills & experience11/12/2016Debasis Das OSI 2016131

Programming SDKs (AWS)

11/12/2016Debasis Das OSI 2016132

Azure IoT Suite

11/12/2016Debasis Das OSI 2016133

A Looming ProblemDeployment of solutions using large number of connected devices, that uses this tiny processors is set to blow upA large number of skilled resources will be requiredTrying to take care of all the support functions that are fairly standard could a tough demandItll be nice if things like GUIs, network connectivity, touch sensor and other device configurations could be taken care of by the development tools in the form of a platform11/12/2016Debasis Das OSI 2016134

Mobile Development ScenarioDevelopers are able to concentrate on the app logic and implementation, not the routine stuff like establishing a call etc.These apps are at a higher level and need not concern with hardware nitty grittyMicroprocessor based development can take a page out of that scenario and get the development work done on platforms like the mobile situationThis has started happening

11/12/2016Debasis Das OSI 2016135

Synergy Development PlatformSynergy was released by Renesas in Oct this yearSupports a family of processors, so that when an upgraded member is used, the firmware upgrade is minimalDevelopers need not be skilled in every specific device to be used.

11/12/2016Debasis Das OSI 2016136

Synergy Architecture(Courtesy Renesas)11/12/2016Debasis Das OSI 2016137

SysDK Platform from Mentor GraphicsPlatform development solutions help close the gap between design complexity and available design talentMentors customizable gateway is offered as the SysDK product that take care of end to end solution developmentIncudes a hardware reference design and associated software that support bidirectional wireless communication is offeredCommunicates with motes on one edge and the cloud on the other edge11/12/2016Debasis Das OSI 2016138

SysDK Block Diagram(Courtesy mentor Graphics)

11/12/2016Debasis Das OSI 2016139

SysDK ResourcesFreescales iMX6 (ARM Cortex-A9 based) processorEthernet, 802.15.4, Wi-Fi, BLEMentors Nucleus RTOS/ Mentors embedded LinuxSecurity based on ARMs TrustZone security architecture at the device level along with Icon Labs Floodgate for McAfees EPO (ePolicy Orchastrator) at the RTOS and Enterprise level11/12/2016Debasis Das OSI 2016140

SysDK Hardware Reference Design

11/12/2016Debasis Das OSI 2016141

End-to-End Security

11/12/2016Debasis Das OSI 2016142

Intels IoT PlatformDevelopment support provided include Security:Helps deliver trusted data with a tight integration of hardware- and software-based securityInteroperability:Utilize technologies that seamlessly communicate to one another, help accelerate time to market, and reduce the cost of deploying and maintaining IoT solutions.Scalability:Whole range of processor capability provided to scale performance based on application need (Quark, Xeon and others) Manageability:Helps advanced data management and analytics from sensor to datacenter.

11/12/2016Debasis Das OSI 2016143

Wind River Edge ManagementIt connects machines and devicesHelps manage and collect machine generated dataCustomers can easily aggregate data off the edgeCan help offer business intelligenceTo protect investmentsGenerate new revenue streamsMaximize existing infrastructureImprove business processes. 11/12/2016Debasis Das OSI 2016144

Why ContikiOpen Source software : can be used for commercial as well as non-commercial projectsIt runs on a range of low-power wireless devicesIncorporates Internet standard communication protocols like the RPL, CoAP, 6LowPANRapid development: Writing software in standard C and the ability to emulate sensor network in Cooja makes for fast developmentCommercial as well as community support available11/12/2016Debasis Das OSI 2016145

Contiki FeaturesDesigned for tiny system, allocates memory through multiple mechanismsmemb: memory block allocation, mmem: managed memory allocation and malloc: the standard C memory allocation methodFull IPv6 networking support: UDP, TCP and HTTP as well as low power standards 6LowPAN, CoAP and RPLPower awareness: Has mechanisms for estimating power consumption and where the power gets spent11/12/2016Debasis Das OSI 2016146

Contiki Features- ContdDynamic module loading and run-time linkingMany programming example are providedCooja: creates a simulation environment, helpful in development and debug situationSupports sleepy routers, routers or relay nodesWide ranging hardware platforms supported that include 8051, MSP 430, AVR and ARM devices11/12/2016Debasis Das OSI 2016147

Instant ContikiEntire development system that can be downloaded straightIt is a UBUNTU Linux virtual machine, runs in VMWare player + development tools, compilers and simulatorsDownload the instant version, install the VMWare player and boot up the instant Contiki11/12/2016Debasis Das OSI 2016148

The Development Process11/12/2016Debasis Das OSI 2016149DownloadInstant ContikiInstallVM PlayerBootUbuntuLog-inStartCoojaOpen aTerminal windowSpecify Application C source fileFind ContikiApplicationCreate new mote tupesAdd motes In the simulationSet simulationoptionsCreate asimulationStartsimulationCompile ContikiAnd applicationCreate aMote typeAdd the motesAdd motes to simulationSimulationDone!

Contiki on The Target HardwareConnect hardware (Zolertia Z1 mote) connected via USB of the development PC. Enable the mote through VMWare player (Removable Devices menu)Open a terminal and cd to examples directoryCompile Contiki + z1 examplemake TARGET=z1 hello worldmake TARGET=z1 savetarget, saves the choice for future compilationsmake hello-world.upload will upload to code to the targetMake the serial port on the mote ready to display output withmake login

11/12/2016Debasis Das OSI 2016150

Contiki on The Target Hardware ContdIf you reset the button on the mote, you should seeRime started with address 1.1MAC 01:01: 00:00:00:00:00:00 Contiki-2.6 started. Node id is set to 257.CSMAContikiMAC, channel check rate 8 Hz, radio channel 26Starting Hello world processHello, worldIf you upload broadcast-example from contiki/examples/ipv6/simple-udp-rpl/ to two devices, it will be possible to observe them sending low-power IPv6/UDP message to each other11/12/2016Debasis Das OSI 2016151

RIOTAn OS designed specifically for the Internet of thingsWell suited for lightweight (1.5 KB RAM) sensor with 8 bit uC devices to 32 bit devices with sophisticated hardwareDesigned for hardware with minimal resources but easy to developProgramming in C, C++Multi-threading and real-time features 11/12/2016Debasis Das OSI 2016152

RIOT Design Features of InterestRIOT enforces constant periods for kernel tasks (e.g., scheduler run, inter-process communication, timer operations)Static memory allocation in the kernel. Dynamic memory management is provided for applications. A scheduler that works without any periodic events. Whenever there are no pending tasks, RIOT will switch to the idle thread, which determines the deepest possible sleep modeOnly interrupts (external or kernel generated) wake up the system Low complexity of kernel functions makes for energy efficiency of an OS. The duration and occurrence of context switching are minimized. Two cases: (i) a corresponding kernel operation itself is called, e.g., a mutex locking or creation of a new thread, or (ii) an interrupt causes a thread switch. 11/12/2016Debasis Das OSI 2016153

TinyOSPower efficient, Put microcontroller and radio to sleepSmall memory footprint, Non-preemptable FIFO task schedulingEfficient modularity, Function call (event and command) interface between commandsApplication specific, WSN domainConcurrency-intensive operation, Event-driven architecture, No user/kernel boundaryNesC for programming

11/12/2016Debasis Das OSI 2016154

Brillo & WeaveIntroduced last year, an OS and communication language for IoT devicesBrillo is Android based light-weight (polished down) OS for IoT devicesWeave is an application layer protocol that facilitates Interacting with devicesComes with developer tools like CLI and developers console

11/12/2016Debasis Das OSI 2016155

Expectations from Devices

11/12/2016Debasis Das OSI 2016156

Weave Interconnects Users and Devices

11/12/2016Debasis Das OSI 2016157

Brillo Devices

11/12/2016Debasis Das OSI 2016158

Brillo OS11/12/2016Debasis Das OSI 2016159Android based (polished down) OS, Weave support built-inLarge compatible hardware availabilityDeveloper kit provides easy OS configuration and device image buildingUpdates, metric and crash reporting

Building Connected DevicesIssues to focus onUtilize existing IoT platformDevelopers need to understand programming languages, sensors, drivers, middleware, OS, project management, security and encryption, networking protocols, etc. An IoT platform can take care of many of these issues so that developers can focus on the applicationUse third party software componentsDrivers and middleware development is time consuming. Better to go with components available for the complex micro-controllers of today11/12/2016Debasis Das OSI 2016160

Building Connected Devices contdUse proven communication standards onlyThings are fluid here. You could cover the bets by supporting everything. Building a product around a standard that may not be around in a few years time, is a risk designers cannot affordTake care of securitySpan of the network increase by orders of magnitude. Security thereby becomes very important.Leverage team strengths/optimize around thatStrengthening weaknesses in a team is time-consuming thereby affecting time to market. It is better to work around by using component or consultants

11/12/2016Debasis Das OSI 2016161

Controlling a Raspberry Pi via the Internet11/12/2016Debasis Das OSI 2016162

QEMU EmulatorQEMU is a generic and open source machine emulator and virtualizer.QEMU (as an emulator) can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance.When used as a virtualizer, QEMU achieves near native performance by executing the guest code directly on the host CPU. QEMU supports virtualization when executing under the Xen hypervisorUsing the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86, server and embedded PowerPC, S390, 32-bit and 64-bit ARM, and MIPS guests.

11/12/2016Debasis Das OSI 2016163

Weaved (remot3.it)11/12/2016Debasis Das OSI 2016164A powerful, flexible and intelligent remote device management platformIt's calledremot3.it(remote-it) and delivers a host of new features that will make it easier to connect, manage and update remote devices The new remot3.it web UI makes it easier Built on top of Weaved features and services you've come to trust

Setting Up & Exercising Control11/12/2016Debasis Das OSI 2016165

Design Considerations for IoT Applications11/12/2016Debasis Das OSI 2016166

Development Check-list25% to 45% of product developments failPrototype again and againTest for user desireMaterials & costsEase of useHave a fix on production cost ( can make or break the product)Focus on software (firmware), make it robustMeet a need rather than produce gimmickryTest thoroughly, meet safety and other standards11/12/2016Debasis Das OSI 2016167

Development Cost Check-listElectronic design costsPrototyping costsFirmware development costsPlastic enclosureEnclosure prototype costsThe retail package design and developmentRetail package prototypeCertificationsManufacturingAll other related costs

11/12/2016Debasis Das OSI 2016168

ReferencesSensor Technologies: Healthcare, Wellness and Environmental Applications- McGrath, Michael; Ni Scanaill, Cliodhna, Apress. Kindle Edition. Designing the Internet of Things- Adrian McEwen, Hakim Cassimally, Wiley, 2014Getting Started with the Internet of Things Cuno Pfisterngs: Connecting Sensors and Microcontrollers to the Cloud, Maker Media, Inc. Kindle Edition.

11/12/2016Debasis Das OSI 2016169

ReferencesEclipse M2M Industry Work GroupM2M Portal: http//m2m.eclipse.orgTop 10 IoT Technologies for 2017 and 2018, Published: 22 January 2016Tutorial Globecom 2012, Anaheim, California, USA, 3 December 2012http://cnds.eecs.jacobs-university.de/

11/12/2016Debasis Das OSI 2016170

AcknowledgementId like to express by gratitude to following of my colleagues who put the demos togetherMr. Sourav Ganguly (no, not the cricket guy!)Mr. Satrajit DasMs. Somashree Bhadra11/12/2016Debasis Das OSI 2016171