Contenu connexe
Similaire à Android & the Web of Things: Bluetooth Low Energy, Bluetooth 4.0, iBeacons, Barcodes, QRs, NFC, Arduino
Similaire à Android & the Web of Things: Bluetooth Low Energy, Bluetooth 4.0, iBeacons, Barcodes, QRs, NFC, Arduino (20)
Android & the Web of Things: Bluetooth Low Energy, Bluetooth 4.0, iBeacons, Barcodes, QRs, NFC, Arduino
- 1. London Java Community Talk - 11.01.14
Dominique Guinard | @domguinard
CTO & Co-Founder EVRYTHNG | @EVRYTHNG
ANDROID & THE WEB OF THINGS
Bluetooth Low Energy (BLE) / Bluetooth 4.0, iBeacons,
Barcodes, QRs, NFC, Arduinos @ Android
© EVRYTHNG Limited | 2014
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 2. IoT / WoT ?
Internet of Things:
Web of Things:
§ “Uniquely identifiable
objects and their virtual
representations in an
Internet-like structure”
§ “Application architecture
for physical objects”
• Auto-ID Labs (K. Ashton, S.
Sarma, F. Mattern)
§ How do we connect things
to the Internet?
§ OSI Layer 4 and below
§ Buzz: EPCIS, IPv6 lowpan,
• D. Guinard, V. Trifa, E.Wilde,
D. Raggett
§ How do we build
applications to sense,
actuate and combine
things?
§ OSI Layer 7 and above :-)
§ Buzz: REST, Social
Networks, semantics,
mashup, etc.
webofthings.org/publications
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 4. The Internet of Things Era
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 5. One trillion connected
devices by 2015.
© Evrythng Limited | 2014
Source: IBM Investor Briefing ‘Making Markets: Smarter Planet’
@EVRYTHNG | @domguinard
- 6. Real objects part of the real-time web
“You won’t need to hunt anxiously
for your missing shoes in the
morning, you’ll Google them.
”
Source: Bruce Sterling, ‘Shaping Things’
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 7. People + Things
“
The charge will be completed by 2:15am.
Is that OK? See you tomorrow.
© Evrythng Limited | 2014
”
@EVRYTHNG | @domguinard
- 10. Two worlds to form a Web of Things
WSN &
6lowpan
QR
1D
EPC
Image
Rec
BLE
WSN &
Wifi
ADK /
ADB
NFC
World of tags
World of embedded devices
Interactivity
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 11. EVRYTHNG: How It Works
1. Product ID
1.
Product ID
Product has unique identity
Product has at an
tag or identifiedunique identity tag or
embed, or SKU identified with
SKU-level using image
image recognition or
recognition or barcode. barcode.
2. Personal ID
2.
Personal using
Consumer connectsID
mobile device and social mobile
Consumer connects using
device login, mobile
networkand social network login,
mobile number Identity.
number or CRMor CRM Identity.
Barcode
2D Barcode
3.
Our Smart Profile
smart product profile
Smart profile drives apps,
delivers contextual & contextual
and relationship-based Web
relationship-based Web
experiences, captures analytics.
experiences and captures
analytics.
NFC Tag
Image
recognition
3. Personalization
Embedded Chip
© Evrythng Limited | 2014
Product Profile
@EVRYTHNG | @domguinard
- 12. Technology
Active Digital Identities™ - smart, online identities for
physical things, putting them on the Web.
The
EVRYTHNG
Engine
RESTful APIs
& Application Tools
An Active Digital Identity™
for every thing
Persistent URI & URLs
A high scale, online environment to manage information from and about
billions of products and drive applications connecting with them.
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 13. Okay okay, we got it!
But what are you doing HERE!?
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 14. If only Spock had an Android phone…
§ Mobile phones as
bootloaders of the IoT
§ Android as the
Tricorder:
§ Massive market
penetration world-wide!
§ Great QR support (opensource libs)
§ NFC support in the SDK
§ ADK + ADB for hardware
extensions
§ BLE support
Source: android-france.fr
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 15. Android & the Web of Things…
Level 1: Barcodes & QRs
Bootstraping the Internet of Things…
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 16. Our World is Being Tagged Today!
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 17. Level 1: QR Codes
§ Golden rule:
§ QRs only you shall use!
§ Royality-free encoding
algorithm (Toyota’s
Denso Wave)
§ 40 different levels
§ 4 error correction levels
§ Add a logo!
§ Standardized content:
URLs, v-card, etc.
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 18. Android Loves QRs!
§ Zxing open-source
library:
§ Great scanning of 1D +
2D QR codes.
§ Supported on a very
wide range of (Android)
devices.
§ Embedded in your app
or called via Intent.
§ code.google.com/p/zxing/
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 19. Adding 1D & QR Support on Android
Activity
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 20. QRs + EVRYTHNG: Father’s Day
• Marketing campaign
for father’s day in
Brazil/Chile/
Venezuela/Australia
– Built on top of the
EVRYTHNG API
– Mobile Web and
Desktop apps
• 500k whisky bottles
tagged with unique QR
codes
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 24. QRs, 1D @ EVERYTHNG API
§ Microformat-based
Products description
– Extensible model
§ Product-instances as
Thngs
– Each identified by a short
URL:
tn.gg/JH8Bdf5v | .qr
– Ideal for QRs & NFC tags
– Dynamic remapping
§ Actions on Thngs &
Products
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 25. Android & the Web of Things…
Level 2: NFC
Because touching feels better, ain’t it?
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 26. Level 2: NFC: Near Field Communication
§ 13.56 MHz, “Touch”
technology
§ Driven by NFC Forum
(Google, Nokia, Intel,
Visa, etc.)
§ NDEF: Data standard
(URLs, Text, Poster,
etc.)
[Image courtesy of Timo Arnall www.elasticspaces.com]
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 27. Android Loves NFC!
§ Decent NFC support since
2.3.3 (API v10,
Gingerbread)
§ Wake up applications on
tag discovery (w/filters)
§ Relatively complex but
powerful API
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 28. Adding NFC Support on Android 1/2
Manifest
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 29. Adding NFC Support on Android 2/2
Activity
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 30. Sample Project: FreezeMe!
§ FreezeMe!
§ Simple Android app to
manage stuff in your
freezer
§ QR & NFC support
§ Connects to the
EVRYTHNG API
§ github.com/webofthings
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 31. NFC + EVRYTHNG: Izipline NFC Packages
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 35. NFC Application @ EVRYTHNG API
§ Generated short URLs
are ideal for NFC tags
– Small URLs
– Crypto-secure URLs
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 36. Android & the Web of Things…
Level 3: ADK + ADB Hack
Arduinos talking Android talking Arduino…
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 38. Arduino: Empowering IoT Prototypes since 2005
§ Leading open-source
electronics prototyping
platform
§ Specs:
§ Various sizes, lots of
available shields, low cost
(from 15$ to 70$)
§ Processing-based Java
IDE
§ ATmega-based (8-16 Mhz)
§ Alternatives:
§ Open-picus (Flyport)
§ ElectricImp
§ Raspberry PI
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 39. Android Phone Home
§ Arduino support
through two projects:
§ Android Open
Accessory Development
Kit (ADK)
§ Android Debug Bridge
(ADB), microbridge
project
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 40. Android Talking Arduino: ADK
• Official accessory
prototyping platform
• ADK support in:
• Android: 2.3.4+ (kernel
2.6.35)
• Android tablets: 3.1+
• Arduino: Mega ADK
• Turn project into real
accessory
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 41. ADK: “Hello World” Android Side 1/2
Manifest
res/xml/accessory_filter.xml
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 42. ADK: Android Side 2/2
+ a LOT of boilerplate code…
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 44. Alternative: ADB
§ « missuse » of the
Android debug system
§ Several Arduino shields
§ USB Host Shield 2.0
circuits@home
[http://www.circuitsathome.com]
© Evrythng Limited | 2014
§ Microbridge: open-source
Arduino + Java library
§ + low cost
+ works with many
Arduinos
+ works with Android 1.5+
+ also ADK compatible
§ - lack of support
- only for hobby prototypes
- does not work for
Android > 4
@EVRYTHNG | @domguinard
- 47. Arduinos talking Android…
Board
Google ADK
2011
Google
ADK 2012
Arduino
ADK R3
CPU
ATmega2560,
16 MHz
ARM 32bit Cortex
M3
ATmega25 ATmega25 PIC24FJ2
60, 16
60, 16
56
MHz
MHz
PIC24FJ2
56
PIC24FJ2
56
RAM
Flash
256 KB, 8KB
MiroSD
slot
256 KB,
8KB
256 KB,
8KB
256 KB,
96KB
256 KB,
96KB
256 KB,
96KB
Digi.
Pins
16
?
16
16
16
16
16
Analo.
Pins
54
?
54
56
48
46
46
Price ~ 400$
-
65$
50$
-
40$
65$
Notes
Not for
sale
R2 + pins
Not officially
for sale, can
be found
© Evrythng Limited | 2014
Seeduino
ADK
Sparkfun
IOIO
Replaced
by the
OTG
Sparkfun
IOIO Mint
IOIO OTG
IOIO OTG
+ battery
@EVRYTHNG | @domguinard
- 48. EVRYTHNG & Connected Devices
NFC
Sensor
EVRYTHNG
Android / iOS
SDK
BLE
Sensor
REST call over
HTTP / HTTPs
EVRYTHNG ENGINE
•
•
ARM
Mbed
Mbed
Wrapper
Arduino
Flyport
Wrapper
RspbryPi
EVRYTHNG.js
Others
Device data stored as Temporal Properties
Device & application actions with ENGINE
rules trigger events
Secure access control
Arudino
Wrapper
FlyPort
WSNs
Visualization via Portal
HTTP
Library
•
REST + JSON
APIs
3rd Party Applications
App
App
App
App
App
Development roadmap includes implementation of outbound
messaging for ENGINE / device push and actuation.
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 49. WSN + EVRYTHNG: ARM Coffee
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 50. ADB + EVRYTHNG: Ondes Visibles!
§ ADB-based project:
§ USB Host Shield 2.0
§ Arduino Uno
§ Sensing LF + HF
§ Real-time monitor,
logger
§ Educational tool
(cudrefin02.ch)
http://github.com/domguinard
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 51. Android & the Web of Things…
Level 4: Bluetooth Low Energy /
BLE / Bluetooth 4.0 & iBeacons
Now stand-alone please!
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 52. NFC and ADK without iOS
§ QRs & 1D supported
by both Android and
iOS.
§ NFC & ADK aren’t
supported by iOS.
§ Alternative?
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 53. Say Hello to BLE: Bluetooth 4.0
Bluetooth
(<4.0)
Buetooth Low
Energy (4.0)
Radio
power
max 100
mW
max 10 mW
Range
max 100 m
<50 m
Bandwidth
up to 3
Mbit/s
up to 1 Mbit/s
Bootstrap
100 ms
6 ms
© Evrythng Limited | 2014
• Not quite NFC, not
quite EPC, not quite
WSN, best of all?
– Low-power => long
battery life (years)
– Active => reading from
a distance
@EVRYTHNG | @domguinard
- 54. BLE BT 4.0 : Examples
[sticknfind.com]
§ Lot’s of applications:
– Smart lost&found
– Active tagging
– Sports trackers
– Smart watches
– Wireless payments
– etc.
§ However $$$ > NFC,
Barcodes, EPC
© Evrythng Limited | 2014
[thetileapp.com]
[getpeeble.com]
[jawbone.com]
@EVRYTHNG | @domguinard
- 55. BLE and Android
§ Since Android 4.3
§ Phone cannot (yet, as
of 4.4) act as
peripheral device
§ Several devices are
available:
– TI Sensor tag ideal for
getting started
=> Android Examples
http://www.ti.com/ww/en/wireless_connectivity/sensortag
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 56. iBeacons != BLE
“02 01 1a 1a ff 4c 00 02 15 e2 c5 6d b5
df fb 48 d2 b0 60 d0 f5 a7 10 96 e0 00
00 00 00 c5 00 00 00 00 00 00 00 00
00 00 00 00 00
”
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 57. iBeacons
§ Not (yet) a standard
Bluetooth profile
=> trickier to catch it from
Android
§ Sort of an active NFC
§ Several iBeacons
providers
– make your own with a
Raspberry Pi!
https://github.com/RadiusNetworks/android-ibeacon-service
http://tinyurl.com/pibeacon
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 60. Executive summary!
Tech
Tech
Maturity
Market
Price /
Penetration Unit
Deploy + dev App type
Complexity
1D
Very High
Very High
0.001 $
Low
Product centric on low
price goods
QR
High
High
0.01 $
Low
Product instance
centric for low price
goods, tagging
EPC
Medium
Low
0.1 $
High
Supply chain
NFC
High
Medium
0.1 $
Medium
Access control,
payment, tagging
ADK
Low
Low (new
Andro)
40$
High
Prototypes of Android
accessories & sensors
ADB
Low (hack)
Low+
(Andro)
20$
Medium
Prototypes & hacks &
sensing with Android
BLE /
Bluetooth
4.0
High
Increasing 10$
(new Andro
+ iOS)
MediumHigh
Sensing, activity
tracking, locationaware apps
iBeacon
Medium
Low, iOS
Medium
Active tagging, indoor
localization/navigation
@EVRYTHNG | @domguinard
© Evrythng Limited | 2014
10$
- 61. The EVRYTHNG Open API & Tools
§ Give your things a digital
identity:
– Products friendly
(QR & NFC)
– Sensors friendly (ADK/ADB,
BLE)
§ Mgt/testing/vizu portal
§ Lightweight REST API
§ SDKs for:
–
–
–
–
–
–
–
Android
JS
Arduino (community)
.Net
Mbed
Flyport (community)
Etc.
[dev.evrythng.com]
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 64. Level 2.5: EPC: Don’t touch me!
§ Electronic Product Code
§ 96 bits world-wide
unique product identifier
& standards
§ Commercial attribution
of codes (GS1)
§ EPC can be written to
NFC tags
§ EPC Gen2 tags enable
distant reading
§ EPC likes Java:
§ fosstrak.org
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 66. Current BLE Support @ mobile
§ HTC One, One X+, Droid DNA
§ Apple's iPhone 4S, iPhone 5, iPad (3rd gen & 4th
gen), iPad Mini and others
§ Nokia Lumia 620, 820 and 920
§ Samsung Galaxy Nexus, Galaxy SIII, Galaxy S4,
Note II, Note 3
§ Microsoft Surface Pro
§ Blackberry Z10 and Q10
[Source: Wikipedia]
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 67. Useful Links
• FreezeMe sample app:
• https://github.com/webofthings/FreezeMe
• EVRYTHNG Android wrapper:
• https://gihub.com/evrythng
• Web of Things community blog:
• http://www.webofthings.org
• Web of Things Thesis:
• http://www.webofthings.org/dom/phd/thesis.pdf
• Fosstrak EPC open-source stack:
• http://www.fosstrak.org
• Jazoon presentation on EPCIS Web (REST) Adapter:
• http://slideshare.net/misterdom/restifying-ws-services-case-study-in-rfid
• Signup for EVRYTHNG account (for your next IoT / WoT projects):
• http://evrythng.com
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard
- 68. Useful Links II
• Android Microbridge Project
• http://code.google.com/p/microbridge/
• Circuits@home (USB Host Shield):
• http://www.circuitsathome.com/products-page/arduinoshields/usb-host-shield-2-0-for-arduino
• ADK Library:
• http://developer.android.com/tools/adk/index.html
• Ondes Visibles! Project :
• http://code.google.com/p/ondes-visibles/
• Problems with the ADK and the Arduino Mega ADK:
• http://stackoverflow.com/questions/11213536/error-oscokirqfailed-to-assert/11239701#11239701
© Evrythng Limited | 2014
@EVRYTHNG | @domguinard