Internet of Things


Published on

An introduction to Machine-to-Machine and the Internet of Things from an end-to-end perspective. Originally prepared for RheinJUG, the Java User Group in Düsseldorf, Germany, this set has a slight focus on Java.

Published in: Technology, Business
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Internet of Things

  1. 1. © Cumulocity GmbH 2013Internet of ThingsAn introduction
  2. 2. © Cumulocity GmbH 2013We would like you to …•  Understand Machine-to-Machine (M2M) and Internet of Things (IoT)in business environments.•  Learn about–  Java on M2M devices.–  Mobile M2M connectivity.–  Cloud services for M2M.•  Be inspired to invent!
  3. 3. © Cumulocity GmbH 2013AgendaApplicationMobilenetworkWhat?Why?Why now?2 45Embedded Device3Demo1
  4. 4. © Cumulocity GmbH 2013DemoVending OperatorConsumersRefiller
  5. 5. © Cumulocity GmbH 2013Why do you connect coffee machines?•  Operational improvements.–  Optimized workforce (pre-kitting, spare parts, route optimization).•  Additional revenue.–  Machines filled according to customer demand.–  Timely repair of broken or unavailable machines.–  Reduced fraud.•  Additional services.–  Cashless payment and vouchers.–  Advertising on the machine.–  Re-sell data to food vendors.
  6. 6. © Cumulocity GmbH 2013AgendaApplicationMobilenetworkWhat?Why?Why now?2 45Embedded Device3Demo1
  7. 7. © Cumulocity GmbH 2013TimeBespoke HW solutions+ HW device centric (customized)+ large Enterprises centric+ per device type offeringsGeneric Software solutions+ Software Products, incl. SaaS become mainstream+ Enterprises but increasingly SME driven market+ seldom used standards+ first eco-systems evolvingThe ‘Internet of Things’+ Data monetization, incl. ‘Big Data’+ More consumer driven market+ Devices and Server decoupled+ Easy MashupsWhat is M2M and Internet of Things (IoT)?TODAY ~2015Millions ofM2M DevicesBillions of Sensors100s of Millionof M2M DevicesM2M Internet of Things
  8. 8. © Cumulocity GmbH 2013Why is M2M and IoT happening now?Device CostsSoftwareas a ServiceApplicationCommunication Unit (Modem)CommunicationnetworkProcessing Unit (MCU)CommunicationCostsM2M>50k€ once>10€/month300-500€20€Closed ITToday5-20€/month>1€/month50-100€>8€à CloudIoT1-15€/month??20€>2€TCO/monthfor 2 yearsEnterpriseMindset
  9. 9. © Cumulocity GmbH 2013Why to use M2M in a business?#1 Business Process optimization#2 Introducing new Business Model#3 New Service Offering /New Revenue StreamsWhyM2M?
  10. 10. © Cumulocity GmbH 2013Why? #1 Business Process optimizationExamples: remote maintenance, logistical process improvements,smart city use casesBring Assets online, connect IT with the real worldEnterprise ITe.g. ERPDevicesAssetsMiddlewarelayere.g.CloudPlatformWideAreaNetworkOperations
  11. 11. © Cumulocity GmbH 2013Why? #2 Introducing new Business ModelExamples:cars, insurance (UBI), printing,coffee machine, machines, …DevicesAssetsMiddlewarelayere.g.CloudPlatformWideAreaNetworkOperationsBilling,CRMInvoiceusage &event basedpricing
  12. 12. © Cumulocity GmbH 2013Why? #3 New Service Offering/Revenue Streams DevicesSensorsMiddlewarelayere.g.CloudPlatformWideAreaNetworkData MonetizationExample:•  Telematics Traffic Data•  Voucher Redemption DataNew ServicesExample:•  eCall•  Advertising billboard
  13. 13. © Cumulocity GmbH 2013How are the billion devices connected?Focus120 Millions Connections(Wide area fixed, MAN)2,400 Millions Connections(Bluetooth, ZigBee, RFID, etc)820 Millions Connections(2G, 3G, 4G, Satellite)Short range Mobile Fixed2G3G4GM2M opportunity 2015: around 3.3 billion connectionsSource: Machina, M2M Global Forecast & Analysis 2010-20, October 2011
  14. 14. © Cumulocity GmbH 2013AgendaApplicationMobilenetworkWhat?Why?Why now?2 45Embedded Device3Demo1
  15. 15. © Cumulocity GmbH 2013How do you build connected assets?What do you need?•  Asset to equip (room, car, machine, …).•  Sensors and controls (temperature, accelerometer, switch, …).•  Sensor network (cable, serial, ZigBee, WiFi, …).•  Embedded/local processing (microcontroller, embedded PC).•  (Mobile) internet connectivity (GPRS modem & SIM, DSL, …).
  16. 16. © Cumulocity GmbH 2013Sensor network architectureExample:•  Home automation sensors (temperature,power, switches, …).•  Short range radio: Z-Wave/ITU, ZigBee/IEEE, Enocean, …•  M2M gateway.
  17. 17. © Cumulocity GmbH 2013Sensor network architectureExample:•  ECG, blood sugar.•  Bluetooth.•  Mobile phone as gateway.
  18. 18. © Cumulocity GmbH 2013Sensor network architectureExamples:•  Pressure sensor.•  RS232 connection.•  M2M modem.
  19. 19. © Cumulocity GmbH 2013Sensor network architectureExample: Hobbyist kits•  Light sensor.•  GPIO.•  GBoard (Arduino with on-board modem) & shields,Raspberry Pi & PiFace.
  20. 20. © Cumulocity GmbH 2013Programming at sensor network level•  “Barebone” (e.g., Arduino, C/C++, assembly).•  Embedded OS (QNX, RTX).•  Java ME, Android.•  Standard OS plus Java SE Embedded (OSGi, Python, Lua, …).•  Convenient, portable and widely known environments like Jave ME orSE run today on devices < €30.•  Microcontrollers become niche for hard real-time or extremely cost-sensitive areas.
  21. 21. © Cumulocity GmbH 2013Java Embedded variantsJava versions for embedded/headless devices:•  Java ME Embedded: CLDC, > 120 KB.•  Java ME Embedded Client: CDC, > 1 MB.•  Java SE Embedded: Java SE, > 32 MB.
  22. 22. © Cumulocity GmbH 2013Java ME Embedded stack•  CLDC (“Connected Limited Device Configuration”).–  Barebone Java, selected java.lang, java.util and limited IO.•  IMP-NG (“Information Module Profile – Next Generation”).–  “MIDP – UI”.–  “IMlets” == Midlet.•  Optional APIs depending on device implementation.
  23. 23. © Cumulocity GmbH 2013Useful optional Java ME APIs•  JSR120 (Wireless Messaging): SMS/MMS.•  JSR179 (Location): Coordinates and locations.•  JSR256 (Mobile Sensor): Generic sensor access.•  Oracle Device Access: GPIO, I2C, UART, AD/DA, AT commands, …•  Oracle Application Management Software: Install/remove IMlets.
  24. 24. © Cumulocity GmbH 2013Java ME Embedded for the Raspberry PiDevice:•  Raspberry Pi + SD card + USB power.•  Check jumpers (JP1 & JP2 = 0).•  Install Raspbian image (hard float), Java ME Embedded 3.3 EA.•  Edit permissions for development and run.PC:•  IDE + ME Plugins + (Windows-only) SDK, discover SDK in IDE.•  Eclipse Manifest bug: IMP-NG-2.0 => IMP-NG, restart.Develop …
  25. 25. © Cumulocity GmbH 2013Java SE Embedded for the Raspberry PiDevice:•  Add PiFace, activate SPI kernel module.•  Install Java SE Embedded 8 EA.•  Install pi4j (Java & WiringPi native libraries).PC:•  Your standard installation on all OS.Develop …
  26. 26. © Cumulocity GmbH 2013ME vs SEBenefits of Java ME Embedded:•  Small footprint.•  Design for embedded/remote development, decouple hardware andsoftware development (simulator).•  Device-neutral APIs (JCP or Oracle).Benefits of Java SE Embedded:•  State-of-the-art language features.•  Huge user base of Java SE (tooling, libs).
  27. 27. © Cumulocity GmbH 2013Outlook•  Closer convergence of Java ME Embedded and Java SE Embeddedwith Java 8.
  28. 28. © Cumulocity GmbH 2013Sending data to the cloud•  Modem controlled usually through AT commands over serial line.•  ~200 commands standardized in ETSI & 3GPP (ref. here).•  Usual dialog (e.g., Kontron M2MSSDK, followed by PPP):ATZ  OK  AT+CPIN?  +CPIN:  SIM  PIN  AT+CPIN="<pin>"  OK    AT+CGDCONT=1,"IP","<apn>"  ATDT*99#    Reset modem to default parametersCheck if SIM is locked(READY, SIM PUK, SIM PIN2, …)Unlock SIM(Cannot be unlocked multiple times)Set APN to be usedDialup to the network
  29. 29. © Cumulocity GmbH 2013AT+CMGS="+4915155153908",145  Hi  JUG!  [Ctrl=z]  OK  Sending SMSOr JSR205 (Wireless Messaging API):MessageConnection  conn  =    (MessageConnection)"sms://+4915155153908");  TextMessage  msg  =    (TextMessage)conn.newMessage(MessageConnection.TEXT_MESSAGE);    msg.setPayloadText("Hi  JUG!");  conn.send(msg);    Send SMS (145 = MSISDN)Text on the next lineEnd of text (Java = (char)26
  30. 30. © Cumulocity GmbH 2013ShortcutsOr proprietary extensions and convenience libraries, e.g., dialup fromJ2ME on a Cinterion EGS5/5x:new    send("AT^SJNET="gprs","<apn>","",""rn");    
  31. 31. © Cumulocity GmbH 2013Practicalities•  Most M2M SIMs have no PIN, most M2M APNs have no username orpassword (because there’s no one to type it in).•  Use an M2M APN with your M2M SIM card.
  32. 32. © Cumulocity GmbH 2013Practicalities with SMSSMS could be used for sending data to devices. However,•  May be optional or restricted in M2M SIMs.•  Too expensive for regular communication.•  Security: Don’t send data to devices, just send them a wakeup.Vodafone GDSP example:•  M2M SIMs have no MSISDN.•  WebServices API for sending SMS to device.
  33. 33. © Cumulocity GmbH 2013From development to production•  Development and small numbers: Development boards.–  Multiple sensor network connectivity options.–  Good processing power, memory, …–  Larger, more expensive (~ 100-700 Euro).•  Production use: Custom production hardware.–  Only required sensor network option, processing, memory, …–  Housing, adaptation to environmental conditions (temperature,outdoors/indoors).–  Size and cost optimization.
  34. 34. © Cumulocity GmbH 2013AgendaApplicationMobilenetworkWhat?Why?Why now?2 45Embedded Device3Demo1
  35. 35. © Cumulocity GmbH 2013ConnectivityDeviceServer ApplicationEmbedded SoftwareCommunicationnetworkHow to do it over a mobile network?Common MythsStandards
  36. 36. © Cumulocity GmbH 2013Why is M2M different from your personal phone?Mobile Phone M2MUser Person MachineSale B2C, B2B B2BPayment Pre-pay, Post-pay DiverseActivation At point of sale VariedSupport User calls helpdesk Transparent self-helpARPU 10-20 EUR >1 EUROperators provide a M2M specificService Portal!!
  37. 37. © Cumulocity GmbH 2013DeviceMiddleware LayerCloud PlatformYour Device SoftwareM2M Service PortalSmart AgentCommunicationnetworkYour Device SoftwareHow do typical mobile M2M Solutions look like?
  38. 38. © Cumulocity GmbH 2013M2M Service PortalReduce your provisioning and support effort.Based on our experience,you might want to check for:§  Are APIs is available?§  Is mass subscriptionprovisioning efficient?§  Are lifecycle events available?§  How easily can problems beidentified to be on operator side?
  39. 39. © Cumulocity GmbH 2013Example: M2M Service Portal features
  40. 40. © Cumulocity GmbH 2013What else needs to be considered?Other selections to make:•  SIM card•  IP Connectivity/VPN/IPSec•  Roaming / Countries
  41. 41. © Cumulocity GmbH 2013Myths #1: The “thing” must be a serverIPSO Power Controlc’t 09/13, p.98
  42. 42. © Cumulocity GmbH 2013Myths #1: The “thing” must be a serverDevice is Server Device is ClientSecurity Very High Risk No open port => lowerOptimal for Actuators SensorsData sharing By device(not in mobile!)By serverData Access& ScalingDifficult toimpossibleEasy and cheapAddressing Static IP Dynamic & Private IPConsequence Requires VPN Requires Device Push
  43. 43. © Cumulocity GmbH 2013Myths #2: IoT requires IPv6RFID und IPv6 als WegbereiterDie Grundlage dafür [vernetzte Geräte] hat unter anderem IPv6 geschaffen.c’t 09/13Our viewIPv6 neither needed nor really speeding upprojects. Assuming that devices are clients(and not server)
  44. 44. © Cumulocity GmbH 2013Myths #3: Long polling will not workLong polling(LP) counterargumentsReality Why?LP drainsbatteryLimited Check 2G/3G IdleStateLP is expensiveto keep aliveVery LimitedAnd provides availability2880 pings / month(every 15 min)LP is slow No, its faster No TCP connectionsetupProblem: How to control actuators if devices have private/dynamic IP addresses?Answer: Long Polling, open TCP connection and keep it open using keep-alive ping.Server sends control commands when these are available.
  45. 45. © Cumulocity GmbH 2013Standards, here: device to serverThe nice thing about standards is that you have so many to choose from.Andrew Tanenbaum, Computer Networks, 2nd ed., p. 254Layer ETSI IPSO/CoAP(n/a ?)M3DA MQTTPayload Defined, XML Defined, Text Partially,Binaryn/aStyle RESTful RESTful ? MessagingApplicationLayerHTTP/SSL,CoAPHTTP/SSL,CoAPM3DA MQTT, SSLoptionalTransportLayerTCP UDP TCP, UDP,HTTPTCPInternetLayerIP IP IP IP
  46. 46. © Cumulocity GmbH 2013AgendaApplicationMobilenetworkWhat?Why?Why now?2 45Embedded Device3Demo1
  47. 47. © Cumulocity GmbH 2013Developing M2M applications todayBespoke development from device to application.•  Custom hardware.•  Proprietary protocol.•  Own server-side and web application.Main issues•  Cost, competence, complexity, risk: Building an M2M solution touchesabout all aspects of IT.•  No scale, no ecosystem: Application only for device, device only forthe application.
  48. 48. © Cumulocity GmbH 2013The case for a generic M2M cloud platform•  Most companies want to focus:–  Business processes and services (enterprises).–  Hardware and embedded software (device manufacturers).–  Web apps and server-side (application developers).•  A cloud platform helps companies–  to make M2M affordable–  to excel in their domain.
  49. 49. © Cumulocity GmbH 2013Examples of generic M2M platformsDevice vendors•  Eurotech Everyware Device Cloud.•  Sierra Wireless AirVantage M2M Cloud.•  Etherios Device Cloud (was Digi iDigi).Pure software vendors•  LogMeIn Xively (was Cosm, was Pachube).•  Axeda M2M Platform.•  ThingWorx.•  Cumulocity Conduct.
  50. 50. © Cumulocity GmbH 2013Examples of generic M2M platformsFull bundles: Deutsche Telekom M2M Developer Platform.
  51. 51. © Cumulocity GmbH 2013What do you get?Mileage varies, but typical functionality is:•  Agent concept for connecting device to server.•  Device management (SW/FW, configuration, faults, availability).•  Storage for sensor data.•  Rules resp. complex event processing.•  APIs for development.•  Hosting (some).•  Device independence (few!!).Check what you need.
  52. 52. © Cumulocity GmbH 2013Example: Cumulocity•  Cloud scaling.•  Full multi-tenancy.•  Mobile enabled.•  REST & HTTPS everywhere, open APIs.•  Assets vs devices.•  Decoupling of devices and applications, sensor library.
  53. 53. © Cumulocity GmbH 2013Summary•  Java Embedded (ME/SE) is great for device development.•  Building M2M solutions will get simpler and simpler.–  Pluggable device platforms like Raspberry Pi and Arduino.–  Cheap connectivity.–  Transparent cloud software platforms.–  Bundles of all.•  Thousands of use cases haven’t been thought of yet: Get a kit andinvent!