SlideShare a Scribd company logo
abusing phones
DomCode
14 November 2015
to make the internet of things
@janjongboom
abusing phones
DomCode
14 November 2015
to make the internet of things
@janjongboom
DomCode 2015 - Abusing phones to make the internet of things
@janjongboom
Telenor R&D
Developer Evangelist IoT
DomCode 2015 - Abusing phones to make the internet of things
Before mobile revolution…
Limited input methods
Vibration sensor?
Accelerometer?
Accelerometer?
Proximity
Accelerometer
Ambient Light
Magnetometer
Gyroscope
Humidity
Ambient Temperature
Pressure
Battery
Cameras
Bend sensor
Internet of Things
Moves IHR SleepCycle
BORING!
DomCode 2015 - Abusing phones to make the internet of things
DomCode 2015 - Abusing phones to make the internet of things
DomCode 2015 - Abusing phones to make the internet of things
Device Light
Real purpose: adjust brightness
Music
Theremin is instrument
Use device light as tone frequency
Wave your hands and magic!
Music
Theremin is instrument
Use device light as tone frequency
Wave your hands and magic!
1 var context = new AudioContext();
2 var oscillator = context.createOscillator();
3 oscillator.connect(context.destination);
4 oscillator.start(0);
5
6 window.addEventListener('devicelight', function(e) {
7 oscillator.frequency.value = e.value * 10;
8 });
Music
Accelerometer
Real purpose: Turn to mute
Juggling visualizer
Measure z-forces on device
Plot it in graph over time
Juggle with multiple devices
Juggling visualizer
1 window.addEventListener('devicemotion', function(e) {
2 var serie = getGraphSerieForDevice(e.data.deviceId);
3 serie.addPoint([ e.data.timestamp, Math.abs(e.data.z) ]);
4 });
Weight scale
Gyroscope
Real purpose: rotate screen
Gyroscope
Real purpose: rotate screen
Movement Analyzer
Read raw gyro data
Feed into machine learning
Live classify movement
http://blog.telenor.io/2015/10/26/machine-learning.html
Computer generated
music
DomCode 2015 - Abusing phones to make the internet of things
http://gibber.mat.ucsb.edu/
1 a = Drums('x*o*x*o-')
Gibber
1 a = Drums('x*o*x*o-')
Gibber
Gibber
1 a = Drums('x*o*x*o-')
2 a.pitch = 0.5
Gibber
1 a = Drums('x*o*x*o-')
2 a.pitch = 0.5
Gibber
1 a = Drums('x*o*x*o-')
2
3 speak = Speak({ pitch: 70, wordgap:5 })
4 .say.seq(
5 ['Mu', 'nich', 'Mu', 'Mu', 'nich'],
6 [1/2, 1/2, 1/4, 1/4, 1/2]
7 )
8
9 speak.pitch.seq( [1,.8,1.2].rnd() )
10 Clock.bpm = 120;
Gibber
1 a = Drums('x*o*x*o-')
2
3 speak = Speak({ pitch: 70, wordgap:5 })
4 .say.seq(
5 ['Mu', 'nich', 'Mu', 'Mu', 'nich'],
6 [1/2, 1/2, 1/4, 1/4, 1/2]
7 )
8
9 speak.pitch.seq( [1,.8,1.2].rnd() )
10 Clock.bpm = 120;
Gibber
1 a = Drums('x*o*x*o-')
2
3 speak = Speak({ pitch: 70, wordgap:5 })
4 .say.seq(
5 ['Mu', 'nich'],
6 [1/4, 1/4, 1/4, 1/2].rnd()
7 )
8
9 speak.pitch.seq( [1,.8,1.2].rnd() )
10 Clock.bpm = 120;
Gibber
1 a = Drums('x*o*x*o-')
2
3 speak = Speak({ pitch: 70, wordgap:5 })
4 .say.seq(
5 ['Mu', 'nich'],
6 [1/4, 1/4, 1/4, 1/2].rnd()
7 )
8
9 speak.pitch.seq( [1,.8,1.2].rnd() )
10 Clock.bpm = 120;
Gibber
1 a = Drums('x*o*x*o-')
2
3 speak = Speak({ pitch: 70, wordgap:5 })
4 .say.seq(
5 ['Mu', 'nich'],
6 [1/4, 1/4, 1/4, 1/2].rnd()
7 )
8
9 speak.pitch.seq( [1,.8,1.2].rnd() )
10 Clock.bpm = 120;
So much phones!
DomCode 2015 - Abusing phones to make the internet of things
Gibber
Gibber
1 a = Drums('x*o*x*o-')
2 a.pitch = Phone.X
https://github.com/janjongboom/jsconf-us/blob/master/gibber/gibber-phone.js
Gibber
1 a = Drums('x*o*x*o-')
2 a.pitch = Phone.X
https://github.com/janjongboom/jsconf-us/blob/master/gibber/gibber-phone.js
Getting data out of the
real world
Bluetooth beacons
Broadcasting their existence
Bluetooth beacons
Long battery life
Cheap
URLs, sensor values, etc.
JavaScript baby monitor
Tag your baby with a phone
Get three beacons
Some math
JavaScript baby monitor
Tag your baby with a phone
Get three beacons
Some math
DomCode 2015 - Abusing phones to make the internet of things
DomCode 2015 - Abusing phones to make the internet of things
DomCode 2015 - Abusing phones to make the internet of things
DomCode 2015 - Abusing phones to make the internet of things
DomCode 2015 - Abusing phones to make the internet of things
DomCode 2015 - Abusing phones to make the internet of things
DomCode 2015 - Abusing phones to make the internet of things
DomCode 2015 - Abusing phones to make the internet of things
DomCode 2015 - Abusing phones to make the internet of things
DomCode 2015 - Abusing phones to make the internet of things
DomCode 2015 - Abusing phones to make the internet of things
Coming to a web browser near you
https://bugzilla.mozilla.org/show_bug.cgi?id=1063444
Coming to a web browser near you
https://bugzilla.mozilla.org/show_bug.cgi?id=1063444
Scanning beacons
1 var adapter = navigator.mozBluetooth.defaultAdapter
2 adapter.startLeScan([]).then(handle => {
3 handle.ondevicefound = e => {
4 // handle e.scanRecord
5 }
6
7 setTimeout(() => {
8 adapter.stopLeScan(handle)
9 }, 5000)
10 }, err => console.error(err))
Scanning beacons
1 var adapter = navigator.mozBluetooth.defaultAdapter
2 adapter.startLeScan([]).then(handle => {
3 handle.ondevicefound = e => {
4 // handle e.scanRecord
5 }
6
7 setTimeout(() => {
8 adapter.stopLeScan(handle)
9 }, 5000)
10 }, err => console.error(err))
Scanning beacons
1 var adapter = navigator.mozBluetooth.defaultAdapter
2 adapter.startLeScan([]).then(handle => {
3 handle.ondevicefound = e => {
4 // handle e.scanRecord
5 }
6
7 setTimeout(() => {
8 adapter.stopLeScan(handle)
9 }, 5000)
10 }, err => console.error(err))
Scanning beacons
1 var adapter = navigator.mozBluetooth.defaultAdapter
2 adapter.startLeScan([]).then(handle => {
3 handle.ondevicefound = e => {
4 // handle e.scanRecord
5 }
6
7 setTimeout(() => {
8 adapter.stopLeScan(handle)
9 }, 5000)
10 }, err => console.error(err))
Scanning beacons
1 var adapter = navigator.mozBluetooth.defaultAdapter
2 adapter.startLeScan([]).then(handle => {
3 handle.ondevicefound = e => {
4 // handle e.scanRecord
5 }
6
7 setTimeout(() => {
8 adapter.stopLeScan(handle)
9 }, 5000)
10 }, err => console.error(err))
Physical Web
Walk up and use anything
Physical Web beacon
Physical Web beacon
Physical Web beacon
http://goo.gl/a1b4cd
Physical Web beacon
http://goo.gl/a1b4cd
DomCode 2015 - Abusing phones to make the internet of things
Everything got a URL
http://janjongboom.com
nRF51-DK
DomCode 2015 - Abusing phones to make the internet of things
http://rollingspider.xyz/aa73bc21
Drone Web App
Physical Web to discover
Web App gets reference to device
Connect using WebBluetooth
Fly!
Drone Web App
Physical Web to discover
Web App gets reference to device
Connect using WebBluetooth
Fly!
10 // Set up the connection
11 e.device.gatt.connect().then(() => {
12 return e.device.gatt.discoverServices();
13 }).then(() => {
14 // devices have services, and services have characteristics
15 var services = e.device.gatt.services;
16 console.log('services', services);
17
18 // find the characteristic that handles flying the drone
19 var c = services.reduce((curr, f) => curr.concat(f.characteristics), [])
20 .filter(c => c.uuid === '9a66fa0b-0800-9191-11e4-012d1540cb8e')[0];
21
22 // take off instruction!
23 var buffer = new Uint8Array(0x04, counter++, 0x02, 0x00, 0x01, 0x00]);
24 c.writeValue(buffer).then(() => {
25 console.log('take off successful!');
26 });
27 });
10 // Set up the connection
11 e.device.gatt.connect().then(() => {
12 return e.device.gatt.discoverServices();
13 }).then(() => {
14 // devices have services, and services have characteristics
15 var services = e.device.gatt.services;
16 console.log('services', services);
17
18 // find the characteristic that handles flying the drone
19 var c = services.reduce((curr, f) => curr.concat(f.characteristics), [])
20 .filter(c => c.uuid === '9a66fa0b-0800-9191-11e4-012d1540cb8e')[0];
21
22 // take off instruction!
23 var buffer = new Uint8Array(0x04, counter++, 0x02, 0x00, 0x01, 0x00]);
24 c.writeValue(buffer).then(() => {
25 console.log('take off successful!');
26 });
27 });
10 // Set up the connection
11 e.device.gatt.connect().then(() => {
12 return e.device.gatt.discoverServices();
13 }).then(() => {
14 // devices have services, and services have characteristics
15 var services = e.device.gatt.services;
16 console.log('services', services);
17
18 // find the characteristic that handles flying the drone
19 var c = services.reduce((curr, f) => curr.concat(f.characteristics), [])
20 .filter(c => c.uuid === '9a66fa0b-0800-9191-11e4-012d1540cb8e')[0];
21
22 // take off instruction!
23 var buffer = new Uint8Array(0x04, counter++, 0x02, 0x00, 0x01, 0x00]);
24 c.writeValue(buffer).then(() => {
25 console.log('take off successful!');
26 });
27 });
10 // Set up the connection
11 e.device.gatt.connect().then(() => {
12 return e.device.gatt.discoverServices();
13 }).then(() => {
14 // devices have services, and services have characteristics
15 var services = e.device.gatt.services;
16 console.log('services', services);
17
18 // find the characteristic that handles flying the drone
19 var c = services.reduce((curr, f) => curr.concat(f.characteristics), [])
20 .filter(c => c.uuid === '9a66fa0b-0800-9191-11e4-012d1540cb8e')[0];
21
22 // take off instruction!
23 var buffer = new Uint8Array(0x04, counter++, 0x02, 0x00, 0x01, 0x00]);
24 c.writeValue(buffer).then(() => {
25 console.log('take off successful!');
26 });
27 });
-
-
DomCode 2015 - Abusing phones to make the internet of things
DomCode 2015 - Abusing phones to make the internet of things
-
Get hacking!
-
Get hacking!
Thank you!
http://janjongboom.com
github.com/janjongboom/(jsconf-asia|jsconf-us)

More Related Content

PDF
DAHO.AM 2015 - Abusing phones to make the internet of things
PDF
Home Automation with Android Things and the Google Assistant
PDF
Using Android Things to Detect & Exterminate Reptilians
PDF
FITC Web Unleashed 2017 - Introduction to the World of Testing for Front-End ...
PDF
An Introduction to the World of Testing for Front-End Developers
PDF
67WS Seminar Event
PDF
The Ring programming language version 1.7 book - Part 50 of 196
PDF
Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009
DAHO.AM 2015 - Abusing phones to make the internet of things
Home Automation with Android Things and the Google Assistant
Using Android Things to Detect & Exterminate Reptilians
FITC Web Unleashed 2017 - Introduction to the World of Testing for Front-End ...
An Introduction to the World of Testing for Front-End Developers
67WS Seminar Event
The Ring programming language version 1.7 book - Part 50 of 196
Arduino Lecture 3 - Interactive Media CS4062 Semester 2 2009

What's hot (20)

PDF
libGDX: Scene2D
PDF
20120822 joxa
PDF
Environmental effects - a ray tracing exercise
KEY
Sbaw090908
PPTX
Test-driven JavaScript Development - OPITZ CONSULTING - Tobias Bosch - Stefa...
KEY
Scottish Ruby Conference 2010 Arduino, Ruby RAD
PDF
Aodv routing protocol code in ns2
DOCX
Twin wheeler modified for arduino simplified serial protocol to sabertooth v21
PDF
The Ring programming language version 1.5.1 book - Part 45 of 180
PPTX
Games, AI, and Research - Part 2 Training (FightingICE AI Programming)
PPTX
Raspberry Pi with Java (JJUG)
PDF
node.js and the AR.Drone: building a real-time dashboard using socket.io
PDF
How to stop debugging asynchronous code and start living, Andrey Salomatin, B...
PDF
The 2016 Android Developer Toolbox [NANTES]
DOCX
TRAFFIC CODE MATLAB Function varargouttraffic code
PDF
TC74LCX244FW PSpice Model (Free SPICE Model)
PDF
Advanced programming with #nodecopter
PPTX
API Python Chess: Distribution of Chess Wins based on random moves
PDF
Drones, Flying robots and Javascript
PDF
TC74LCX244FT PSpice Model (Free SPICE Model)
libGDX: Scene2D
20120822 joxa
Environmental effects - a ray tracing exercise
Sbaw090908
Test-driven JavaScript Development - OPITZ CONSULTING - Tobias Bosch - Stefa...
Scottish Ruby Conference 2010 Arduino, Ruby RAD
Aodv routing protocol code in ns2
Twin wheeler modified for arduino simplified serial protocol to sabertooth v21
The Ring programming language version 1.5.1 book - Part 45 of 180
Games, AI, and Research - Part 2 Training (FightingICE AI Programming)
Raspberry Pi with Java (JJUG)
node.js and the AR.Drone: building a real-time dashboard using socket.io
How to stop debugging asynchronous code and start living, Andrey Salomatin, B...
The 2016 Android Developer Toolbox [NANTES]
TRAFFIC CODE MATLAB Function varargouttraffic code
TC74LCX244FW PSpice Model (Free SPICE Model)
Advanced programming with #nodecopter
API Python Chess: Distribution of Chess Wins based on random moves
Drones, Flying robots and Javascript
TC74LCX244FT PSpice Model (Free SPICE Model)
Ad

Similar to DomCode 2015 - Abusing phones to make the internet of things (20)

PDF
Altering the real world with JavaScript - Framsia
PDF
Firefox OS and the Internet of Things - NDC London 2014
PDF
Fun with JavaScript and sensors - AmsterdamJS April 2015
PDF
Cold front - bridging the web and the physical world
PDF
Abusing phones to make the internet of things - JSConf EU 2014
PDF
The Physical World meets the Web
PDF
Prototyping Hardware
PDF
Javascript all the things
PDF
Fun with JavaScript and sensors - JavaScript Framework Days Kyiv
PDF
"Fun with JavaScript and sensors" by Jan Jongboom
PDF
CatDroid talk: thinking different, sharing ideas
PDF
Let's Get Physical
PDF
IoT debugging
PDF
Abusing phones to make the internet of things - Wix UA Meetup
PDF
Fun with sensors - JSConf.asia 2014
PDF
Getting Started with iBeacons (Designers of Things 2014)
PPTX
Bluetooth low energy final version
PPTX
Building Cross-Platform Mobile Applications with HTML5
PPTX
Micro and moblile: Java on the Raspberry Pi
PPTX
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
Altering the real world with JavaScript - Framsia
Firefox OS and the Internet of Things - NDC London 2014
Fun with JavaScript and sensors - AmsterdamJS April 2015
Cold front - bridging the web and the physical world
Abusing phones to make the internet of things - JSConf EU 2014
The Physical World meets the Web
Prototyping Hardware
Javascript all the things
Fun with JavaScript and sensors - JavaScript Framework Days Kyiv
"Fun with JavaScript and sensors" by Jan Jongboom
CatDroid talk: thinking different, sharing ideas
Let's Get Physical
IoT debugging
Abusing phones to make the internet of things - Wix UA Meetup
Fun with sensors - JSConf.asia 2014
Getting Started with iBeacons (Designers of Things 2014)
Bluetooth low energy final version
Building Cross-Platform Mobile Applications with HTML5
Micro and moblile: Java on the Raspberry Pi
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
Ad

More from Jan Jongboom (20)

PDF
TinyML on Arduino - workshop
PDF
Intelligent Edge - Getting started with TinyML for industrial applications
PDF
Teaching your sensors new tricks with Machine Learning - Eta Compute webinar
PDF
Get started with TinyML - Embedded online conference
PDF
Adding intelligence to your LoRaWAN deployment - The Things Virtual Conference
PDF
Get started with TinyML - Hackster webinar 9 April 2020
PDF
Tiny intelligent computers and sensors - Open Hardware Event 2020
PDF
Teaching your sensors new tricks with Machine Learning - CENSIS Tech Summit 2019
PDF
Adding intelligence to your LoRaWAN devices - The Things Conference on tour
PDF
Machine learning on 1 square centimeter - Emerce Next 2019
PDF
Fundamentals of IoT - Data Science Africa 2019
PDF
17,000 contributions in 32K RAM - FOSS North 2019
PDF
Open Hours: Mbed Simulator
PDF
Efficient IoT solutions based on LoRaWAN, The Things Network and Mbed OS
PDF
Machine learning on 1 cm2 - Tweakers Dev Summit
PDF
Simulating LoRaWAN devices - LoRa Alliance AMM 2019
PDF
Develop with Mbed OS - The Things Conference 2019
PDF
Firmware Updates over LoRaWAN - The Things Conference 2019
PDF
Faster Device Development - GSMA @ CES 2019
PDF
Mbed LoRaWAN stack: a case study - LoRa Alliance AMM Tokyo
TinyML on Arduino - workshop
Intelligent Edge - Getting started with TinyML for industrial applications
Teaching your sensors new tricks with Machine Learning - Eta Compute webinar
Get started with TinyML - Embedded online conference
Adding intelligence to your LoRaWAN deployment - The Things Virtual Conference
Get started with TinyML - Hackster webinar 9 April 2020
Tiny intelligent computers and sensors - Open Hardware Event 2020
Teaching your sensors new tricks with Machine Learning - CENSIS Tech Summit 2019
Adding intelligence to your LoRaWAN devices - The Things Conference on tour
Machine learning on 1 square centimeter - Emerce Next 2019
Fundamentals of IoT - Data Science Africa 2019
17,000 contributions in 32K RAM - FOSS North 2019
Open Hours: Mbed Simulator
Efficient IoT solutions based on LoRaWAN, The Things Network and Mbed OS
Machine learning on 1 cm2 - Tweakers Dev Summit
Simulating LoRaWAN devices - LoRa Alliance AMM 2019
Develop with Mbed OS - The Things Conference 2019
Firmware Updates over LoRaWAN - The Things Conference 2019
Faster Device Development - GSMA @ CES 2019
Mbed LoRaWAN stack: a case study - LoRa Alliance AMM Tokyo

Recently uploaded (20)

PPTX
artificialintelligenceai1-copy-210604123353.pptx
PPTX
Power Point - Lesson 3_2.pptx grad school presentation
PDF
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
PPTX
SAP Ariba Sourcing PPT for learning material
PPT
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
PDF
Uptota Investor Deck - Where Africa Meets Blockchain
PDF
Exploring VPS Hosting Trends for SMBs in 2025
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PDF
Slides PDF: The World Game (s) Eco Economic Epochs.pdf
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
t_and_OpenAI_Combined_two_pressentations
PDF
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
PPT
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
DOC
Rose毕业证学历认证,利物浦约翰摩尔斯大学毕业证国外本科毕业证
PPTX
Database Information System - Management Information System
PPTX
1402_iCSC_-_RESTful_Web_APIs_--_Josef_Hammer.pptx
PPTX
newyork.pptxirantrafgshenepalchinachinane
PPTX
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx
artificialintelligenceai1-copy-210604123353.pptx
Power Point - Lesson 3_2.pptx grad school presentation
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
SAP Ariba Sourcing PPT for learning material
FIRE PREVENTION AND CONTROL PLAN- LUS.FM.MQ.OM.UTM.PLN.00014.ppt
Uptota Investor Deck - Where Africa Meets Blockchain
Exploring VPS Hosting Trends for SMBs in 2025
Design_with_Watersergyerge45hrbgre4top (1).ppt
Slides PDF: The World Game (s) Eco Economic Epochs.pdf
SASE Traffic Flow - ZTNA Connector-1.pdf
t_and_OpenAI_Combined_two_pressentations
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
Rose毕业证学历认证,利物浦约翰摩尔斯大学毕业证国外本科毕业证
Database Information System - Management Information System
1402_iCSC_-_RESTful_Web_APIs_--_Josef_Hammer.pptx
newyork.pptxirantrafgshenepalchinachinane
IPCNA VIRTUAL CLASSES INTERMEDIATE 6 PROJECT.pptx

DomCode 2015 - Abusing phones to make the internet of things