Skip to main content
abusing phones
FOSSASIA
13 March 2015
to make the internet of things
@janjongboom
abusing phones
FOSSASIA
13 March 2015
to make the internet of things
@janjongboom
@janjongboom
JanOSTurn your smartphone into an IoT board
JanOS
Alternative OS for smartphones
Based on Firefox OS
Runs on mobile phones
Runs without a screen
GSM Shield
Only 2G
Antenna not included
GSM Shield
Only 2G
Antenna not included
S$ 91
S$ 44
Firefox OS without UI,
with extra low level APIs
So what is JanOS?
(and some kernel changes)
Extra APIs
Filesystem access
Running native code
IoT functionality like GPIO
Linux
Kernel
Linux
Kernel
Gecko
Linux
Kernel
Gecko HTML5
UI
Linux
Kernel
Gecko HTML5
UI
Has all phone APIs in JS
Linux
Kernel
Gecko
Has all phone APIs in JS
Getting started
Flashing JanOS on a phone
Getting started
Flashing JanOS on a phone
www.janos.io
www.janos.io
First screwdriver ever!
Hello world
1. Clone repo
2. Create JS file with some code
3. Add the JS file to index.html
https://github.com/jan-os/janos
1 var conn = navigator.mozMobileConnections[0];
2 conn.addEventListener('voicechange', function vc() {
3 if (conn.voice.connected) {
4 conn.removeEventListener('voicechange', vc);
5
6 var req = navigator.mozMobileMessage
7 .send('+31612345678', 'Hello from JanOS!');
8 req.onsuccess = function() {
9 console.log('Message sent successfully');
10 };
11 req.onerror = function() {
12 console.error('Could not send SMS', req.error);
13 };
14 }
15 });
1 var conn = navigator.mozMobileConnections[0];
2 conn.addEventListener('voicechange', function vc() {
3 if (conn.voice.connected) {
4 conn.removeEventListener('voicechange', vc);
5
6 var req = navigator.mozMobileMessage
7 .send('+31612345678', 'Hello from JanOS!');
8 req.onsuccess = function() {
9 console.log('Message sent successfully');
10 };
11 req.onerror = function() {
12 console.error('Could not send SMS', req.error);
13 };
14 }
15 });
1 var conn = navigator.mozMobileConnections[0];
2 conn.addEventListener('voicechange', function vc() {
3 if (conn.voice.connected) {
4 conn.removeEventListener('voicechange', vc);
5
6 var req = navigator.mozMobileMessage
7 .send('+31612345678', 'Hello from JanOS!');
8 req.onsuccess = function() {
9 console.log('Message sent successfully');
10 };
11 req.onerror = function() {
12 console.error('Could not send SMS', req.error);
13 };
14 }
15 });
1 var conn = navigator.mozMobileConnections[0];
2 conn.addEventListener('voicechange', function vc() {
3 if (conn.voice.connected) {
4 conn.removeEventListener('voicechange', vc);
5
6 var req = navigator.mozMobileMessage
7 .send('+31612345678', 'Hello from JanOS!');
8 req.onsuccess = function() {
9 console.log('Message sent successfully');
10 };
11 req.onerror = function() {
12 console.error('Could not send SMS', req.error);
13 };
14 }
15 });
1 var conn = navigator.mozMobileConnections[0];
2 conn.addEventListener('voicechange', function vc() {
3 if (conn.voice.connected) {
4 conn.removeEventListener('voicechange', vc);
5
6 var req = navigator.mozMobileMessage
7 .send('+31612345678', 'Hello from JanOS!');
8 req.onsuccess = function() {
9 console.log('Message sent successfully');
10 };
11 req.onerror = function() {
12 console.error('Could not send SMS', req.error);
13 };
14 }
15 });
Doorbell
Proximity sensor
Ring over bluetooth
Live video stream
Bluetooth doorbell
1 enableBluetoothAudio('00:0C:8A:75:EF:30').then(function() {
2 window.onuserproximity = function(e) {
3 if (e.near) {
4 var audio = new Audio('/sounds/doorbell.ogg');
5 audio.play();
6 }
7 };
8 });
Bluetooth doorbell
1 enableBluetoothAudio('00:0C:8A:75:EF:30').then(function() {
2 window.onuserproximity = function(e) {
3 if (e.near) {
4 var audio = new Audio('/sounds/doorbell.ogg');
5 audio.play();
6 }
7 };
8 });
Bluetooth doorbell
1 enableBluetoothAudio('00:0C:8A:75:EF:30').then(function() {
2 window.onuserproximity = function(e) {
3 if (e.near) {
4 var audio = new Audio('/sounds/doorbell.ogg');
5 audio.play();
6 }
7 };
8 });
Bluetooth doorbell
1 enableBluetoothAudio('00:0C:8A:75:EF:30').then(function() {
2 window.onuserproximity = function(e) {
3 if (e.near) {
4 var audio = new Audio('/sounds/doorbell.ogg');
5 audio.play();
6 }
7 };
8 });
Brian
BrianTracker™
2G connection
Connected to push server
Geolocation on request
Thank you!
www.janos.io
@janjongboom
Thank you!
www.janos.io
@janjongboom