SlideShare une entreprise Scribd logo
1  sur  43
Télécharger pour lire hors ligne
Stefano Sanna
Bluetooth Low Energy:
la rivoluzione silenziosa dell’ambient intelligence
gerdavax AT gmail DOT com
Agenda
Bluetooth Low Energy

•

Presentazioni
!

•

Ambient Intelligence
!

•

Bluetooth
• Genesi ed evoluzioni
• Bluetooth Low Energy
• Playground


•

FAQ & Conclusioni

gerdavax AT gmail DOT com
Speaker
Bluetooth Low Energy

•

gerdavax AT gmail DOT com

Responsabile Android Lab @ Open Reply
!

•

Co-autore di “Android Programmazione Avanzata”

(con E. Di Saverio, Ed. FAG)
!

•

Autore del libro “Java Micro Edition” 

(Hoepli)
!

•

Supporter @ Codemotion since 2005 (JIP Day!)
Slide’s title
Bluetooth Low Energy

Cablaggi nella metropolitana di Londra

gerdavax AT gmail DOT com
Bluetooth Low Energy

gerdavax AT gmail DOT com

2002: quattro mani per usare un PDA con touchscreen resistivo 

(con pennino), modem 2G seriale, GPS seriale e fotocamera da 1.5MPX)
Bluetooth Low Energy

gerdavax AT gmail DOT com
Ambient Intelligence
Bluetooth Low Energy

gerdavax AT gmail DOT com

In computing, ambient intelligence (AmI) refers to electronic environments
that are sensitive and responsive to the presence of people.

Ambient intelligence is a vision on the future of consumer electronics,
telecommunications and computing that was originally developed in
the late 1990s for the time frame 2010–2020. 

In an ambient intelligence world, devices work in concert to support
people in carrying out their everyday life activities, tasks and
rituals in an easy, natural way using information and intelligence that is
hidden in the network connecting these devices (see Internet of Things). 

As these devices grow smaller, more connected and more integrated into
our environment, the technology disappears into our surroundings
until only the user interface remains perceivable by users.
http://en.wikipedia.org/wiki/Ambient_intelligence
Everyday Life Activity
Bluetooth Low Energy

gerdavax AT gmail DOT com

•

Sveglia, casa, doccia, colazione, news…


•

Abbigliamento, agenda, si parte!


•

Cammino, bici, auto, scooter, treno, metro, aereo…


•

Home office, HQ office, client office, mobile office…


•

Centro commerciale, parcheggio, ospedale, aeroporto,
stazione, parco, cinema, palestra, piscina, scuola, mare,
montagna, ristorante…
Everyday Life Activity
Bluetooth Low Energy

Info
ambiente

Prossimità
Beacon
Localizzazione

Termometro
corporeo
Cardio

Clima
Pressione
arteriosa

•

gerdavax AT gmail DOT com

frequenzimetro

Controllo
accessi

Ciclo del
sonno
Glucometro
Energia
Tracker
Pesapersone

Ciclometro
Metro

Safety &
Security
Breve storia di Bluetooth
Bluetooth Low Energy

•
•
•
•
•
•
•
•
•
•

gerdavax AT gmail DOT com

1994: nasce come “cable replacement” per connessioni seriali
1999: rilasciato Bluetooth 1.0, piuttosto instabile…
2003: rilasciato Bluetooth 1.2, stabile e realmente funzionale
2004: arriva Bluetooth 2.0 con EDR: aumenta la velocità
2006: Nokia annuncia Wibree per comunicazione a basso consumo
2007: è l’anno di Bluetooth 2.1+EDR. Migliora la sicurezza
2009: arriva Bluetooth 3.0
2010: è annunciato Bluetooth 4.0 con estensioni Low Energy
2011: Mac mini, MacBook Air e iPhone 4s sono i primi dispositivi
equipaggiati con Bluetooth 4.0
2013: 2.5 miliardi di device Bluetooth-enabled nel mondo
Alcuni dei limiti di Bluetooth
Bluetooth Low Energy

•
•
•
•
•
•
•
•
•
•

gerdavax AT gmail DOT com

Consumo energetico non trascurabile
Massimo 7 slave per ogni master
Fragile in contesti di elevato affollamento
Tempi di discovery troppo lunghi (sino a 20s)
Advertising “su richiesta”
Meccanismi di pairing lenti
Scarsa granularità dei profili
Stack piuttosto ricco (e, dunque, complesso)
Regole visibilità e discovery limitate
Stream-oriented (RFCOMM o Audio)
La contro-evoluzione: 4.0 non è 3.0++!
Bluetooth Low Energy

•

gerdavax AT gmail DOT com

Architettura non simmetrica (central vs peripheral)
• Sbilanciare i ruoli consente di avere periferiche semplici, poco costose
e con bassissimo consumo di energia (< 15mA picco)
Compiti complessi lasciati all’host
Non è previsto il cambio di ruolo (vedi HSP)

•
•
• Pacchetti piccoli ( < 50 byte)
• Richiedono poca energia per essere trasmessi
• MCU più semplice, meno memoria, meno possibilità di errore
• Trasmissione a bassa velocità e bassa potenza
• Advertising spontaneo e dinamico
• 3 canali di advertising anziché 32FH
• 40 canali complessivi
Contro-evoluzione: velocità
Bluetooth Low Energy

gerdavax AT gmail DOT com

60

54

Velocità (Mbps)

45

30

15

1

3

0,3

0
v1.1

v2.0

v3.0

v4.0
Magico, Prossimo, Fisico
Bluetooth Low Energy

•

gerdavax AT gmail DOT com

Magico
• apparati piccolissimi

•
•

autonomia incredibile
discovery in pochi millisecondi


•

Prossimo
• funziona a brevissima distanza
• l’info sulla potenza (normalizzata 1m) consente localizzazione indoor


•

Fisico
• È possibile… infilarlo ovunque!
• Le prime applicazioni sono davvero legate alle attività quotidiane
Ruoli
Bluetooth Low Energy

•

gerdavax AT gmail DOT com

Advertiser
•

•

Invia segnali periodici, non è dotato di ricevitore

Scanner
•

•

Attende segnali provenienti da un broadcaster; non trasmette

Peripheral
•

•

Ricetrasmittente, lavora principalmente in modalità server

Central
•

Tipicamente un computer o un device mobile, lavora principalmente
in modalità client verso uno o più peripheral


(su Bluetooth Classic solo Master e Slave, con assegnazione dinamica)
Versioni e “branding” dei dispositivi
Bluetooth Low Energy

gerdavax AT gmail DOT com
Versioni e “branding” dei dispositivi
Bluetooth Low Energy

•

gerdavax AT gmail DOT com

Bluetooth Classic
•
•

•

Compatibile esclusivamente con Bluetooth 1.1, 2.0 e 3.0
Sono tutti i dispositivi pre-Bluetooth 4.0 e quelli attuali non dotati di
funzionalità LE

Bluetooth Smart
•
•

•

Compatibile esclusivamente Bluetooth 4.0 low energy (single mode)
Funzionante nella sola modalità peripheral

Bluetooth Smart Ready
•
•

Compatibile con l’intera specifica Bluetooth 4.0 (dual mode)
Dialoga con dispositivi Classic e con dispositivi LE
Stack Bluetooth Classic
Bluetooth Low Energy

gerdavax AT gmail DOT com

SPP/DUN/OPP
RFCOMM

SDP

L2CAP
HCI
LINK MANAGER
BR/EDR PHY
Stack Bluetooth Smart
Bluetooth Low Energy

gerdavax AT gmail DOT com

GAP

GATT

SMP

ATT
L2CAP
HCI

LINK LAYER
LE PHY
Stack Bluetooth Smart Ready
Bluetooth Low Energy

gerdavax AT gmail DOT com

SPP/DUN/OPP
RFCOMM

GAP
SMP

SDP

GATT
ATT

L2CAP
HCI
LINK MANAGER

LINK LAYER

BR/EDR PHY

LE PHY
I profili in Bluetooth Classic
Bluetooth Low Energy

gerdavax AT gmail DOT com
GATT: Generic Attribute Profile (1)
Bluetooth Low Energy

•

gerdavax AT gmail DOT com

Servizio
•
•

•

Insieme di caratteristiche aggregate per erogare una funzionalità
Esempio:
• “Health Thermometer Service”

Caratteristiche
•
•

Un singolo valore accessibile in lettura o scrittura
Esempio:
• “Temperature Measurement” (temperatura letta)
• “Temperature Type” (tipo di termometro)
• “Intermediate Temperature” (letture in-progress)
• “Measurement Interval”
https://developer.bluetooth.org/gatt/services/Pages/ServiceViewer.aspx?u=org.bluetooth.service.health_thermometer.xml
GATT: Generic Attribute Profile (2)
Bluetooth Low Energy

•

gerdavax AT gmail DOT com

Descrittori
•
•

•

Informazioni accessorie su una caratteristica
Esempio:
• “Is write supported” sulla caratteristica che gestisce l’intervallo di
campionamento


Tutto è un UUID
•
•

A qualsiasi entità è assegnato un UUID (Universally Unique
IDentifier)
Accanto a BD-Address e Friendly-Name, un dispositivo può usare un
UUID anche in advertising (feature usata dagli iBeacon di Apple)
Profili, Servizi, Caratteristiche, Descrittori…
Bluetooth Low Energy

gerdavax AT gmail DOT com

Profile
Service

Service

Service

Characteristic
Characteristic
Characteristic
Value
Descriptor

Descriptor

Descriptor
UUID
Bluetooth Low Energy

gerdavax AT gmail DOT com

Entità

UUID

Base Bluetooth

00000000-0000-1000-8000-00805F9B34FB

Generic Access

00001800-0000-1000-8000-00805F9B34FB

GATT

00001801-0000-1000-8000-00805F9B34FB

Immediate Alert

00001802-0000-1000-8000-00805F9B34FB

Health Thermometer

00001809-0000-1000-8000-00805F9B34FB

Heart Rate

0000180D-0000-1000-8000-00805F9B34FB

Battery Service

0000180F-0000-1000-8000-00805F9B34FB

Battery Level

00002A19-0000-1000-8000-00805F9B34FB

Blood Pressure

00001810-0000-1000-8000-00805F9B34FB

Current Time

00001805-0000-1000-8000-00805F9B34FB

TX Power

00001804-0000-1000-8000-00805F9B34FB
Sistemi operativi e supporto BLE
Bluetooth Low Energy

•

Desktop
•
•
•

•

Linux
Mac OS X
Windows


Mobile
•
•
•
•

Android 4.3
iOS 5
Windows Phone 8
BlackBerry 10

gerdavax AT gmail DOT com
Android API per Bluetooth Low Energy
Bluetooth Low Energy

gerdavax AT gmail DOT com

•

Introdotta in Android 4.3 Jelly Bean


•

Consente di gestire GATT client e server,
accesso a caratteristiche e descrittori,
registrazione per le notifiche


•

Non supporta la modalità “peripheral”:
attualmente, dunque, non è possibile
creare un beacon (come su iPhone)


•

Android 4.4 KitKat offre un logger dei
pacchetti a livello HCI
Device Android con supporto Bluetooth Low Energy
Bluetooth Low Energy

•
•

gerdavax AT gmail DOT com

•

Google: Nexus 4, Nexus 5, Nexus 7 “2013”
Samsung: Galaxy S3, S3 mini, Galaxy S4, S4 mini; Note 2, Note 3, Note
8”, Note 10” 2014 Edition
LG: Optimus G, 4X, G2


•

Grandi assenti: Galaxy Nexus, Nexus 7, Nexus 10


•

Altri dispositivi con Android 4.2.x possono disporre di API proprietarie
per l’accesso al modulo BLE


•

Importante: non basta un semplice aggiornamento software per avere
BLE, occorre un hardware dedicato!
Principali differenze nelle API “Classic” e LE
Bluetooth Low Energy

gerdavax AT gmail DOT com

•

Il dispatching degli eventi avviene attraverso normali
“listener” anziché via Intent e BroadcastReceiver


•

I componenti che modellano GATT client,
caratteristiche e descrittori non sono Parcelable:
l’intera gestione della comunicazione avviene
all’interno di un singolo Fragment


•

Lettura e scrittura sono asincrone (addio I/O stream)


•

La stabilità (pre KitKat) lascia un po’ a desiderare…
API Android
Bluetooth Low Energy

gerdavax AT gmail DOT com

BluetoothManager manager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
adapter = manager.getAdapter();
boolean started = adapter.startLeScan(mLeScanCallback);

BluetoothAdapter.LeScanCallback mLeScanCallback = new BluetoothAdapter.LeScanCallback() {
@Override
public void onLeScan(final BluetoothDevice device, int rssi, final byte[] scanRecord) {

!
//

!
}
};

gestione device…
API Android
Bluetooth Low Energy

1

gerdavax AT gmail DOT com

BluetoothGatt mGatt = device.connectGatt(getActivity(), true, new BluetoothGattCallback() {
String SERVICE = “0000180F-0000-1000-8000-00805F9B34FB”;
String LEVEL =

“00002A19-0000-1000-8000-00805F9B34FB”;

!

2

@Override
public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) {
if (status == BluetoothGatt.GATT_SUCCESS && newState == BluetoothGatt.STATE_CONNECTED) {
BluetoothGattService service = gatt.getService(UUID.fromString(SERVICE));
BluetoothGattCharacteristic ch = service.getCharacteristics(UUID.fromString(LEVEL));
gatt.readCharacteristic(ch);
}
}
@Override
public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic ch, int st) {
final int batteryLevel = ch.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT8, 0);
}

});

3
Playground: sperimentare con BLE
Bluetooth Low Energy

Kontakt Beacon

WTEK Heartrate Monitor

gerdavax AT gmail DOT com

TI SensorTag

estimote
Tracer Keyfob

Pebble Keyfob
TI CC2450 miniDK

geektech Arduino BLE shield
Linux e Mac OS X
Bluetooth Low Energy

•

gerdavax AT gmail DOT com

Linux
•
•
•

•

Qualsiasi dongle USB Bluetooth 4.0 dual-mode (su ebay a 10 euro!)
bluez 5.1
Suggerimento: scaricare (e compilare) l’ultima release dal repository
ufficiale, anziché usare la build presente nelle distribuzioni


Mac OS X
•
•

Tutti i (nuovi) Mac usciti sul mercato dal 2012 dovrebbero avere
Bluetooth Low Energy a bordo
LightBlue (utility gratuita su Mac App Store)
Linux: discovery dei dispositivi
Bluetooth Low Energy

gerdavax AT gmail DOT com

output di:
hcitool -i hci0 lescan
Linux: lista servizi e lettura caratteristiche
Bluetooth cui
Si seleziona il device conLow Energy
comunicare in modalità interattiva

gerdavax AT gmail DOT com

Lista servizi primari

La batteria è carica (0x64 = 100%)

lettura della caratteristica
“battery level” esposta dal
“battery service”
Mac OS X: LightBlue per far tutto!
Bluetooth Low Energy

gerdavax
La batteria è carica AT gmail DOT com
(0x64 = 100%)
BLE Scanner su Android
Bluetooth Low Energy

gerdavax AT gmail DOT com
FAQ su Bluetooth Low Energy vs resto del mondo
Bluetooth Low Energy

gerdavax AT gmail DOT com

•

Per usare BLE è sufficiente un aggiornamento software?
• No!


•

BLE sostituisce Bluetooth Classic?
• No!


•

BLE rimpiazzerà NFC?
• Bella domanda :-)
• Hanno casi d’uso piuttosto diversi (malgrado ciò che si dice…)


•

BLE sarà lo standard del futuro?
• Se lo sapessi, non sarei qui! (comunque, credo di si)
Conclusioni
Bluetooth Low Energy

gerdavax AT gmail DOT com

•

Bluetooth Low Energy sarà la più grande ed invadente
evoluzione delle comunicazioni wireless a corto raggio


•

Parallelamente alla diffusione di oggetti direttamente
connessi alla Rete (IoT), lo smartphone diventerà
centro-stella e gateway di una moltitudine di dispositivi
invisibili che circondano gli utenti


•

Importanti implicazioni per la privacy: chi raccoglie i
dati sulla nostra vita li userà per condizionarci?
• “abbiamo rilevato che sei fiacco, perché non prendi un po’ di XYZ?”
Ringraziamenti
Bluetooth Low Energy

gerdavax AT gmail DOT com

•

Mara Marzocchi, Marco Casario, Gosia Sosnowska e tutto il
team di Codemotion per l’enorme lavoro che fanno ogni anno
per la community italiana degli sviluppatori software


•

Matteo @mbonifazi Bonifazi per avermi prestato il suo Nexus
7 2013 mentre ero in attesa del Nexus 5 e dell’aggiornamento
ad Android 4.3 sul Galaxy S3


•

Roberto @frabons Fraboni per aver condiviso scenari e
curiosità sull’uso degli iBeacon
Riferimenti e risorse
Bluetooth Low Energy

gerdavax AT gmail DOT com

•

https://developer.bluetooth.org/TechnologyOverview/Pages/BLE.aspx


•

http://developer.android.com/guide/topics/connectivity/bluetooth-le.html 


•

https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/
Conceptual/CoreBluetooth_concepts/AboutCoreBluetooth/Introduction.html


•

Bluetooth Low Energy: The Developer’s Handbook (Robin Heydon, Prentice-Hall)
Approfondimenti dai precedenti Codemotion
Bluetooth Low Energy

•

NFC

Tecnologia e applicazioni 

(2012)








•

Android Bluetooth Hacking 

(2010)

gerdavax AT gmail DOT com
Contatti
Bluetooth Low Energy

gerdavax AT gmail DOT com

!

•
•
•
•
•

mail: gerdavax AT gmail DOT com
blog: http://www.gerdavax.it
twitter: @gerdavax
slideshare: http://www.slideshare.net/gerdavax
Linkedin: http://www.linkedin.com/in/gerdavax

Contenu connexe

Similaire à Bluetooth Low Energy: la rivoluzione silenziosa dell’ambient intelligence

Iothings 2017 - Conferenza BUSINESS & TECHNOLOGY FOR ENTERPRISES
Iothings 2017 - Conferenza BUSINESS & TECHNOLOGY FOR ENTERPRISESIothings 2017 - Conferenza BUSINESS & TECHNOLOGY FOR ENTERPRISES
Iothings 2017 - Conferenza BUSINESS & TECHNOLOGY FOR ENTERPRISESPaola Visentin
 
HCIM08 - Mobile Applications
HCIM08 - Mobile ApplicationsHCIM08 - Mobile Applications
HCIM08 - Mobile ApplicationsStefano Sanna
 
Realizzare Accessori iOS con Bluetooth Low Energy e Arduino
Realizzare Accessori iOS con Bluetooth Low Energy e ArduinoRealizzare Accessori iOS con Bluetooth Low Energy e Arduino
Realizzare Accessori iOS con Bluetooth Low Energy e Arduinofibasile
 
Smau Milano 2016 - Newen
Smau Milano 2016 - NewenSmau Milano 2016 - Newen
Smau Milano 2016 - NewenSMAU
 
Controllo di un impianto My Home da iPad iPhone-iPod touch
Controllo di un impianto My Home da iPad iPhone-iPod touch  Controllo di un impianto My Home da iPad iPhone-iPod touch
Controllo di un impianto My Home da iPad iPhone-iPod touch INGEGNI Tech Srl
 
Corso cellulari - Sesta lezione
Corso cellulari - Sesta lezioneCorso cellulari - Sesta lezione
Corso cellulari - Sesta lezioneFranco Mangini
 
Easy Speech @ A&T 2019, Paola Visentin - BluEpyc
Easy Speech @ A&T 2019, Paola Visentin - BluEpycEasy Speech @ A&T 2019, Paola Visentin - BluEpyc
Easy Speech @ A&T 2019, Paola Visentin - BluEpycPaola Visentin
 
Tecnologie RFID e Bluetooth Low Energy a monte della filiera del dato 4.0: pi...
Tecnologie RFID e Bluetooth Low Energy a monte della filiera del dato 4.0: pi...Tecnologie RFID e Bluetooth Low Energy a monte della filiera del dato 4.0: pi...
Tecnologie RFID e Bluetooth Low Energy a monte della filiera del dato 4.0: pi...RFID Global by Softwork
 
2015 CLOUD LOGIN - Servizi su Piattaforma Softlayer
2015 CLOUD LOGIN - Servizi su Piattaforma Softlayer2015 CLOUD LOGIN - Servizi su Piattaforma Softlayer
2015 CLOUD LOGIN - Servizi su Piattaforma SoftlayerServiceCloud - Esprinet
 
Informatica per studio professionale
Informatica per studio professionaleInformatica per studio professionale
Informatica per studio professionaleLodovico Mabini
 
One - L'assistente vocale fai da te
One - L'assistente vocale fai da teOne - L'assistente vocale fai da te
One - L'assistente vocale fai da teClaudio Cama
 
Android - Programmazione Avanzata
Android -  Programmazione AvanzataAndroid -  Programmazione Avanzata
Android - Programmazione AvanzataStefano Sanna
 
Flutter e BLE: Integrazione con dispositivi IoT
Flutter e BLE: Integrazione con dispositivi IoTFlutter e BLE: Integrazione con dispositivi IoT
Flutter e BLE: Integrazione con dispositivi IoTDaniele Monte
 
Microsoft Azure per l'IT Pro
Microsoft Azure per l'IT ProMicrosoft Azure per l'IT Pro
Microsoft Azure per l'IT ProMarco Parenzan
 

Similaire à Bluetooth Low Energy: la rivoluzione silenziosa dell’ambient intelligence (20)

Iothings 2017 - Conferenza BUSINESS & TECHNOLOGY FOR ENTERPRISES
Iothings 2017 - Conferenza BUSINESS & TECHNOLOGY FOR ENTERPRISESIothings 2017 - Conferenza BUSINESS & TECHNOLOGY FOR ENTERPRISES
Iothings 2017 - Conferenza BUSINESS & TECHNOLOGY FOR ENTERPRISES
 
HCIM08 - Mobile Applications
HCIM08 - Mobile ApplicationsHCIM08 - Mobile Applications
HCIM08 - Mobile Applications
 
Realizzare Accessori iOS con Bluetooth Low Energy e Arduino
Realizzare Accessori iOS con Bluetooth Low Energy e ArduinoRealizzare Accessori iOS con Bluetooth Low Energy e Arduino
Realizzare Accessori iOS con Bluetooth Low Energy e Arduino
 
BLUETOOTH SECURITY - part1
BLUETOOTH SECURITY - part1BLUETOOTH SECURITY - part1
BLUETOOTH SECURITY - part1
 
Smau Milano 2016 - Newen
Smau Milano 2016 - NewenSmau Milano 2016 - Newen
Smau Milano 2016 - Newen
 
Controllo di un impianto My Home da iPad iPhone-iPod touch
Controllo di un impianto My Home da iPad iPhone-iPod touch  Controllo di un impianto My Home da iPad iPhone-iPod touch
Controllo di un impianto My Home da iPad iPhone-iPod touch
 
Sviluppare applicazioni Domino Web per dispositivi Mobili
Sviluppare applicazioni Domino Web per dispositivi MobiliSviluppare applicazioni Domino Web per dispositivi Mobili
Sviluppare applicazioni Domino Web per dispositivi Mobili
 
Corso cellulari - Sesta lezione
Corso cellulari - Sesta lezioneCorso cellulari - Sesta lezione
Corso cellulari - Sesta lezione
 
20151101 tpcmag november novembre
20151101 tpcmag november novembre20151101 tpcmag november novembre
20151101 tpcmag november novembre
 
Easy Speech @ A&T 2019, Paola Visentin - BluEpyc
Easy Speech @ A&T 2019, Paola Visentin - BluEpycEasy Speech @ A&T 2019, Paola Visentin - BluEpyc
Easy Speech @ A&T 2019, Paola Visentin - BluEpyc
 
Privacy in enigmate
Privacy in enigmatePrivacy in enigmate
Privacy in enigmate
 
Tecnologie RFID e Bluetooth Low Energy a monte della filiera del dato 4.0: pi...
Tecnologie RFID e Bluetooth Low Energy a monte della filiera del dato 4.0: pi...Tecnologie RFID e Bluetooth Low Energy a monte della filiera del dato 4.0: pi...
Tecnologie RFID e Bluetooth Low Energy a monte della filiera del dato 4.0: pi...
 
Lenovo T450s
Lenovo T450sLenovo T450s
Lenovo T450s
 
2015 CLOUD LOGIN - Servizi su Piattaforma Softlayer
2015 CLOUD LOGIN - Servizi su Piattaforma Softlayer2015 CLOUD LOGIN - Servizi su Piattaforma Softlayer
2015 CLOUD LOGIN - Servizi su Piattaforma Softlayer
 
Informatica per studio professionale
Informatica per studio professionaleInformatica per studio professionale
Informatica per studio professionale
 
One - L'assistente vocale fai da te
One - L'assistente vocale fai da teOne - L'assistente vocale fai da te
One - L'assistente vocale fai da te
 
Android - Programmazione Avanzata
Android -  Programmazione AvanzataAndroid -  Programmazione Avanzata
Android - Programmazione Avanzata
 
Adesso In Onda
Adesso In OndaAdesso In Onda
Adesso In Onda
 
Flutter e BLE: Integrazione con dispositivi IoT
Flutter e BLE: Integrazione con dispositivi IoTFlutter e BLE: Integrazione con dispositivi IoT
Flutter e BLE: Integrazione con dispositivi IoT
 
Microsoft Azure per l'IT Pro
Microsoft Azure per l'IT ProMicrosoft Azure per l'IT Pro
Microsoft Azure per l'IT Pro
 

Plus de Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 

Plus de Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Dernier

Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Associazione Digital Days
 
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Associazione Digital Days
 
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Associazione Digital Days
 
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Associazione Digital Days
 
ScrapeGraphAI: a new way to scrape context with AI
ScrapeGraphAI: a new way to scrape context with AIScrapeGraphAI: a new way to scrape context with AI
ScrapeGraphAI: a new way to scrape context with AIinfogdgmi
 
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Associazione Digital Days
 

Dernier (6)

Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
Edoardo Di Pietro – “Virtual Influencer vs Umano: Rubiamo il lavoro all’AI”
 
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
Daniele Lunassi, CEO & Head of Design @Eye Studios – “Creare prodotti e servi...
 
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
Luigi Di Carlo, CEO & Founder @Evometrika srl – “Ruolo della computer vision ...
 
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
Alessio Mazzotti, Aaron Brancotti; Writer, Screenwriter, Director, UX, Autore...
 
ScrapeGraphAI: a new way to scrape context with AI
ScrapeGraphAI: a new way to scrape context with AIScrapeGraphAI: a new way to scrape context with AI
ScrapeGraphAI: a new way to scrape context with AI
 
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
Federico Bottino, Lead Venture Builder – “Riflessioni sull’Innovazione: La Cu...
 

Bluetooth Low Energy: la rivoluzione silenziosa dell’ambient intelligence

  • 1. Stefano Sanna Bluetooth Low Energy: la rivoluzione silenziosa dell’ambient intelligence gerdavax AT gmail DOT com
  • 2. Agenda Bluetooth Low Energy • Presentazioni ! • Ambient Intelligence ! • Bluetooth • Genesi ed evoluzioni • Bluetooth Low Energy • Playground
 • FAQ & Conclusioni gerdavax AT gmail DOT com
  • 3. Speaker Bluetooth Low Energy • gerdavax AT gmail DOT com Responsabile Android Lab @ Open Reply ! • Co-autore di “Android Programmazione Avanzata”
 (con E. Di Saverio, Ed. FAG) ! • Autore del libro “Java Micro Edition” 
 (Hoepli) ! • Supporter @ Codemotion since 2005 (JIP Day!)
  • 4. Slide’s title Bluetooth Low Energy Cablaggi nella metropolitana di Londra gerdavax AT gmail DOT com
  • 5. Bluetooth Low Energy gerdavax AT gmail DOT com 2002: quattro mani per usare un PDA con touchscreen resistivo 
 (con pennino), modem 2G seriale, GPS seriale e fotocamera da 1.5MPX)
  • 6. Bluetooth Low Energy gerdavax AT gmail DOT com
  • 7. Ambient Intelligence Bluetooth Low Energy gerdavax AT gmail DOT com In computing, ambient intelligence (AmI) refers to electronic environments that are sensitive and responsive to the presence of people.
 Ambient intelligence is a vision on the future of consumer electronics, telecommunications and computing that was originally developed in the late 1990s for the time frame 2010–2020. 
 In an ambient intelligence world, devices work in concert to support people in carrying out their everyday life activities, tasks and rituals in an easy, natural way using information and intelligence that is hidden in the network connecting these devices (see Internet of Things). 
 As these devices grow smaller, more connected and more integrated into our environment, the technology disappears into our surroundings until only the user interface remains perceivable by users. http://en.wikipedia.org/wiki/Ambient_intelligence
  • 8. Everyday Life Activity Bluetooth Low Energy gerdavax AT gmail DOT com • Sveglia, casa, doccia, colazione, news…
 • Abbigliamento, agenda, si parte!
 • Cammino, bici, auto, scooter, treno, metro, aereo…
 • Home office, HQ office, client office, mobile office…
 • Centro commerciale, parcheggio, ospedale, aeroporto, stazione, parco, cinema, palestra, piscina, scuola, mare, montagna, ristorante…
  • 9. Everyday Life Activity Bluetooth Low Energy Info ambiente Prossimità Beacon Localizzazione Termometro corporeo Cardio Clima Pressione arteriosa • gerdavax AT gmail DOT com frequenzimetro Controllo accessi Ciclo del sonno Glucometro Energia Tracker Pesapersone Ciclometro Metro Safety & Security
  • 10. Breve storia di Bluetooth Bluetooth Low Energy • • • • • • • • • • gerdavax AT gmail DOT com 1994: nasce come “cable replacement” per connessioni seriali 1999: rilasciato Bluetooth 1.0, piuttosto instabile… 2003: rilasciato Bluetooth 1.2, stabile e realmente funzionale 2004: arriva Bluetooth 2.0 con EDR: aumenta la velocità 2006: Nokia annuncia Wibree per comunicazione a basso consumo 2007: è l’anno di Bluetooth 2.1+EDR. Migliora la sicurezza 2009: arriva Bluetooth 3.0 2010: è annunciato Bluetooth 4.0 con estensioni Low Energy 2011: Mac mini, MacBook Air e iPhone 4s sono i primi dispositivi equipaggiati con Bluetooth 4.0 2013: 2.5 miliardi di device Bluetooth-enabled nel mondo
  • 11. Alcuni dei limiti di Bluetooth Bluetooth Low Energy • • • • • • • • • • gerdavax AT gmail DOT com Consumo energetico non trascurabile Massimo 7 slave per ogni master Fragile in contesti di elevato affollamento Tempi di discovery troppo lunghi (sino a 20s) Advertising “su richiesta” Meccanismi di pairing lenti Scarsa granularità dei profili Stack piuttosto ricco (e, dunque, complesso) Regole visibilità e discovery limitate Stream-oriented (RFCOMM o Audio)
  • 12. La contro-evoluzione: 4.0 non è 3.0++! Bluetooth Low Energy • gerdavax AT gmail DOT com Architettura non simmetrica (central vs peripheral) • Sbilanciare i ruoli consente di avere periferiche semplici, poco costose e con bassissimo consumo di energia (< 15mA picco) Compiti complessi lasciati all’host Non è previsto il cambio di ruolo (vedi HSP) • • • Pacchetti piccoli ( < 50 byte) • Richiedono poca energia per essere trasmessi • MCU più semplice, meno memoria, meno possibilità di errore • Trasmissione a bassa velocità e bassa potenza • Advertising spontaneo e dinamico • 3 canali di advertising anziché 32FH • 40 canali complessivi
  • 13. Contro-evoluzione: velocità Bluetooth Low Energy gerdavax AT gmail DOT com 60 54 Velocità (Mbps) 45 30 15 1 3 0,3 0 v1.1 v2.0 v3.0 v4.0
  • 14. Magico, Prossimo, Fisico Bluetooth Low Energy • gerdavax AT gmail DOT com Magico • apparati piccolissimi • • autonomia incredibile discovery in pochi millisecondi
 • Prossimo • funziona a brevissima distanza • l’info sulla potenza (normalizzata 1m) consente localizzazione indoor
 • Fisico • È possibile… infilarlo ovunque! • Le prime applicazioni sono davvero legate alle attività quotidiane
  • 15. Ruoli Bluetooth Low Energy • gerdavax AT gmail DOT com Advertiser • • Invia segnali periodici, non è dotato di ricevitore Scanner • • Attende segnali provenienti da un broadcaster; non trasmette Peripheral • • Ricetrasmittente, lavora principalmente in modalità server Central • Tipicamente un computer o un device mobile, lavora principalmente in modalità client verso uno o più peripheral
 (su Bluetooth Classic solo Master e Slave, con assegnazione dinamica)
  • 16. Versioni e “branding” dei dispositivi Bluetooth Low Energy gerdavax AT gmail DOT com
  • 17. Versioni e “branding” dei dispositivi Bluetooth Low Energy • gerdavax AT gmail DOT com Bluetooth Classic • • • Compatibile esclusivamente con Bluetooth 1.1, 2.0 e 3.0 Sono tutti i dispositivi pre-Bluetooth 4.0 e quelli attuali non dotati di funzionalità LE Bluetooth Smart • • • Compatibile esclusivamente Bluetooth 4.0 low energy (single mode) Funzionante nella sola modalità peripheral Bluetooth Smart Ready • • Compatibile con l’intera specifica Bluetooth 4.0 (dual mode) Dialoga con dispositivi Classic e con dispositivi LE
  • 18. Stack Bluetooth Classic Bluetooth Low Energy gerdavax AT gmail DOT com SPP/DUN/OPP RFCOMM SDP L2CAP HCI LINK MANAGER BR/EDR PHY
  • 19. Stack Bluetooth Smart Bluetooth Low Energy gerdavax AT gmail DOT com GAP GATT SMP ATT L2CAP HCI LINK LAYER LE PHY
  • 20. Stack Bluetooth Smart Ready Bluetooth Low Energy gerdavax AT gmail DOT com SPP/DUN/OPP RFCOMM GAP SMP SDP GATT ATT L2CAP HCI LINK MANAGER LINK LAYER BR/EDR PHY LE PHY
  • 21. I profili in Bluetooth Classic Bluetooth Low Energy gerdavax AT gmail DOT com
  • 22. GATT: Generic Attribute Profile (1) Bluetooth Low Energy • gerdavax AT gmail DOT com Servizio • • • Insieme di caratteristiche aggregate per erogare una funzionalità Esempio: • “Health Thermometer Service” Caratteristiche • • Un singolo valore accessibile in lettura o scrittura Esempio: • “Temperature Measurement” (temperatura letta) • “Temperature Type” (tipo di termometro) • “Intermediate Temperature” (letture in-progress) • “Measurement Interval” https://developer.bluetooth.org/gatt/services/Pages/ServiceViewer.aspx?u=org.bluetooth.service.health_thermometer.xml
  • 23. GATT: Generic Attribute Profile (2) Bluetooth Low Energy • gerdavax AT gmail DOT com Descrittori • • • Informazioni accessorie su una caratteristica Esempio: • “Is write supported” sulla caratteristica che gestisce l’intervallo di campionamento
 Tutto è un UUID • • A qualsiasi entità è assegnato un UUID (Universally Unique IDentifier) Accanto a BD-Address e Friendly-Name, un dispositivo può usare un UUID anche in advertising (feature usata dagli iBeacon di Apple)
  • 24. Profili, Servizi, Caratteristiche, Descrittori… Bluetooth Low Energy gerdavax AT gmail DOT com Profile Service Service Service Characteristic Characteristic Characteristic Value Descriptor Descriptor Descriptor
  • 25. UUID Bluetooth Low Energy gerdavax AT gmail DOT com Entità UUID Base Bluetooth 00000000-0000-1000-8000-00805F9B34FB Generic Access 00001800-0000-1000-8000-00805F9B34FB GATT 00001801-0000-1000-8000-00805F9B34FB Immediate Alert 00001802-0000-1000-8000-00805F9B34FB Health Thermometer 00001809-0000-1000-8000-00805F9B34FB Heart Rate 0000180D-0000-1000-8000-00805F9B34FB Battery Service 0000180F-0000-1000-8000-00805F9B34FB Battery Level 00002A19-0000-1000-8000-00805F9B34FB Blood Pressure 00001810-0000-1000-8000-00805F9B34FB Current Time 00001805-0000-1000-8000-00805F9B34FB TX Power 00001804-0000-1000-8000-00805F9B34FB
  • 26. Sistemi operativi e supporto BLE Bluetooth Low Energy • Desktop • • • • Linux Mac OS X Windows
 Mobile • • • • Android 4.3 iOS 5 Windows Phone 8 BlackBerry 10 gerdavax AT gmail DOT com
  • 27. Android API per Bluetooth Low Energy Bluetooth Low Energy gerdavax AT gmail DOT com • Introdotta in Android 4.3 Jelly Bean
 • Consente di gestire GATT client e server, accesso a caratteristiche e descrittori, registrazione per le notifiche
 • Non supporta la modalità “peripheral”: attualmente, dunque, non è possibile creare un beacon (come su iPhone)
 • Android 4.4 KitKat offre un logger dei pacchetti a livello HCI
  • 28. Device Android con supporto Bluetooth Low Energy Bluetooth Low Energy • • gerdavax AT gmail DOT com • Google: Nexus 4, Nexus 5, Nexus 7 “2013” Samsung: Galaxy S3, S3 mini, Galaxy S4, S4 mini; Note 2, Note 3, Note 8”, Note 10” 2014 Edition LG: Optimus G, 4X, G2
 • Grandi assenti: Galaxy Nexus, Nexus 7, Nexus 10
 • Altri dispositivi con Android 4.2.x possono disporre di API proprietarie per l’accesso al modulo BLE
 • Importante: non basta un semplice aggiornamento software per avere BLE, occorre un hardware dedicato!
  • 29. Principali differenze nelle API “Classic” e LE Bluetooth Low Energy gerdavax AT gmail DOT com • Il dispatching degli eventi avviene attraverso normali “listener” anziché via Intent e BroadcastReceiver
 • I componenti che modellano GATT client, caratteristiche e descrittori non sono Parcelable: l’intera gestione della comunicazione avviene all’interno di un singolo Fragment
 • Lettura e scrittura sono asincrone (addio I/O stream)
 • La stabilità (pre KitKat) lascia un po’ a desiderare…
  • 30. API Android Bluetooth Low Energy gerdavax AT gmail DOT com BluetoothManager manager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE); adapter = manager.getAdapter(); boolean started = adapter.startLeScan(mLeScanCallback); BluetoothAdapter.LeScanCallback mLeScanCallback = new BluetoothAdapter.LeScanCallback() { @Override public void onLeScan(final BluetoothDevice device, int rssi, final byte[] scanRecord) { ! // ! } }; gestione device…
  • 31. API Android Bluetooth Low Energy 1 gerdavax AT gmail DOT com BluetoothGatt mGatt = device.connectGatt(getActivity(), true, new BluetoothGattCallback() { String SERVICE = “0000180F-0000-1000-8000-00805F9B34FB”; String LEVEL = “00002A19-0000-1000-8000-00805F9B34FB”; ! 2 @Override public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) { if (status == BluetoothGatt.GATT_SUCCESS && newState == BluetoothGatt.STATE_CONNECTED) { BluetoothGattService service = gatt.getService(UUID.fromString(SERVICE)); BluetoothGattCharacteristic ch = service.getCharacteristics(UUID.fromString(LEVEL)); gatt.readCharacteristic(ch); } } @Override public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic ch, int st) { final int batteryLevel = ch.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT8, 0); } }); 3
  • 32. Playground: sperimentare con BLE Bluetooth Low Energy Kontakt Beacon WTEK Heartrate Monitor gerdavax AT gmail DOT com TI SensorTag estimote Tracer Keyfob Pebble Keyfob TI CC2450 miniDK geektech Arduino BLE shield
  • 33. Linux e Mac OS X Bluetooth Low Energy • gerdavax AT gmail DOT com Linux • • • • Qualsiasi dongle USB Bluetooth 4.0 dual-mode (su ebay a 10 euro!) bluez 5.1 Suggerimento: scaricare (e compilare) l’ultima release dal repository ufficiale, anziché usare la build presente nelle distribuzioni
 Mac OS X • • Tutti i (nuovi) Mac usciti sul mercato dal 2012 dovrebbero avere Bluetooth Low Energy a bordo LightBlue (utility gratuita su Mac App Store)
  • 34. Linux: discovery dei dispositivi Bluetooth Low Energy gerdavax AT gmail DOT com output di: hcitool -i hci0 lescan
  • 35. Linux: lista servizi e lettura caratteristiche Bluetooth cui Si seleziona il device conLow Energy comunicare in modalità interattiva gerdavax AT gmail DOT com Lista servizi primari La batteria è carica (0x64 = 100%) lettura della caratteristica “battery level” esposta dal “battery service”
  • 36. Mac OS X: LightBlue per far tutto! Bluetooth Low Energy gerdavax La batteria è carica AT gmail DOT com (0x64 = 100%)
  • 37. BLE Scanner su Android Bluetooth Low Energy gerdavax AT gmail DOT com
  • 38. FAQ su Bluetooth Low Energy vs resto del mondo Bluetooth Low Energy gerdavax AT gmail DOT com • Per usare BLE è sufficiente un aggiornamento software? • No!
 • BLE sostituisce Bluetooth Classic? • No!
 • BLE rimpiazzerà NFC? • Bella domanda :-) • Hanno casi d’uso piuttosto diversi (malgrado ciò che si dice…)
 • BLE sarà lo standard del futuro? • Se lo sapessi, non sarei qui! (comunque, credo di si)
  • 39. Conclusioni Bluetooth Low Energy gerdavax AT gmail DOT com • Bluetooth Low Energy sarà la più grande ed invadente evoluzione delle comunicazioni wireless a corto raggio
 • Parallelamente alla diffusione di oggetti direttamente connessi alla Rete (IoT), lo smartphone diventerà centro-stella e gateway di una moltitudine di dispositivi invisibili che circondano gli utenti
 • Importanti implicazioni per la privacy: chi raccoglie i dati sulla nostra vita li userà per condizionarci? • “abbiamo rilevato che sei fiacco, perché non prendi un po’ di XYZ?”
  • 40. Ringraziamenti Bluetooth Low Energy gerdavax AT gmail DOT com • Mara Marzocchi, Marco Casario, Gosia Sosnowska e tutto il team di Codemotion per l’enorme lavoro che fanno ogni anno per la community italiana degli sviluppatori software
 • Matteo @mbonifazi Bonifazi per avermi prestato il suo Nexus 7 2013 mentre ero in attesa del Nexus 5 e dell’aggiornamento ad Android 4.3 sul Galaxy S3
 • Roberto @frabons Fraboni per aver condiviso scenari e curiosità sull’uso degli iBeacon
  • 41. Riferimenti e risorse Bluetooth Low Energy gerdavax AT gmail DOT com • https://developer.bluetooth.org/TechnologyOverview/Pages/BLE.aspx
 • http://developer.android.com/guide/topics/connectivity/bluetooth-le.html 
 • https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/ Conceptual/CoreBluetooth_concepts/AboutCoreBluetooth/Introduction.html
 • Bluetooth Low Energy: The Developer’s Handbook (Robin Heydon, Prentice-Hall)
  • 42. Approfondimenti dai precedenti Codemotion Bluetooth Low Energy • NFC
 Tecnologia e applicazioni 
 (2012)
 
 
 
 • Android Bluetooth Hacking 
 (2010) gerdavax AT gmail DOT com
  • 43. Contatti Bluetooth Low Energy gerdavax AT gmail DOT com ! • • • • • mail: gerdavax AT gmail DOT com blog: http://www.gerdavax.it twitter: @gerdavax slideshare: http://www.slideshare.net/gerdavax Linkedin: http://www.linkedin.com/in/gerdavax