BBL AXA Lille - Nearable and the Eddystone Quest

75
Nearables the Eddystone Quest Follow @thedamfr

Transcript of BBL AXA Lille - Nearable and the Eddystone Quest

Page 1: BBL AXA Lille - Nearable and the Eddystone Quest

Nearablesthe Eddystone Quest

Follow @thedamfr

Page 2: BBL AXA Lille - Nearable and the Eddystone Quest

With iBeacon, Apple is going to dump on NFC and embrace the internet of things

Hari Gottipati - GIGAOM

Page 3: BBL AXA Lille - Nearable and the Eddystone Quest
Page 4: BBL AXA Lille - Nearable and the Eddystone Quest
Page 5: BBL AXA Lille - Nearable and the Eddystone Quest
Page 6: BBL AXA Lille - Nearable and the Eddystone Quest

Unexpected behaviour

Page 7: BBL AXA Lille - Nearable and the Eddystone Quest

Going under the hood

Page 8: BBL AXA Lille - Nearable and the Eddystone Quest

Bluetooth LE1

Page 9: BBL AXA Lille - Nearable and the Eddystone Quest

Bluetooth is a Data transfer stack + Lightweight

+ Compact + Easy to embed

+ Connected (sim. to TCP-Sockets)

Page 10: BBL AXA Lille - Nearable and the Eddystone Quest

Bluetooth Low Energy is an additional layer allowing punctual

communication #Paquets

#HTTP-Style

Page 11: BBL AXA Lille - Nearable and the Eddystone Quest
Page 12: BBL AXA Lille - Nearable and the Eddystone Quest

Let speak about GATT

Page 13: BBL AXA Lille - Nearable and the Eddystone Quest

GATT Generic Attribute Profile

Page 14: BBL AXA Lille - Nearable and the Eddystone Quest

GATT is a Client-Serveur arch.

Page 15: BBL AXA Lille - Nearable and the Eddystone Quest

GATT is a Client-Serveur arch.

Client begin request, get the value of an attribute, write an attribute

Page 16: BBL AXA Lille - Nearable and the Eddystone Quest

GATT is a Client-Serveur arch.

Client begin request, get the value of an attribute, write an attribute

Server complete request, send the value, edit the values

Page 17: BBL AXA Lille - Nearable and the Eddystone Quest

Smartphone Object

Page 18: BBL AXA Lille - Nearable and the Eddystone Quest

Smartphone Object

Client Server

Page 19: BBL AXA Lille - Nearable and the Eddystone Quest

Attributes

Each attribute is identified with a UUID

There is 3 kind of attributes

Page 20: BBL AXA Lille - Nearable and the Eddystone Quest

Characteristics

A characteristic represent a value. For example, the value measured by a sensor

An accelerometer will expose a Characteristic for each axis

You can : + Read a Characteristic + write a Characteristic.

+ receive notification or indication from a Characteristic

Page 21: BBL AXA Lille - Nearable and the Eddystone Quest

Descriptors

A Characteristic can expose multiple Descriptors. Descriptors should give additional information about the

Characteristic For example, the measurement unit.

For a temperature : °C,°F, K.

Page 22: BBL AXA Lille - Nearable and the Eddystone Quest

Descriptors

You can : + Read a Descriptor + Write a Descriptor

+ read all Descriptors of a Characteristic

Page 23: BBL AXA Lille - Nearable and the Eddystone Quest

Services

A Service is a collection of attributes It can contains : + Descriptors

+ Characteristics + other Services (called Secondary Services)

You can : + Discover all primary services

+ Discover all attributes of a service

Page 24: BBL AXA Lille - Nearable and the Eddystone Quest

SO WHAT ?

Page 25: BBL AXA Lille - Nearable and the Eddystone Quest

SO WHAT ?

Page 26: BBL AXA Lille - Nearable and the Eddystone Quest

Discovery2

Page 27: BBL AXA Lille - Nearable and the Eddystone Quest

Client Server

Page 28: BBL AXA Lille - Nearable and the Eddystone Quest

Server

An adversting PDU specify an identifier, a pairing protocol and more

Page 29: BBL AXA Lille - Nearable and the Eddystone Quest

Serveur

Advertising Mode is used when a device wants to let an other

know about its proximity

Page 30: BBL AXA Lille - Nearable and the Eddystone Quest

Bluetooth advertising is a method of mobile advertising that utilises bluetooth technology to deliver advertisements to mobile devices such as cellular phones.Wikipedia - 2008

Page 31: BBL AXA Lille - Nearable and the Eddystone Quest

Bluetooth advertising transmitters are set up to detect bluetooth devices within transmission range. When a device is detected, the advertising transmitter sends out a message asking the recipients if they would like to view a promotional text message, video clip, animation or even a business card. This way of advertising is very efficient and very cheap at the same time. One test of such a service at railway stations detected 87,000 phones over a period of two weeks and achieved a response of 15%.[1]This form of advertising has been used to deliver ads for a car in the London subway system[2] as well as for United States Navy Reserve recruitment.

Wikipedia - 2008

Page 32: BBL AXA Lille - Nearable and the Eddystone Quest

Bluetooth advertising transmitters are set up to detect bluetooth devices within transmission range. When a device is detected, the advertising transmitter sends out a message asking the recipients if they would like to view a promotional text message, video clip, animation or even a business card. This way of advertising is very efficient and very cheap at the same time. One test of such a service at railway stations detected 87,000 phones over a period of two weeks and achieved a response of 15%.[1]This form of advertising has been used to deliver ads for a car in the London subway system[2] as well as for United States Navy Reserve recruitment.

Wikipedia - 2008

Page 33: BBL AXA Lille - Nearable and the Eddystone Quest

Bluetooth advertising transmitters are set up to detect bluetooth devices within transmission range. When a device is detected, the advertising transmitter sends out a message asking the recipients if they would like to view a promotional text message, video clip, animation or even a business card. This way of advertising is very efficient and very cheap at the same time. One test of such a service at railway stations detected 87,000 phones over a period of two weeks and achieved a response of 15%.[1]This form of advertising has been used to deliver ads for a car in the London subway system[2] as well as for United States Navy Reserve recruitment.

Wikipedia - 2008

Page 34: BBL AXA Lille - Nearable and the Eddystone Quest

iBeacon

Page 35: BBL AXA Lille - Nearable and the Eddystone Quest

An iBeacon Device is using advertising mode

with a specific frame

Page 36: BBL AXA Lille - Nearable and the Eddystone Quest

iBeacon PacketExemple

fb0b57a2-8228-44 cd-913a-94a122ba1206 Major 1 Minor 2 twPower 90

UUID Unique Identifier for a group of beacon, a region

Major A value identifying a group of beacons

Minor A value identifying this specific Device

txPower Signal strength at 1m

Page 37: BBL AXA Lille - Nearable and the Eddystone Quest

Understanding Region

A Ble Device like your smartphoneAct as a scanning device for a very short period

Page 38: BBL AXA Lille - Nearable and the Eddystone Quest

At the end of the periodIf no advertising frame has been received

The scanning device is said out of the Region

Understanding Region

Page 39: BBL AXA Lille - Nearable and the Eddystone Quest

Comprendre la notion de Région

A la fin du Scan, si les paquets d'advertising d'une beacon n'ont pas été détectés, on peut

dire qu'on est Hors-Région

A la fin du Scan, si les paquets d'advertising d'une iBeacon ont été détecté, on est dans la région et l'on peut mesurer la puissance du

signal pour estimer la distance

At the end of the periodIf no advertising frame has been received

The scanning devis is said out of the Region

Understanding Region

At the end of the periodIf no advertising frame has been received

The scanning device is said out of the Region

If a frame is detected, the scanning device is said in the Region And we can measure the signal strength

to range it

Understanding Region

Page 40: BBL AXA Lille - Nearable and the Eddystone Quest
Page 41: BBL AXA Lille - Nearable and the Eddystone Quest

What sucks with iBeacon ?

Page 42: BBL AXA Lille - Nearable and the Eddystone Quest

Not an open-source specification

What sucks with iBeacon ?

Page 43: BBL AXA Lille - Nearable and the Eddystone Quest

Not an open-source specification

Interoperability require reverse engineering

What sucks with iBeacon ?

Page 44: BBL AXA Lille - Nearable and the Eddystone Quest

Solution ?

AltBeacon The Open and

Interoperable Proximity Beacon Specifica:on

Page 45: BBL AXA Lille - Nearable and the Eddystone Quest

Design Goals

• Provide a concise proximity adver3sing message for interchange of proximity informa3on between adver3sers and scanners

• Maintain compliance with Bluetooth Specifica3on Version 4.0 by u3lizing defined adver3sing PDU and adver3sing data structures

• Encourage adop3on by all interested par3es by avoiding any obvious implementa3on restric3ons

• Enable the implementa3on of vendor-specific features, if possible

Page 46: BBL AXA Lille - Nearable and the Eddystone Quest

Advertising PDU

Page 47: BBL AXA Lille - Nearable and the Eddystone Quest

Content

AD LENGTH Length of the type and data por6on of the Manufacturer Specific adver6sing data structure.

AD TYPE Type represen6ng the Manufacturer Specific adver6sing data structure.

MFG ID The beacon device manufacturer's company iden6fier code

BEACON CODE The AltBeacon adver6sement code

BEACON ID A 20-byte value uniquely iden6fying the beacon

REFERENCE RSSI A 1-byte value represen6ng the average received signal strength at

1m from the adver6serMFG RESERVED Reserved for use by the

manufacturer to implement special features

Page 48: BBL AXA Lille - Nearable and the Eddystone Quest

Eddystonean open beacon format from Google

Page 49: BBL AXA Lille - Nearable and the Eddystone Quest

Design Goals

• Works well with Android and iOS Bluetooth developer APIs

• StraighOorward implementa3on on a wide range of exis3ng BLE devices

• Flexible architecture permiRng development of new frame types

• Fully compliant with the Bluetooth Core Specifica3on

Page 50: BBL AXA Lille - Nearable and the Eddystone Quest

Multiples Frame Types

• Eddystone-UID • Eddystone-URL • Eddystone-TLM

Page 51: BBL AXA Lille - Nearable and the Eddystone Quest

Eddystone-UID

FRAME TYPE 1 byte

RANGING DATA Calibrated Tx power at 0 m

NAMESPACE 10-byte

INSTANCE 6-byte

Page 52: BBL AXA Lille - Nearable and the Eddystone Quest

Eddystone-URL

FRAME TYPE 1 byte

RANGING DATA Calibrated Tx power at 0 m

URL SCHEME 1-byte

ENCODED URL 17-byte

Page 53: BBL AXA Lille - Nearable and the Eddystone Quest

URL Scheme Prefix

0 hWp://www.

1 hWps://www.

2 hWp://

3 hWps://

Page 54: BBL AXA Lille - Nearable and the Eddystone Quest

Eddystone-URL

Specify an Eddystone-URL Configura3on GATT Service

Page 55: BBL AXA Lille - Nearable and the Eddystone Quest

Eddystone-TLM

FRAME TYPE 1-byte

VERSION 1-byte

BATTERY VOLTAGE 2-byte

BEACON TEMPERATURE 2-byte

ADVERTISING PDU COUNT 5-byte

TIME SINCE POWER-ON OR REBOOT 4-byte

Page 56: BBL AXA Lille - Nearable and the Eddystone Quest

Proximity Beacon API

Page 57: BBL AXA Lille - Nearable and the Eddystone Quest

Proximity Beacon API

The Proximity Beacon API is a cloud service that allows you to manage data associated with your BLE beacons using a REST interface.

Page 58: BBL AXA Lille - Nearable and the Eddystone Quest

Proximity Beacon API

Support : • Eddystone format • iBeacon format • AltBeacon format

Page 59: BBL AXA Lille - Nearable and the Eddystone Quest

Proximity Beacon API

Place API : • Place ID • Loca3on (lat,lng) • Indoor floor • Stability

Page 60: BBL AXA Lille - Nearable and the Eddystone Quest

Proximity Beacon API

Message API • NamespacedType • Data (1024 bytes)

Page 61: BBL AXA Lille - Nearable and the Eddystone Quest

Proximity Beacon API

Monitoring Report Telemetry Api will determine: • Predicted ba]ery death. • Beacons that have moved away

from their registered loca3on. • Unusually low detec3on rates.

Page 62: BBL AXA Lille - Nearable and the Eddystone Quest

Getting RealGet some Hardware

kontakt.io

Page 63: BBL AXA Lille - Nearable and the Eddystone Quest

Getting Real

In House

• Use a beacon to monitor how much 3me you spend in each rooms

• Use a beacon to indicate proximity with to the NEST API

• Use a beacon to send an automated text message when you get home

Page 64: BBL AXA Lille - Nearable and the Eddystone Quest

Getting RealReal life usecase :

• The city bus has a beacon on it • Your car as a beacon on it • Your bus stop has a beacon on it • The restaurant automatically book you a table

on the fly when you get in • You get notified of a flash promo when walking

in front of an IRL shop

Page 66: BBL AXA Lille - Nearable and the Eddystone Quest
Page 67: BBL AXA Lille - Nearable and the Eddystone Quest
Page 68: BBL AXA Lille - Nearable and the Eddystone Quest
Page 69: BBL AXA Lille - Nearable and the Eddystone Quest
Page 70: BBL AXA Lille - Nearable and the Eddystone Quest
Page 71: BBL AXA Lille - Nearable and the Eddystone Quest
Page 72: BBL AXA Lille - Nearable and the Eddystone Quest
Page 73: BBL AXA Lille - Nearable and the Eddystone Quest
Page 74: BBL AXA Lille - Nearable and the Eddystone Quest
Page 75: BBL AXA Lille - Nearable and the Eddystone Quest