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
Wouldn't it be
cool to interact
with real life
using JavaScript
In the Browser?
@dan_jenkins
Imagine
walking up to
something...
@dan_jenkins
And being
able to use it.
With the Web.
@dan_jenkins
Drones, BB8,
Fitbits, Adult toys...
Bluetooth Low
Energy
@dan_jenkins
Let's take a
step back
@dan_jenkins
What is this magic?
@dan_jenkins
Physical Web
@dan_jenkins
Web Bluetooth
@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
Seeing
Physical Web
Notifications
@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
Android caveat
They've just rolled back to Chrome doing the Physical
Web notifications in latest Chrome for Android
https://goo.gl/MrAXUw
https://goo.gl/PMwBY2
@dan_jenkins
Android caveat
But that'll only be for 6 or so weeks...
@dan_jenkins
@dan_jenkins
Transmitting
Physical
Web URLs
@dan_jenkins
Beacons
@dan_jenkins
Apps
@dan_jenkins
Anything that can emit using
Bluetooth Low Energy
@dan_jenkins
What makes up the Physical Web?
@dan_jenkins
Eddystone
•
Open Message Format
•
Eddystone URLs have 18 bytes worth of data that
can be broadcast
•
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
All of this doesn't work unless you have data & location turned on
@dan_jenkins
@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
And you don't have to
use Chrome to get
them
https://www.phy.net/physical-web-browsers/
@dan_jenkins
That's great for
linking the
Physical World
to your Phone
@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
BLE (not just toys)
45
@dan_jenkins
BLE (not just toys)
46
@dan_jenkins
BLE (okay... a fair few toys)
47
@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)
Windows (a little)
@dan_jenkins
But for more info...
https://goo.gl/rDu2UT
@dan_jenkins
And you have to enable it...
chrome://flags
@dan_jenkins
But there is a Google
Chrome Origin Trial ongoing
https://goo.gl/hzczDR
@dan_jenkins
And the Chrome team has
announced their intent to ship in 56
https://goo.gl/KMmjda
@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
Developing for Web
Bluetooth has become
easier, for sure; eh.
@dan_jenkins
Unless you're
developing on
Windows... but that's
changing too
@dan_jenkins
Hardware with BLE is
cheap
@dan_jenkins
Your dev environment
just needs to have BLE
(Bluetooth 4)
@dan_jenkins
One last
demo
@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

More Related Content

PDF
Getting physical with web bluetooth in the browser
PDF
Getting physical with web bluetooth in the browser hackference
PDF
Getting physical with web bluetooth in the browser
PPTX
Beacons, Raspberry Pi & Node.js
PDF
Eddystone beacons demo
PDF
Divolte collector overview
PDF
Prototyping online ML with Divolte Collector
PDF
Divolte Collector - meetup presentation
Getting physical with web bluetooth in the browser
Getting physical with web bluetooth in the browser hackference
Getting physical with web bluetooth in the browser
Beacons, Raspberry Pi & Node.js
Eddystone beacons demo
Divolte collector overview
Prototyping online ML with Divolte Collector
Divolte Collector - meetup presentation

What's hot (14)

PPTX
Eddystone Beacons - Physical Web - Giving a URL to All Objects
PDF
Devoxx 2013 - Hazelcast
PPT
Android wearpp
PDF
Introduction to KillrChat
PPTX
Html5 Overview
PPT
Google compute presentation puppet conf
PDF
Server side data sync for mobile apps with silex
PDF
Implementing data sync apis for mibile apps @cloudconf
PDF
Implementing Server Side Data Synchronization for Mobile Apps
PDF
12 core technologies you should learn, love, and hate to be a 'real' technocrat
PDF
Android dev toolbox - Shem Magnezi, WeWork
PDF
Rethink Async With RXJS
PPTX
Android & Beacons
PDF
Measuring Real User Performance in the Browser
Eddystone Beacons - Physical Web - Giving a URL to All Objects
Devoxx 2013 - Hazelcast
Android wearpp
Introduction to KillrChat
Html5 Overview
Google compute presentation puppet conf
Server side data sync for mobile apps with silex
Implementing data sync apis for mibile apps @cloudconf
Implementing Server Side Data Synchronization for Mobile Apps
12 core technologies you should learn, love, and hate to be a 'real' technocrat
Android dev toolbox - Shem Magnezi, WeWork
Rethink Async With RXJS
Android & Beacons
Measuring Real User Performance in the Browser
Ad

Viewers also liked (20)

PDF
Physical Web Awareness, Onboarding, and Identification
PDF
Use Cases for the Physical Web
PDF
Physical Web Benefits and Native App Compatibility
PDF
Scottish Communicators Network - 22 October 2014 - People Make Glasgow
PDF
Get to know Holiday Extras 2011
PDF
Cinematic UX, Brad Weaver
PDF
How to set your ADI business profile
PDF
How to get started with Roadio in under 60 seconds
PPT
Online Presence
PDF
Presentation Hassle Free Anna
PDF
Role of Cognitive Analytics in a era of Industry 4.0
PDF
Osservatorio congressuale Torino 2014 2015
PDF
BreakAway
PPTX
Put the romance back into rome
ODP
Polyglot polywhat polywhy
PDF
Static Sites Can be the Solution (Simon Wood)
PDF
Surviving the enterprise storm - @RianVDM
PDF
Social business online information 201112
PDF
Break away old
KEY
Access to iDevices
Physical Web Awareness, Onboarding, and Identification
Use Cases for the Physical Web
Physical Web Benefits and Native App Compatibility
Scottish Communicators Network - 22 October 2014 - People Make Glasgow
Get to know Holiday Extras 2011
Cinematic UX, Brad Weaver
How to set your ADI business profile
How to get started with Roadio in under 60 seconds
Online Presence
Presentation Hassle Free Anna
Role of Cognitive Analytics in a era of Industry 4.0
Osservatorio congressuale Torino 2014 2015
BreakAway
Put the romance back into rome
Polyglot polywhat polywhy
Static Sites Can be the Solution (Simon Wood)
Surviving the enterprise storm - @RianVDM
Social business online information 201112
Break away old
Access to iDevices
Ad

Similar to Getting Physical with Web Bluetooth in the Browser Full Stack Toronto (20)

PDF
Let's Get Physical
PDF
Cold front - bridging the web and the physical world
PDF
JAM805 - Beyond the Device
PDF
THAT_2023_BLE.pdf
PDF
Physical web inside and out final
PPTX
Can a browser become an IoT Gateway?
PDF
Getting Physical with Web Bluetooth - Uri Shaked, BlackBerry
PPTX
Bluetooth low energy final version
PDF
XebiCon'16 : The Physical Web : un coup d'oeil sur le futur d'IoT et de la mo...
PPTX
Controlling Bluetooth Low Energy Devices
PDF
A brief overview of BLE on Android
PDF
Practical Core Bluetooth in IoT & Wearable projects @ UIKonf 2016
PDF
Intern_Report
PDF
Let's Get Physical
PDF
Practical Core Bluetooth in IoT & Wearable projects @ AltConf 2016
PPTX
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
PDF
Exploring the physical web
PDF
A Brief Introduction to Bluetooth Low Energy (BLE) on iOS
PDF
(Sacon) Sumanth Naropanth - IoT network & ecosystem security attacks & secur...
PPT
Droidcon: Nick Hunn: Evolving past the fingertip- 29/10/2010
Let's Get Physical
Cold front - bridging the web and the physical world
JAM805 - Beyond the Device
THAT_2023_BLE.pdf
Physical web inside and out final
Can a browser become an IoT Gateway?
Getting Physical with Web Bluetooth - Uri Shaked, BlackBerry
Bluetooth low energy final version
XebiCon'16 : The Physical Web : un coup d'oeil sur le futur d'IoT et de la mo...
Controlling Bluetooth Low Energy Devices
A brief overview of BLE on Android
Practical Core Bluetooth in IoT & Wearable projects @ UIKonf 2016
Intern_Report
Let's Get Physical
Practical Core Bluetooth in IoT & Wearable projects @ AltConf 2016
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
Exploring the physical web
A Brief Introduction to Bluetooth Low Energy (BLE) on iOS
(Sacon) Sumanth Naropanth - IoT network & ecosystem security attacks & secur...
Droidcon: Nick Hunn: Evolving past the fingertip- 29/10/2010

More from Dan Jenkins (20)

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

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
NewMind AI Monthly Chronicles - July 2025
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Modernizing your data center with Dell and AMD
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Approach and Philosophy of On baking technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
Teaching material agriculture food technology
Cloud computing and distributed systems.
Network Security Unit 5.pdf for BCA BBA.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
NewMind AI Monthly Chronicles - July 2025
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Modernizing your data center with Dell and AMD
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Approach and Philosophy of On baking technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Understanding_Digital_Forensics_Presentation.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Review of recent advances in non-invasive hemoglobin estimation
Building Integrated photovoltaic BIPV_UPV.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Unlocking AI with Model Context Protocol (MCP)
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Teaching material agriculture food technology

Getting Physical with Web Bluetooth in the Browser Full Stack Toronto