SlideShare a Scribd company logo
Getting Physical
with Web Bluetooth
in the browser
Dan Jenkins
@dan_jenkins
@dan_jenkins
Dan Jenkins
@dan_jenkins
nimblea.pe
dan@nimblea.pe
@nimbleapeltd
@dan_jenkins
Getting
Physical
Physical
@dan_jenkins
Ever wished you could "click"
on things in real life and find
out more about them?
@dan_jenkins
Been
somewhere
that had
these?
@dan_jenkins
They're
everywhere!
@dan_jenkins
But there are
many other
places where
we want to
interact with
something
around us
@dan_jenkins
The Physical Web
@dan_jenkins
@dan_jenkins
@dan_jenkins
How do I use this magic?
@dan_jenkins
DEMO
@dan_jenkins
Android or
iOS
@dan_jenkins
Android iOS
• Location & Bluetooth turned on

• Android "Nearby" enabled (default)
https://android.googleblog.com/2016/06/introducing-nearby-new-way-to-discover.html
• Bluetooth turned on

• Chrome Notifications enabled 

(Allow the Chrome widget in
Notification Center)
https://docs.pushmote.com/docs/how-to-enable-chromes-physical-web-extension-on-the-ios
@dan_jenkins
@dan_jenkins
@dan_jenkins
How do I use this magic?
@dan_jenkins
Eddystone
•
Open Message Format
•
A few different parts to Eddystone but all we care about here is
Eddystone URL format
•
Eddystone URLs have 18 bytes worth of data that can be broadcast
•
Eddystone is supported by over 30 vendors
•
Eddystone is also compatible with iBeacon
•
https://developers.google.com/beacons/eddystone
@dan_jenkins
Chrome•
Chrome on iOS and Nearby on Android scans for BLE beacons with
Eddystone URLs
•
Chrome only supports HTTPS URLs
•
Chrome then sends those URLs up to Google's Proxy service
(does some extra magic)
•
The Proxy service then sends those URLs back to Chrome
•
Chrome/Nearby shows a notification
So all of this doesn't work unless you have data!
@dan_jenkins
@dan_jenkins
When you add in
Progressive Web Apps,
your reason for having a
Native app
dwindles
@dan_jenkins
And they're being used
today
@dan_jenkinshttp://www.proxama.com/news/proxama-partners-with-google-to-deliver-worlds-first-physical-web-experience-for-consumers/
@dan_jenkinshttp://www.proxama.com/news/proxama-partners-with-google-to-deliver-worlds-first-physical-web-experience-for-consumers/
@dan_jenkins
And there are beacons
here today
@dan_jenkins
BUT,
There's more...
@dan_jenkins
Web
Bluetooth
@dan_jenkins
Your browser can
connect to
Bluetooth Low Energy
(BLE) devices directly
@dan_jenkins
Using JavaScript, we
can now connect to
physical devices using
BLE and control them
@dan_jenkins
@dan_jenkins
DEMO(S)
@dan_jenkins
BLE (not just toys)
32
@dan_jenkins
BLE (not just toys)
33
@dan_jenkins
BLE (okay... a fair few toys)
34
@dan_jenkins
Stepping back, what is BLE?
•
Low Bandwidth
•
Bluetooth v4 - Bluetooth Low Energy (0.3 Mbps)
•
Bluetooth v3 (54 Mbps)
•
A set of Standard Services
•
But you can also build your own services
@dan_jenkins
BLE GATT Server
Gatt Server
Custom ServiceBattery Service
Battery Level
Characteristic
Custom
Characteristic #1
Custom
Characteristic #1
@dan_jenkins
Let's take a look at the
Web Bluetooth API
@dan_jenkins
var options = { filters: [{ services: ['heart_rate'] }] };
navigator.bluetooth.requestDevice(options)
.then(device => device.gatt.connect())
.then(server => server.getPrimaryService('heart_rate'))
.then(service => service.getCharacteristic('heart_rate_measurement'))
.then(characteristic => {
characteristic.addEventListener('characteristicvaluechanged', beep);
return characteristic.startNotifications();
})
.catch(error => { console.log(error); });
function beep(event) { console.log(event.target.value); }
@dan_jenkins
var options = { filters: [{ services: ['heart_rate'] }] };
navigator.bluetooth.requestDevice(options)
.then(device => device.gatt.connect())
.then(server => server.getPrimaryService('heart_rate'))
.then(service => service.getCharacteristic('heart_rate_measurement'))
.then(characteristic => {
characteristic.addEventListener('characteristicvaluechanged', beep);
return characteristic.startNotifications();
})
.catch(error => { console.log(error); });
function beep(event) { console.log(event.target.value); }
@dan_jenkins
var options = { filters: [{ services: ['heart_rate'] }] };
navigator.bluetooth.requestDevice(options)
.then(device => device.gatt.connect())
.then(server => server.getPrimaryService('heart_rate'))
.then(service => service.getCharacteristic('heart_rate_measurement'))
.then(characteristic => {
characteristic.addEventListener('characteristicvaluechanged', beep);
return characteristic.startNotifications();
})
.catch(error => { console.log(error); });
function beep(event) { console.log(event.target.value); }
@dan_jenkins
var options = { filters: [{ services: ['heart_rate'] }] };
navigator.bluetooth.requestDevice(options)
.then(device => device.gatt.connect())
.then(server => server.getPrimaryService('heart_rate'))
.then(service => service.getCharacteristic('heart_rate_measurement'))
.then(characteristic => {
characteristic.addEventListener('characteristicvaluechanged', beep);
return characteristic.startNotifications();
})
.catch(error => { console.log(error); });
function beep(event) { console.log(event.target.value); }
@dan_jenkins
var options = { filters: [{ services: ['heart_rate'] }] };
navigator.bluetooth.requestDevice(options)
.then(device => device.gatt.connect())
.then(server => server.getPrimaryService('heart_rate'))
.then(service => service.getCharacteristic('heart_rate_measurement'))
.then(characteristic => {
characteristic.addEventListener('characteristicvaluechanged', beep);
return characteristic.startNotifications();
})
.catch(error => { console.log(error); });
function beep(event) { console.log(event.target.value); }
@dan_jenkins
var options = { filters: [{ services: ['heart_rate'] }] };
navigator.bluetooth.requestDevice(options)
.then(device => device.gatt.connect())
.then(server => server.getPrimaryService('heart_rate'))
.then(service => service.getCharacteristic('heart_rate_measurement'))
.then(characteristic => {
characteristic.addEventListener('characteristicvaluechanged', beep);
return characteristic.startNotifications();
})
.catch(error => { console.log(error); });
function beep(event) { console.log(event.target.value); }
@dan_jenkins
var options = { filters: [{ services: ['heart_rate'] }] };
navigator.bluetooth.requestDevice(options)
.then(device => device.gatt.connect())
.then(server => server.getPrimaryService('heart_rate'))
.then(service => service.getCharacteristic('heart_rate_measurement'))
.then(characteristic => {
characteristic.addEventListener('characteristicvaluechanged', boop);
return characteristic.startNotifications();
})
.catch(error => { console.log(error); });
function boop(event) { console.log(event.target.value); }
@dan_jenkins
var options = { filters: [{ services: ['heart_rate'] }] };
navigator.bluetooth.requestDevice(options)
.then(device => device.gatt.connect())
.then(server => server.getPrimaryService('heart_rate'))
.then(service => service.getCharacteristic('heart_rate_measurement'))
.then(characteristic => {
characteristic.addEventListener('characteristicvaluechanged', beep);
return characteristic.startNotifications();
})
.catch(error => { console.log(error); });
function beep(event) { console.log(event.target.value); }
@dan_jenkins
var options = { filters: [{ services: ['heart_rate'] }] };
navigator.bluetooth.requestDevice(options)
.then(device => device.gatt.connect())
.then(server => server.getPrimaryService('heart_rate'))
.then(service => service.getCharacteristic('heart_rate_measurement'))
.then(characteristic => {
characteristic.addEventListener('characteristicvaluechanged', beep);
return characteristic.startNotifications();
})
.catch(error => { console.log(error); });
function beep(event) { console.log(event.target.value); }
@dan_jenkins
But what if the device was
broadcasting a URL
where it can be controlled
from?
@dan_jenkins
@dan_jenkins
Today, there's no way to
bypass that device
selection
Which kinda sucks
@dan_jenkins
But that's changing soon too
var referringDevice = navigator.bluetooth.referringDevice;
if (referringDevice) {
referringDevice.gatt.connect()
.then(server => { ... })
.catch(error => { console.log(error); });
}
@dan_jenkins
But that's changing soon too
var referringDevice = navigator.bluetooth.referringDevice;
if (referringDevice) {
referringDevice.gatt.connect()
.then(server => { ... })
.catch(error => { console.log(error); });
}
@dan_jenkins
Where can I play with Web
Bluetooth today?
In short.... Chrome/Chromium on...
Android
M & N
ChromeOS Linux
Android L with Chromium
OSX
(Chrome 53)
@dan_jenkins
But for more info...
https://github.com/WebBluetoothCG/web-bluetooth/blob/gh-pages/implementation-status.md
@dan_jenkins
And you have to enable it...
chrome://flags
@dan_jenkins
Oh and only on
Localhost & HTTPS...
There are quite a few hoops!
@dan_jenkins
Loads of demos out there
https://webbluetoothcg.github.io/demos/
@dan_jenkins
And you can make your own peripherals
BBC micro:bit
Arduino
Tessel
Raspberry Pi 3
@dan_jenkins
In the past 2 months
developing for Web
Bluetooth has become
easier
@dan_jenkins
Unless you're
developing on
Windows...
@dan_jenkins
Hardware with BLE is
cheap
@dan_jenkins
And you don't need
to use ChromeOS or
Android now
@dan_jenkins
Physical Web & Web Bluetooth
Some beacons now run a GATT server inside them
They run a "Eddystone URL Configuration Service"
@dan_jenkins
Physical Web & Web Bluetooth
http://cf.physical-web.org (redirects to a HTTPS url)
@dan_jenkins
Build things
with the Web
@dan_jenkins
There are less
and less
reasons to build
native apps
@dan_jenkins
goo.gl/7uAtkY
3 great Google I/O videos
about the Physical Web
and Web Bluetooth
@dan_jenkins
Thanks!
@dan_jenkins
@dan_jenkins
We're hiring
Developers!
Remote / Node.js / JavaScript / VoIP /
WebRTC / Other Cool Sh*t

More Related Content

What's hot (6)

PDF
WebRTC 101 - How to get started building your first WebRTC application
Dan Jenkins
 
PPT
Google compute presentation puppet conf
bodepd
 
PDF
async/await in Swift
Peter Friese
 
PDF
Rethink Async With RXJS
Ryan Anklam
 
PDF
Android dev toolbox - Shem Magnezi, WeWork
DroidConTLV
 
PDF
Future of Web Apps: Google Gears
dion
 
WebRTC 101 - How to get started building your first WebRTC application
Dan Jenkins
 
Google compute presentation puppet conf
bodepd
 
async/await in Swift
Peter Friese
 
Rethink Async With RXJS
Ryan Anklam
 
Android dev toolbox - Shem Magnezi, WeWork
DroidConTLV
 
Future of Web Apps: Google Gears
dion
 

Viewers also liked (16)

PDF
Bluetooth LE & iBeacons by Javier Chávarri (NSBarcelona)
barcelonaio
 
PPTX
YAMAHA YVC-1000
Paul Richards
 
PPTX
E band s -55 smart bluetooth bracelet in stock 6 colors
Paul Kopel
 
PPTX
Bluetooth low energy
Saptadeep Pal
 
PPTX
Bluetooth & Bluetooth Low Energy internals
Davy Jacops
 
PPTX
BLE Talk
programmarchy
 
PDF
What is Bluetooth Smart? - Technical Version
Veacon
 
PDF
The Internet of Things: BLE / Beacons / iBeacons
Vectorform
 
PDF
Bluetooth Smart (Low Energy) for Android
Localz
 
PPT
Bluetooth low energy(ble) wireless technology
Lin Steven
 
PDF
Intro to iBeacon and Bluetooth Low Energy
Kurt McIntire
 
PDF
BTLE (Bluetooth Low Energy) and CoreBluetooth
Zach Dennis
 
PPT
Bluetooth LE Button
dongbuluo
 
PPTX
Introduction to Bluetooth Low Energy
yeokm1
 
PDF
Core Bluetooth and BLE 101
Li Lin
 
PPT
Download presentation
webhostingguy
 
Bluetooth LE & iBeacons by Javier Chávarri (NSBarcelona)
barcelonaio
 
YAMAHA YVC-1000
Paul Richards
 
E band s -55 smart bluetooth bracelet in stock 6 colors
Paul Kopel
 
Bluetooth low energy
Saptadeep Pal
 
Bluetooth & Bluetooth Low Energy internals
Davy Jacops
 
BLE Talk
programmarchy
 
What is Bluetooth Smart? - Technical Version
Veacon
 
The Internet of Things: BLE / Beacons / iBeacons
Vectorform
 
Bluetooth Smart (Low Energy) for Android
Localz
 
Bluetooth low energy(ble) wireless technology
Lin Steven
 
Intro to iBeacon and Bluetooth Low Energy
Kurt McIntire
 
BTLE (Bluetooth Low Energy) and CoreBluetooth
Zach Dennis
 
Bluetooth LE Button
dongbuluo
 
Introduction to Bluetooth Low Energy
yeokm1
 
Core Bluetooth and BLE 101
Li Lin
 
Download presentation
webhostingguy
 
Ad

Similar to Getting physical with web bluetooth in the browser (20)

PDF
Let's Get Physical
Joel Lord
 
PDF
Cold front - bridging the web and the physical world
Kenneth Rohde Christiansen
 
PDF
Getting Physical with Web Bluetooth - Uri Shaked, BlackBerry
Codemotion Tel Aviv
 
PPTX
Can a browser become an IoT Gateway?
Sooraj Sanker
 
PDF
A brief overview of BLE on Android
Luka Bašek
 
PDF
Practical Core Bluetooth in IoT & Wearable projects @ UIKonf 2016
Shuichi Tsutsumi
 
PDF
Physical web inside and out final
startupIoT
 
PDF
JAM805 - Beyond the Device
Dr. Ranbijay Kumar
 
PDF
Let's Get Physical
Joel Lord
 
PDF
Practical Core Bluetooth in IoT & Wearable projects @ AltConf 2016
Shuichi Tsutsumi
 
PPTX
Controlling Bluetooth Low Energy Devices
Keerati Torach
 
PDF
THAT_2023_BLE.pdf
Robin Schroeder
 
PPTX
Bluetooth low energy final version
Frederick Bousson
 
PDF
XebiCon'16 : The Physical Web : un coup d'oeil sur le futur d'IoT et de la mo...
Publicis Sapient Engineering
 
PPT
GDG Eddystone overview Aug2016
David Pugh
 
PDF
LocalSocial O Reilly Webcast Slides - A Tour of the Beacosystem
Sean O'Sullivan
 
PPTX
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
Sencha
 
PDF
Intern_Report
Akanksha Kumari
 
PDF
A Brief Introduction to Bluetooth Low Energy (BLE) on iOS
Matt Whitlock
 
PPTX
Bw13 session2 app_dev_presenter_final
Blair Poloskey
 
Let's Get Physical
Joel Lord
 
Cold front - bridging the web and the physical world
Kenneth Rohde Christiansen
 
Getting Physical with Web Bluetooth - Uri Shaked, BlackBerry
Codemotion Tel Aviv
 
Can a browser become an IoT Gateway?
Sooraj Sanker
 
A brief overview of BLE on Android
Luka Bašek
 
Practical Core Bluetooth in IoT & Wearable projects @ UIKonf 2016
Shuichi Tsutsumi
 
Physical web inside and out final
startupIoT
 
JAM805 - Beyond the Device
Dr. Ranbijay Kumar
 
Let's Get Physical
Joel Lord
 
Practical Core Bluetooth in IoT & Wearable projects @ AltConf 2016
Shuichi Tsutsumi
 
Controlling Bluetooth Low Energy Devices
Keerati Torach
 
THAT_2023_BLE.pdf
Robin Schroeder
 
Bluetooth low energy final version
Frederick Bousson
 
XebiCon'16 : The Physical Web : un coup d'oeil sur le futur d'IoT et de la mo...
Publicis Sapient Engineering
 
GDG Eddystone overview Aug2016
David Pugh
 
LocalSocial O Reilly Webcast Slides - A Tour of the Beacosystem
Sean O'Sullivan
 
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
Sencha
 
Intern_Report
Akanksha Kumari
 
A Brief Introduction to Bluetooth Low Energy (BLE) on iOS
Matt Whitlock
 
Bw13 session2 app_dev_presenter_final
Blair Poloskey
 
Ad

More from Dan Jenkins (20)

PPTX
Yup... WebRTC Still Sucks
Dan Jenkins
 
PDF
Professional AV with WebRTC
Dan Jenkins
 
PDF
SIMCON 3
Dan Jenkins
 
PDF
Getting started with WebRTC
Dan Jenkins
 
PDF
JanusCon - Building Native Mobile Apps with WebRTC
Dan Jenkins
 
PDF
Astricon 2016 - Scaling ARI and Production
Dan Jenkins
 
PDF
WebRTC Reborn SignalConf 2016
Dan Jenkins
 
PDF
Web technology is getting physical, join the journey
Dan Jenkins
 
PDF
Building the Best Experience for Your Customers and Your Business
Dan Jenkins
 
PDF
WebRTC Reborn - Full Stack Toronto
Dan Jenkins
 
PDF
WebRTC Reborn - Cloud Expo / WebRTC Summit
Dan Jenkins
 
PDF
WebRTC Reborn - Full Stack
Dan Jenkins
 
PDF
Developing Yourself for Industry - University of Kent EDA MTD DA
Dan Jenkins
 
PDF
Building 21st Century Contact Centre Applications
Dan Jenkins
 
PDF
WebRTC Reborn Hackference
Dan Jenkins
 
PDF
WebRTC Reborn Over The Air
Dan Jenkins
 
PDF
WebRTC Reborn London Node User Group
Dan Jenkins
 
PDF
Bringing choas to order in your node.js app
Dan Jenkins
 
PDF
What is WebRTC? What can I do with it?
Dan Jenkins
 
PDF
Getting the Best Out Of WebRTC - Astricon 2014
Dan Jenkins
 
Yup... WebRTC Still Sucks
Dan Jenkins
 
Professional AV with WebRTC
Dan Jenkins
 
SIMCON 3
Dan Jenkins
 
Getting started with WebRTC
Dan Jenkins
 
JanusCon - Building Native Mobile Apps with WebRTC
Dan Jenkins
 
Astricon 2016 - Scaling ARI and Production
Dan Jenkins
 
WebRTC Reborn SignalConf 2016
Dan Jenkins
 
Web technology is getting physical, join the journey
Dan Jenkins
 
Building the Best Experience for Your Customers and Your Business
Dan Jenkins
 
WebRTC Reborn - Full Stack Toronto
Dan Jenkins
 
WebRTC Reborn - Cloud Expo / WebRTC Summit
Dan Jenkins
 
WebRTC Reborn - Full Stack
Dan Jenkins
 
Developing Yourself for Industry - University of Kent EDA MTD DA
Dan Jenkins
 
Building 21st Century Contact Centre Applications
Dan Jenkins
 
WebRTC Reborn Hackference
Dan Jenkins
 
WebRTC Reborn Over The Air
Dan Jenkins
 
WebRTC Reborn London Node User Group
Dan Jenkins
 
Bringing choas to order in your node.js app
Dan Jenkins
 
What is WebRTC? What can I do with it?
Dan Jenkins
 
Getting the Best Out Of WebRTC - Astricon 2014
Dan Jenkins
 

Recently uploaded (20)

PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
PDF
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
PPTX
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
PDF
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
PPTX
2025 HackRedCon Cyber Career Paths.pptx Scott Stanton
Scott Stanton
 
PDF
Pipeline Industry IoT - Real Time Data Monitoring
Safe Software
 
PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PDF
Proactive Server and System Monitoring with FME: Using HTTP and System Caller...
Safe Software
 
PDF
GDG Cloud Southlake #44: Eyal Bukchin: Tightening the Kubernetes Feedback Loo...
James Anderson
 
PPTX
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
PDF
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
PDF
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
PDF
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
PDF
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PPTX
The birth and death of Stars - earth and life science
rizellemarieastrolo
 
PDF
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
PDF
99 Bottles of Trust on the Wall — Operational Principles for Trust in Cyber C...
treyka
 
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
Simplify Your FME Flow Setup: Fault-Tolerant Deployment Made Easy with Packer...
Safe Software
 
2025 HackRedCon Cyber Career Paths.pptx Scott Stanton
Scott Stanton
 
Pipeline Industry IoT - Real Time Data Monitoring
Safe Software
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
Proactive Server and System Monitoring with FME: Using HTTP and System Caller...
Safe Software
 
GDG Cloud Southlake #44: Eyal Bukchin: Tightening the Kubernetes Feedback Loo...
James Anderson
 
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
 
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
The birth and death of Stars - earth and life science
rizellemarieastrolo
 
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
99 Bottles of Trust on the Wall — Operational Principles for Trust in Cyber C...
treyka
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 

Getting physical with web bluetooth in the browser