Internet of things basics
-
Upload
cumulocity -
Category
Internet
-
view
344 -
download
11
description
Transcript of Internet of things basics
© Cumulocity GmbH 2014
Internet of ThingsAn introduction
© Cumulocity GmbH 2014
We would like you to …• Understand Machine-to-Machine (M2M) and Internet of
Things (IoT) in business environments.• Learn about
– How to build IoT devices.– How to connect IoT devices.– How to build IoT applications.
• Be inspired to invent!
© Cumulocity GmbH 2014
Agenda
Application
Mobilenetwork
What?Why?
Why now?
2 4
5
Embedded Device3
Demo1
© Cumulocity GmbH 2014
Demo
© Cumulocity GmbH 2014
Why do you connect coffee machines?• Operational improvements.
– Optimized workforce (pre-kitting, spare parts, route optimization).– Machines filled according to customer demand. – Timely repair of broken or unavailable machines.– Reduced fraud.
• New business models.– Revenue share.– Service-level agreements.
• New service offerings, new revenue streams.– Cashless payment and vouchers.– Advertising on the machine.– Re-sell data to food vendors.
Regu
latio
n: A
ccou
ntab
ility.
© Cumulocity GmbH 2014
Agenda
Application
Mobilenetwork
What?Why?
Why now?
2 4
5
Embedded Device3
Demo1
© Cumulocity GmbH 2014
Time
Bespoke HW solutions+ HW device centric (customized)+ large Enterprises centric+ per device type offerings
Generic Software solutions+ Software Products, incl. SaaS become mainstream+ Enterprises but increasingly SME driven market+ seldom used standards+ first eco-systems evolving
The ‘Internet of Things’+ Data monetization, incl. ‘Big Data’+ More consumer driven market+ Devices and Server decoupled+ Easy Mashups
What is M2M and Internet of Things (IoT)?
TODAY ~2016
Millions of M2M
Devices
Billions of Sensors
100s of Million of M2M Devices
M2M Internet of Things
© Cumulocity GmbH 2014
Why is M2M and IoT happening now?
Device Costs
Softwareas a ServiceApplication
Communication Unit (Modem)
Communication
network
Processing Unit (MCU)
CommunicationCosts
M2M
1 x >50k€
>10€/month
300-1000€
20€
Closed IT
Today
5-20€/month
>1€/month
100-500€
>10€
Cloud
IoT
1-15€/month
<< 1€/month
< 100€
>2€TCO/monthfor 2 years
EnterpriseMindset
© Cumulocity GmbH 2014
Why to use M2M in a business?
#1 Business Process optimization
#2 Introducing new Business Model
#3 New Service Offering / New Revenue Streams
Why M2M?
© Cumulocity GmbH 2014
Examples: remote maintenance, logistical process improvements, smart city use cases
Bring assets online, connect IT with the real world
Enterprise IT e.g. ERP
DevicesAssets
Mid
dlew
are
laye
r e.
g. C
loud
Pla
tfor
mWideArea
Network
Operations
Why? #1 Business process optimization
© Cumulocity GmbH 2014
Examples: cars, insurance (UBI), printing,coffee machine, machines, …
DevicesAssets
Mid
dlew
are
laye
r e.
g. C
loud
Pla
tfor
mWideArea
Network
Operations
Billing,CRM
Invoice
Usage- & event-based pricing
Why? #2 Introducing new business model
© Cumulocity GmbH 2014
DevicesSensors
Mid
dlew
are
laye
r e.
g. C
loud
Pla
tfor
mWideArea
Network
Data MonetizationExample:• Telematics Traffic Data• Voucher Redemption Data
New ServicesExample:• eCall• Advertising billboard
Why? #3 New service offering/revenue streams
© Cumulocity GmbH 2014
How are the billion devices connected?
Focus
120 Millions Connections (Wide area fixed, MAN)
2,400 Millions Connections (Bluetooth, ZigBee, RFID, etc)
820 Millions Connections (2G, 3G, 4G, Satellite)
Short range Mobile Fixed
2G
3G4G
M2M opportunity 2015: around 3.3 billion connections
Source: Machina, M2M Global Forecast & Analysis 2010-20, October 2011
© Cumulocity GmbH 2014
Agenda
Application
Mobilenetwork
What?Why?
Why now?
2 4
5
Embedded Device3
Demo1
© Cumulocity GmbH 2014
Demo
© Cumulocity GmbH 2014
How 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, …).
© Cumulocity GmbH 2014
Sensor network architectureExample:• Home automation sensors
(temperature, power, switches, …).• Short range radio: Z-Wave/ITU,
ZigBee/IEEE, Enocean, …• M2M gateway.
© Cumulocity GmbH 2014
Sensor network architectureExample:• ECG, blood sugar.• Bluetooth.• Mobile phone as gateway.
© Cumulocity GmbH 2014
Sensor network architectureExamples:• Pressure sensor.• RS232 connection.• M2M modem.
© Cumulocity GmbH 2014
Sensor network architectureExample: Hobbyist kits• Light sensor.• GPIO.• GBoard (Arduino with on-board modem) & shields,
Raspberry Pi & PiFace, Tessel.
© Cumulocity GmbH 2014
Programming at sensor network level• “Barebone” (e.g., Arduino, C/C++, assembly).• Embedded OS (QNX, RTX, OpenAT, AppZone).• Java ME, Android.• Standard OS plus Java SE Embedded (OSGi, Python, Lua, …).
• Convenient, portable and widely known environments like Java ME or SE run today on devices < €30.
• Barebone microcontrollers mainly for– Hard real-time.– Cost-sensitive.– Battery-sensitive.
© Cumulocity GmbH 2014
From 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.
© Cumulocity GmbH 2014
Agenda
Application
Mobilenetwork
What?Why?
Why now?
2 4
5
Embedded Device3
Demo1
© Cumulocity GmbH 2014
Connectivity
Device
Server Application
Embedded Software
Communicationnetwork
How to do it over a mobile network?
Common Myths
Standards
© Cumulocity GmbH 2014
Why is IoT different from your personal phone?
Mobile Phone M2MUser Person MachineSale B2C, B2B B2BPayment Pre-pay, Post-pay DiverseActivation
At point of sale Varied
Support User calls helpdesk
Transparent self-help
ARPU 10-20 EUR >1 EUROperators provide a M2M specificService Portal!
!
© Cumulocity GmbH 2014
Device
Middleware Layer
Cloud Platform
Your Device Software
M2M Service Portal
Smart Agent
Communicationnetwork
Your Device Software
How do typical mobile M2M Solutions look like?
© Cumulocity GmbH 2014
M2M Service PortalReduce your provisioning and support effort.
Based on our experience, you might want to check for: Are APIs is available? Is mass subscription
provisioning efficient? Are lifecycle events available? How easily can problems be
identified to be on operator side?
© Cumulocity GmbH 2014
Example: M2M Service Portal features
© Cumulocity GmbH 2014
Other selections to make:• SIM card• IP Connectivity/VPN/IPSec• Roaming / Countries
What else needs to be considered?
© Cumulocity GmbH 2014
IPSO Power Control
c’t 09/13, p.98
Myths #1: The “thing” must be a server
© Cumulocity GmbH 2014
Device is Server Device is ClientSecurity Very High Risk No open port =>
lowerOptimal for Actuators SensorsData sharing
By device(not in mobile!)
By server
Data Access & Scaling
Difficult to impossible
Easy and cheap
Addressing Static IP Dynamic & Private IP
Consequence
Requires VPN Requires Device Push
Myths #1: The “thing” must be a server
© Cumulocity GmbH 2014
RFID und IPv6 als Wegbereiter Die Grundlage dafur [vernetzte Geräte] hat unter anderem IPv6 geschaffen.
c’t 09/13
Our viewIPv6 neither needed nor really speeding up projects. Assuming that devices are clients (and not server)
Myths #2: IoT requires IPv6
© Cumulocity GmbH 2014
Long polling (LP) counter arguments
Reality Why?
LP drains battery
Limited Check 2G/3G Idle State
LP is expensive to keep alive
Very LimitedAnd provides availability
4464 bytes / month (blank every 10 mins)
LP is slow No, its faster No TCP connection setup
Problem: 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.
Myths #3: Long polling will not work
© Cumulocity GmbH 2014
The nice thing about standards is that you have so many to choose from.Andrew Tanenbaum, Computer Networks, 2nd ed., p. 254
Layer ETSI IPSO/CoAP M3DA MQTT
Payload Defined, XML
Defined, Text
Partially, Binary
n/a
Style RESTful RESTful ? MessagingApplication Layer
HTTP/SSL, CoAP
HTTP/SSL, CoAP
M3DA MQTT, SSL optional
Transport Layer
TCP UDP TCP, UDP, HTTP
TCP
Internet Layer
IP IP IP IP
Standards, here: device to server
© Cumulocity GmbH 2014
Agenda
Application
Mobilenetwork
What?Why?
Why now?
2 4
5
Embedded Device3
Demo1
© Cumulocity GmbH 2014
Developing 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
touches about all aspects of IT.• No scale, no ecosystem: Application only for device, device
only for the application.
yesterday
© Cumulocity GmbH 2014
The 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.
© Cumulocity GmbH 2014
Examples 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.• And many many new players …
© Cumulocity GmbH 2014
Examples of generic M2M platformsFull bundles: Deutsche Telekom M2M Developer Platform.
© Cumulocity GmbH 2014
What 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.
© Cumulocity GmbH 2014
Example: Cumulocity• Cloud scaling.• Full multi-tenancy.• Mobile enabled.• REST & HTTPS everywhere, open APIs.• Assets vs devices.• Decoupling of devices and applications, sensor library.
© Cumulocity GmbH 2014
Summary• Building M2M solutions will get simpler and simpler.
– Pluggable device platforms like Raspberry Pi, Odroid, … (hobbyists) and CloudGate, NTC-6200, … (industrial).
– Cheap connectivity.– Transparent cloud software platforms.– Bundles of all.
• Thousands of use cases haven’t been thought of yet: Get a kit and invent!
© Cumulocity GmbH 2014
Backup
© Cumulocity GmbH 2014
Java 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.
© Cumulocity GmbH 2014
Java 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.
© Cumulocity GmbH 2014
Useful 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.
© Cumulocity GmbH 2014
Java 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 …
© Cumulocity GmbH 2014
Java 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 …
© Cumulocity GmbH 2014
ME vs SEBenefits of Java ME Embedded:• Small footprint.• Design for embedded/remote development, decouple
hardware and software 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).
© Cumulocity GmbH 2014
Outlook• Closer convergence of Java ME Embedded and Java SE
Embedded with Java 8.
© Cumulocity GmbH 2014
Sending 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):ATZOKAT+CPIN?+CPIN: SIM PINAT+CPIN="<pin>"OK AT+CGDCONT=1,"IP","<apn>"ATDT*99#
Reset modem to default parameters
Check if SIM is locked(READY, SIM PUK, SIM PIN2, …)Unlock SIM(Cannot be unlocked multiple times)Set APN to be usedDialup to the network
© Cumulocity GmbH 2014
AT+CMGS="+4915155153908",145Hi JUG![Ctrl=z]OK
Sending SMS
Or JSR205 (Wireless Messaging API):
MessageConnection conn =(MessageConnection) Connector.open("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
© Cumulocity GmbH 2014
ShortcutsOr proprietary extensions and convenience libraries, e.g., dialup from J2ME on a Cinterion EGS5/5x:
new com.cinterion.io.ATCommand(false).send("AT^SJNET=\"gprs\",\"<apn>\",\"\",\"\"\r\
n");
© Cumulocity GmbH 2014
Practicalities• Most M2M SIMs have no PIN, most M2M APNs have no
username or password (because there’s no one to type it in).• Use an M2M APN with your M2M SIM card.
© Cumulocity GmbH 2014
Practicalities 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.