SlideShare a Scribd company logo
Sooraj Sanker
@soorajsanker
Can a Web Browser be an IoT
Gateway?
🤔
Can Bluetooth do Web Authentication?
🤔
Here are some Application
ideas..
Web Bluetooth
The Web Bluetooth API provides the ability to connect and interact with Bluetooth Low
Energy peripherals from a web browser.
But why?!
Isn’t it something mobile/native applications already do?
🤔
Yes
• Consumers are having an Apps overload!
• What if a PWA (Progressive Web Application) can do this?
Some DEMO
🎥 📽 📽
What are IoT Gateways?
• Communicate with embedded devices and IoT Nodes.
• Indirectly talk to the sensors, controllers and other I/O devices
• Manage Communications with an IoT cloud
• Data Read/Write Operations, Commands and service executions.
• Pre-Processing, Data clean-up, Data Aggregation
• Handling Protocol Conversion.
• Handling Data Buffering and Offline storage
IoT Gateways can
Want more?
• Edge Computing (Aggregation, Averaging etc.)
• Anomaly detection
• Edge Analytics
• Predictions
• Anything else?
IoT Gateways can also do
Positioning of the
IoT gateway
IoT Devices
• The devices which can talk to IoT Gateways.
• Supports light weight protocols like BLE GATT, Zigbee,
LoRa WAN etc.
• Send sensor data, device characteristics, environment
data etc.
• Accept commands and trigger actions.
Talk to IoT Gateway
Device to Gateway communication through lightweight
protocols like
BLE
ZigBee
LoRa WAN
Other Mesh netoworks
Talk to the cloud
IoT Gateway
Cloud Communication
• More advanced and lightweight protocols are preferred.
• MQTT, COAP, AMQP, WebSocket, HTTPs are preferred.
• Connects to the Internet or Private Cloud.
• Socket connections are preferred in order to have bidirectional
communication links.
IoT system
What if the
Device-to-gateway
communication is purely through BLE?
Let’s talk a bit about BLE
• Bluetooth 4.0 introduced a new "Low Energy" mode known as
"Bluetooth Smart", BLE, or just LE.
• Using Generic Attribute Profile (GATT)
• Peripheral and Centrals
BLE
Technically the max range is about 300 feet
or 100 meters, but that's very generous and
assumes a powerful radio.
In reality, you will find over 10 or 20 meters
can be challenging.
Depending on
• O/P power of the transmitter.
• Sensitivity of the receiver
• Obstacles
• The antennas
Range
Speed
• 2 Mbps max for Bluetooth Classic
• Less than a Mbps for BLE
Peripherals and Centrals
• Devices acting in the Peripheral role can receive connections, and devices
acting in the Central role can connect to Peripheral devices.
• A device acting in either Peripheral or Central can host a GATT Server.
Peripherals and Centrals
GATT Server
• The device containing the
characteristic database that is being
read or written by a GATT client.
• Could be master or slave.
• Can respond to read/ write request.
• Can indicate notifications.
GATT Client
• The device that is reading or writing
data from or to the GATT server.
• Can request read/write operations on
the GATT Server.
• Listen for notifications and indications.
• Acknowledge on indications.
What are the differences between Classic
Bluetooth and BLE?
Bluetooth v2.1
•Wireless headsets
•File transfer between devices
•Wireless printers
•Wireless speakers
Bluetooth low energy (BLE)
•Medical devices for monitoring and reporting
•Sports and fitness devices
•Industrial monitoring sensors
•Home automation
•Geo-based, targeted promotions via beacons
•Public transportation apps
•Remote controls
•PC peripheral devices like wireless mouse and
keyboard
Use Cases
BLUETOOTH
V2.1
BLUETOOTH 4.0
(LE)
BLUETOOTH 5
(LE)
Range Up to 100 m Up to 100 m Up to 400 m
Max range
(free field)
Around 100 m
(class 2 outdoors)
Around 100 m
(outdoors)
Around 1,000m
(outdoors)
Frequency 2.402 – 2.481 GHz 2.402 – 2.481 GHz 2.402 - 2.481 GHz
Max data rate 1- 3 Mbit/s 1 Mbit/s 2 Mbit/s
Application
Troughput
0.7-2.1 Mbit/s Up to 305 kbit/s Up to 1,360 kbit/s
Topologies
Point-to-point,
scatternet
Point-to-point,
mesh network
Point-to-point,
mesh network
Network
Standard
IEEE 802.15.1 IEEE 802.15.1 IEEE 802.15.1
GATT Specification
GATT Services
collection of characteristics and relationships to other services that encapsulate the behaviour
part of the device.
GATT Characteristics
Attributes that contains single logical value.
GATT Descriptors
Defined attributes that describe a characteristic value.
Let’s see if a browser can
cover all these features
• Talking to embedded devices and IoT Nodes.
• BLE - Modern Browsers supports this via Web Bluetooth
• Talking to public/private IoT cloud.
• Proven, Any browser can do this with a pool of supported
protocols.
• Even GraphQL backend can simply act as an IoT Cloud
• Most of the IoT clouds are supporting javascript SDK’s.
• Data Read/Write Operations, Commands and service
executions.
• Leveraging BLE services and characteristics.
• With BLE security layer.
• Pre Processing, Data clean-up, Data Aggregation
• Huge data processing, caching and storing are already
present in modern PWAs.
• Modern Browser APIs are capable enough to handle this.
• Protocol Conversion.
• Let’s consider BLE as device communication medium
• Huge varieties of cloud communication protocols are
implemented and supported in modern browsers.
• MQTT, HTTPs, CoAP, Web Sockets.
• Directly connect to Kafka, Message Queues, Data Buffers,
Apache NiFi, Azure, AWS, Google Cloud and more .
Data Buffering
• Data buffering in gateway level is mostly limited with an external
persistent storage.
• Latest Chrome File system API can read /write data on to the
file system. Just like how a firmware is doing
• Local Storage API can also be used to store the offline data till
an extend.
Offline Storage
• Web SQL, indexed DB and client-side libraries can be used
for local storage
• Native File system API can be used to dump raw data for
future reference
• Fall back mechanism can be written to ensure the data is
either successfully sent to the cloud or stored locally.
• Connectivity callbacks and event handlers are much simpler
within the browser.
Remote Debugging
• Remote Debugging and analysis is much much simpler with
advanced JavaScript analytics tools
• Chrome allows remote debugging port, so that you can monitor
your gateway more like a server.
BLE
Debugging
Supported Protocols
HTTP & HTTPS
FTP
SSH
MQTT
WebSocket
SMTP
RTSP
Many more 
Storage in Chrome
• Local Storage
• Indexed DB
• Cache
• Native File System API
Web Storage
Local Storage
•Persistent Key Value Pair storage.
•Nearly 10 MB data can be stored for each
domain.
•Not preferred to store more data.
Indexed DB
•Transactional DB System like SQL-
based RDBMS
•10MB to 2GB Storage
•Can be extended with users permission.
•Fixed Column tables are not a mandate
•Store and retrieve data with indexed key.
Native File
System API
• New in Chrome 79+
• The new Native File System API allows web apps to
read or save changes directly to files and folders on
the user's device.
• Offline data storage can now be directly to the user
file system just like any gateways.
• Manual user permission acceptance required.
• No limits as long as the device has storage capacity.
What about Advanced features?
Edge Computing (Aggregation, Averaging etc.)
Anomaly detection
Edge Analytics
Predictions
Anything else?
Data Aggregation
& Averaging
• JavaScript can do this in all modern web
browsers.
• Complex data structures and algorithms are
processed in modern PWA’s
• Threading, Task Queue and Call Stack is
managed by the browser. 
Anomaly Detection
& Edge Analytics
• High frequency data stream can be passed
through a trained ML model for anomaly
detection.
• Libraries like TensorflowJS can be used.
• Realtime retraining logic can also be written.
Predictions
• Data stream can be passed through the
ML models to predict futuristic output.
• Predictions can be made using AI & ML
libraries like tensorflow JS
• Retraining and replacing new ML models
are possible
JS library for adding offline support
JS library equipped with web BLE Utilsnpm i web-bluetooth-utils
Demo
Explained
Sensor KIT
• The sensor kit is equipped with a Bluetooth Module
• The firmware ensure that it starts the BLE GATT Server
• Which enables the discovery and connection from any BLE Client.
Web
Browser
• A portable web application is running on chrome
• Chrome search for devices which are advertising their availability
• This search can be filtered with device ids or some other parameters
Google
Cloud
• Firebase Realtime database
• Direct data dump and real time subscription
Web
Application
• React JS web application connected to google cloud.
• Realtime subscription from firebase real-time database.
Where can we use this?
Connecting to vending machines
Connect to BLE devices where we don’t need 24/7 live connection.
Unlocking automobiles and lockers.
Remote Controls
Web Bluetooth 2 factor Authentication*
Can a BLE device act as a
web authenticator?
I have some thoughts
Before that – Let’s have some fun!
Some more demo
🎥 📽 📽
Consider a JWT (Token) based
authentication system
• Login screen will collect the username and
password1
• Encrypted data will be send to the server2
• Server validate the request
• Server generates JWT expiring in x time3
• All consecutive requests will have this JWT in
the request headers4
• Server validates the JWT and provide
necessary access to the user5
• on Logout server resets the token by setting
the cookie6
Current Login System
What if a smart BLE device is your web
authenticator?
What if a browser has an option called
“Login with Bluetooth”
What if your web application can be
authenticated with your smartphone,
smartwatch or any BLE devices?
What if you want to give some
critical access only within a
premise?
How can we do that?
• Browser shows a login screen “Login with Bluetooth”
1
• Browser search for nearby advertising BLE devices
• User chooses the device
2
• Browser try to connect to the device
• Smart device validate and establish the connection
3
• Smart device generate the JWT with short validity
• Send the token to the Browser
• Browser will use the token to authenticate the server.
4
• User get access to the server for that short duration
• Smart device will keep generating and sending tokens
• Browser gets authenticated as long as the peripheral isconnected
5
• Usual Logout and peripheral disconnection can cause the Logout
• If the peripheral is static the acces control is limited to a premise
(Geo fenced web access control)
6
• Your Laptop/Desktop where you want to access the web authenticator connects with your smart
BLE device1
• Your smart device generate JWT by using super secret or fetch JWT from the server.
• This will have very small validity. May be 5 minutes or lesser.2
• “Bluetooth Login” option on your web application trigger BLE connection using web Bluetooth.
• No need of username and password as the smart device can encode user info within the JWT.3
• Every time before the JWT expires, authentication device publish the new JWT.
• This will ensure that the web access is continued as long as the BLE is connected.4
• The BLE smart authenticator can be fixed inside a building, so that this authenticator will work
only within the BLE range
• Can be considered this as a geo fenced access control5
• Usual logout action can be triggered
6
Thank you 
Sooraj Sanker
@soorajsanker
gh/soorajshankar
soorajshankar@gmail.com
https://googlechrome.githu
b.io/samples/web-
bluetooth/

More Related Content

What's hot

Carwhisperer Bluetooth Attack
Carwhisperer Bluetooth AttackCarwhisperer Bluetooth Attack
Carwhisperer Bluetooth Attack
n|u - The Open Security Community
 
Asp.Net Java Ieee Projects Ncct
Asp.Net Java Ieee Projects NcctAsp.Net Java Ieee Projects Ncct
Asp.Net Java Ieee Projects Ncct
ncct
 
Bluetooth low energy final version
Bluetooth low energy final versionBluetooth low energy final version
Bluetooth low energy final version
Frederick Bousson
 
Bluetooth Low Energy Unveiled
Bluetooth Low Energy UnveiledBluetooth Low Energy Unveiled
Bluetooth Low Energy Unveiled
G Gindele
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
pavan penugonda
 
Internet of things - zigbee network function
Internet of things - zigbee network functionInternet of things - zigbee network function
Internet of things - zigbee network function
NEEVEE Technologies
 
Messaging for IoT
Messaging for IoTMessaging for IoT
Messaging for IoT
dejanb
 
IoT RF Protocols
IoT RF ProtocolsIoT RF Protocols
IoT RF Protocols
APNIC
 
Practical Examples of LoRaWAN in Action
Practical Examples of LoRaWAN in ActionPractical Examples of LoRaWAN in Action
Practical Examples of LoRaWAN in Action
Robin Harris
 
Iot presentation and hand on building tools
Iot presentation and hand on building toolsIot presentation and hand on building tools
Iot presentation and hand on building tools
AhmedMostafa787
 
Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of things
Charles Gibbons
 
QuadraSpace Protocol
QuadraSpace ProtocolQuadraSpace Protocol
QuadraSpace Protocol
quadraspace
 
IOT technology-standards
IOT technology-standardsIOT technology-standards
IOT technology-standards
sadiqFakheraldian
 
iot-component-dimensioning
iot-component-dimensioningiot-component-dimensioning
iot-component-dimensioning
sadiqFakheraldian
 

What's hot (14)

Carwhisperer Bluetooth Attack
Carwhisperer Bluetooth AttackCarwhisperer Bluetooth Attack
Carwhisperer Bluetooth Attack
 
Asp.Net Java Ieee Projects Ncct
Asp.Net Java Ieee Projects NcctAsp.Net Java Ieee Projects Ncct
Asp.Net Java Ieee Projects Ncct
 
Bluetooth low energy final version
Bluetooth low energy final versionBluetooth low energy final version
Bluetooth low energy final version
 
Bluetooth Low Energy Unveiled
Bluetooth Low Energy UnveiledBluetooth Low Energy Unveiled
Bluetooth Low Energy Unveiled
 
Chapter 7
Chapter 7Chapter 7
Chapter 7
 
Internet of things - zigbee network function
Internet of things - zigbee network functionInternet of things - zigbee network function
Internet of things - zigbee network function
 
Messaging for IoT
Messaging for IoTMessaging for IoT
Messaging for IoT
 
IoT RF Protocols
IoT RF ProtocolsIoT RF Protocols
IoT RF Protocols
 
Practical Examples of LoRaWAN in Action
Practical Examples of LoRaWAN in ActionPractical Examples of LoRaWAN in Action
Practical Examples of LoRaWAN in Action
 
Iot presentation and hand on building tools
Iot presentation and hand on building toolsIot presentation and hand on building tools
Iot presentation and hand on building tools
 
Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of things
 
QuadraSpace Protocol
QuadraSpace ProtocolQuadraSpace Protocol
QuadraSpace Protocol
 
IOT technology-standards
IOT technology-standardsIOT technology-standards
IOT technology-standards
 
iot-component-dimensioning
iot-component-dimensioningiot-component-dimensioning
iot-component-dimensioning
 

Similar to Can a browser become an IoT Gateway?

Chapter 1 updated.pdf
Chapter 1 updated.pdfChapter 1 updated.pdf
Chapter 1 updated.pdf
YashWaghmare20
 
HOME AUTOMATION USING INTERNET OF THINGS.pptx
HOME AUTOMATION USING INTERNET OF THINGS.pptxHOME AUTOMATION USING INTERNET OF THINGS.pptx
HOME AUTOMATION USING INTERNET OF THINGS.pptx
KhanArshidIqbal
 
End to End IoT projects with Zephyr.pdf
End to End IoT projects with Zephyr.pdfEnd to End IoT projects with Zephyr.pdf
End to End IoT projects with Zephyr.pdf
Alvaro Viebrantz
 
From Device to Data Center to Insights: Architectural Considerations for the ...
From Device to Data Center to Insights: Architectural Considerations for the ...From Device to Data Center to Insights: Architectural Considerations for the ...
From Device to Data Center to Insights: Architectural Considerations for the ...
P. Taylor Goetz
 
intro to iot.pdf
intro to iot.pdfintro to iot.pdf
intro to iot.pdf
DaisyFrancis9
 
From Device to Data Center to Insights
From Device to Data Center to InsightsFrom Device to Data Center to Insights
From Device to Data Center to Insights
DataWorks Summit/Hadoop Summit
 
IoT Enabling Technologies
IoT Enabling TechnologiesIoT Enabling Technologies
IoT Enabling Technologies
Prakash Honnur
 
iot enabling technologies for IOT subject
iot enabling technologies for IOT subjectiot enabling technologies for IOT subject
iot enabling technologies for IOT subject
KotiBabu7
 
JAM805 - Beyond the Device
JAM805 -  Beyond the DeviceJAM805 -  Beyond the Device
JAM805 - Beyond the Device
Dr. Ranbijay Kumar
 
Real time web apps
Real time web appsReal time web apps
Real time web apps
Sepehr Rasouli
 
D1-3-Signaling
D1-3-SignalingD1-3-Signaling
D1-3-Signaling
Oleg Levy
 
chapter-1_iot.pptx
chapter-1_iot.pptxchapter-1_iot.pptx
chapter-1_iot.pptx
RAHULRAJ438202
 
IOT UNIT 1B.ppt
IOT UNIT 1B.pptIOT UNIT 1B.ppt
IOT UNIT 1B.ppt
madhavanmohan1
 
IoT material revised edition
IoT material revised editionIoT material revised edition
IoT material revised edition
pavan penugonda
 
Bluetooth technology introduction and ecosystem
Bluetooth technology introduction and ecosystem Bluetooth technology introduction and ecosystem
Bluetooth technology introduction and ecosystem
NiclasGranqvist
 
Chapter-1_embedded syustem iot.pdf
Chapter-1_embedded syustem iot.pdfChapter-1_embedded syustem iot.pdf
Chapter-1_embedded syustem iot.pdf
JohnMcClaine2
 
unit 3.pdf
unit 3.pdfunit 3.pdf
unit 3.pdf
KavithaK23
 
Chapter-1.pdf
Chapter-1.pdfChapter-1.pdf
Chapter-1.pdf
ssuser01a3d0
 
Why HTTP Won't Work For The Internet of Things (Dreamforce 2014)
Why HTTP Won't Work For The Internet of Things (Dreamforce 2014)Why HTTP Won't Work For The Internet of Things (Dreamforce 2014)
Why HTTP Won't Work For The Internet of Things (Dreamforce 2014)
kellogh
 
Iot vupico-damien-contreras-2018-05-17-light-v3
Iot vupico-damien-contreras-2018-05-17-light-v3Iot vupico-damien-contreras-2018-05-17-light-v3
Iot vupico-damien-contreras-2018-05-17-light-v3
Damien Contreras
 

Similar to Can a browser become an IoT Gateway? (20)

Chapter 1 updated.pdf
Chapter 1 updated.pdfChapter 1 updated.pdf
Chapter 1 updated.pdf
 
HOME AUTOMATION USING INTERNET OF THINGS.pptx
HOME AUTOMATION USING INTERNET OF THINGS.pptxHOME AUTOMATION USING INTERNET OF THINGS.pptx
HOME AUTOMATION USING INTERNET OF THINGS.pptx
 
End to End IoT projects with Zephyr.pdf
End to End IoT projects with Zephyr.pdfEnd to End IoT projects with Zephyr.pdf
End to End IoT projects with Zephyr.pdf
 
From Device to Data Center to Insights: Architectural Considerations for the ...
From Device to Data Center to Insights: Architectural Considerations for the ...From Device to Data Center to Insights: Architectural Considerations for the ...
From Device to Data Center to Insights: Architectural Considerations for the ...
 
intro to iot.pdf
intro to iot.pdfintro to iot.pdf
intro to iot.pdf
 
From Device to Data Center to Insights
From Device to Data Center to InsightsFrom Device to Data Center to Insights
From Device to Data Center to Insights
 
IoT Enabling Technologies
IoT Enabling TechnologiesIoT Enabling Technologies
IoT Enabling Technologies
 
iot enabling technologies for IOT subject
iot enabling technologies for IOT subjectiot enabling technologies for IOT subject
iot enabling technologies for IOT subject
 
JAM805 - Beyond the Device
JAM805 -  Beyond the DeviceJAM805 -  Beyond the Device
JAM805 - Beyond the Device
 
Real time web apps
Real time web appsReal time web apps
Real time web apps
 
D1-3-Signaling
D1-3-SignalingD1-3-Signaling
D1-3-Signaling
 
chapter-1_iot.pptx
chapter-1_iot.pptxchapter-1_iot.pptx
chapter-1_iot.pptx
 
IOT UNIT 1B.ppt
IOT UNIT 1B.pptIOT UNIT 1B.ppt
IOT UNIT 1B.ppt
 
IoT material revised edition
IoT material revised editionIoT material revised edition
IoT material revised edition
 
Bluetooth technology introduction and ecosystem
Bluetooth technology introduction and ecosystem Bluetooth technology introduction and ecosystem
Bluetooth technology introduction and ecosystem
 
Chapter-1_embedded syustem iot.pdf
Chapter-1_embedded syustem iot.pdfChapter-1_embedded syustem iot.pdf
Chapter-1_embedded syustem iot.pdf
 
unit 3.pdf
unit 3.pdfunit 3.pdf
unit 3.pdf
 
Chapter-1.pdf
Chapter-1.pdfChapter-1.pdf
Chapter-1.pdf
 
Why HTTP Won't Work For The Internet of Things (Dreamforce 2014)
Why HTTP Won't Work For The Internet of Things (Dreamforce 2014)Why HTTP Won't Work For The Internet of Things (Dreamforce 2014)
Why HTTP Won't Work For The Internet of Things (Dreamforce 2014)
 
Iot vupico-damien-contreras-2018-05-17-light-v3
Iot vupico-damien-contreras-2018-05-17-light-v3Iot vupico-damien-contreras-2018-05-17-light-v3
Iot vupico-damien-contreras-2018-05-17-light-v3
 

Recently uploaded

DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
ijaia
 
Introduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.pptIntroduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.ppt
Dwarkadas J Sanghvi College of Engineering
 
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
PIMR BHOPAL
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
Divyanshu
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
Prakhyath Rai
 
smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...
um7474492
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
harshapolam10
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
uqyfuc
 
Design and optimization of ion propulsion drone
Design and optimization of ion propulsion droneDesign and optimization of ion propulsion drone
Design and optimization of ion propulsion drone
bjmsejournal
 
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
MadhavJungKarki
 
Bayesian Decision Theory details ML.pptx
Bayesian Decision Theory details ML.pptxBayesian Decision Theory details ML.pptx
Bayesian Decision Theory details ML.pptx
amrita chaturvedi
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
Atif Razi
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
CVCSOfficial
 
Supermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdfSupermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdf
Kamal Acharya
 
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENTNATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
Addu25809
 
Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...
cannyengineerings
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
Gino153088
 
Mechatronics material . Mechanical engineering
Mechatronics material . Mechanical engineeringMechatronics material . Mechanical engineering
Mechatronics material . Mechanical engineering
sachin chaurasia
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 

Recently uploaded (20)

DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
Introduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.pptIntroduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.ppt
 
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
 
Null Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAMNull Bangalore | Pentesters Approach to AWS IAM
Null Bangalore | Pentesters Approach to AWS IAM
 
Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...Software Engineering and Project Management - Introduction, Modeling Concepts...
Software Engineering and Project Management - Introduction, Modeling Concepts...
 
smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...smart pill dispenser is designed to improve medication adherence and safety f...
smart pill dispenser is designed to improve medication adherence and safety f...
 
SCALING OF MOS CIRCUITS m .pptx
SCALING OF MOS CIRCUITS m                 .pptxSCALING OF MOS CIRCUITS m                 .pptx
SCALING OF MOS CIRCUITS m .pptx
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
Design and optimization of ion propulsion drone
Design and optimization of ion propulsion droneDesign and optimization of ion propulsion drone
Design and optimization of ion propulsion drone
 
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
 
Bayesian Decision Theory details ML.pptx
Bayesian Decision Theory details ML.pptxBayesian Decision Theory details ML.pptx
Bayesian Decision Theory details ML.pptx
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
 
TIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptxTIME TABLE MANAGEMENT SYSTEM testing.pptx
TIME TABLE MANAGEMENT SYSTEM testing.pptx
 
Supermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdfSupermarket Management System Project Report.pdf
Supermarket Management System Project Report.pdf
 
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENTNATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
NATURAL DEEP EUTECTIC SOLVENTS AS ANTI-FREEZING AGENT
 
Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...Pressure Relief valve used in flow line to release the over pressure at our d...
Pressure Relief valve used in flow line to release the over pressure at our d...
 
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
4. Mosca vol I -Fisica-Tipler-5ta-Edicion-Vol-1.pdf
 
Mechatronics material . Mechanical engineering
Mechatronics material . Mechanical engineeringMechatronics material . Mechanical engineering
Mechatronics material . Mechanical engineering
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 

Can a browser become an IoT Gateway?

  • 2. Can a Web Browser be an IoT Gateway? 🤔
  • 3. Can Bluetooth do Web Authentication? 🤔
  • 4. Here are some Application ideas..
  • 5. Web Bluetooth The Web Bluetooth API provides the ability to connect and interact with Bluetooth Low Energy peripherals from a web browser.
  • 6. But why?! Isn’t it something mobile/native applications already do? 🤔
  • 7. Yes
  • 8. • Consumers are having an Apps overload! • What if a PWA (Progressive Web Application) can do this?
  • 10. What are IoT Gateways?
  • 11. • Communicate with embedded devices and IoT Nodes. • Indirectly talk to the sensors, controllers and other I/O devices • Manage Communications with an IoT cloud • Data Read/Write Operations, Commands and service executions. • Pre-Processing, Data clean-up, Data Aggregation • Handling Protocol Conversion. • Handling Data Buffering and Offline storage IoT Gateways can
  • 13. • Edge Computing (Aggregation, Averaging etc.) • Anomaly detection • Edge Analytics • Predictions • Anything else? IoT Gateways can also do
  • 15. IoT Devices • The devices which can talk to IoT Gateways. • Supports light weight protocols like BLE GATT, Zigbee, LoRa WAN etc. • Send sensor data, device characteristics, environment data etc. • Accept commands and trigger actions.
  • 16. Talk to IoT Gateway Device to Gateway communication through lightweight protocols like BLE ZigBee LoRa WAN Other Mesh netoworks
  • 17. Talk to the cloud
  • 18. IoT Gateway Cloud Communication • More advanced and lightweight protocols are preferred. • MQTT, COAP, AMQP, WebSocket, HTTPs are preferred. • Connects to the Internet or Private Cloud. • Socket connections are preferred in order to have bidirectional communication links.
  • 21.
  • 22. Let’s talk a bit about BLE
  • 23. • Bluetooth 4.0 introduced a new "Low Energy" mode known as "Bluetooth Smart", BLE, or just LE. • Using Generic Attribute Profile (GATT) • Peripheral and Centrals BLE
  • 24. Technically the max range is about 300 feet or 100 meters, but that's very generous and assumes a powerful radio. In reality, you will find over 10 or 20 meters can be challenging. Depending on • O/P power of the transmitter. • Sensitivity of the receiver • Obstacles • The antennas Range
  • 25. Speed • 2 Mbps max for Bluetooth Classic • Less than a Mbps for BLE
  • 26. Peripherals and Centrals • Devices acting in the Peripheral role can receive connections, and devices acting in the Central role can connect to Peripheral devices. • A device acting in either Peripheral or Central can host a GATT Server.
  • 28. GATT Server • The device containing the characteristic database that is being read or written by a GATT client. • Could be master or slave. • Can respond to read/ write request. • Can indicate notifications.
  • 29. GATT Client • The device that is reading or writing data from or to the GATT server. • Can request read/write operations on the GATT Server. • Listen for notifications and indications. • Acknowledge on indications.
  • 30. What are the differences between Classic Bluetooth and BLE?
  • 31. Bluetooth v2.1 •Wireless headsets •File transfer between devices •Wireless printers •Wireless speakers Bluetooth low energy (BLE) •Medical devices for monitoring and reporting •Sports and fitness devices •Industrial monitoring sensors •Home automation •Geo-based, targeted promotions via beacons •Public transportation apps •Remote controls •PC peripheral devices like wireless mouse and keyboard Use Cases
  • 32. BLUETOOTH V2.1 BLUETOOTH 4.0 (LE) BLUETOOTH 5 (LE) Range Up to 100 m Up to 100 m Up to 400 m Max range (free field) Around 100 m (class 2 outdoors) Around 100 m (outdoors) Around 1,000m (outdoors) Frequency 2.402 – 2.481 GHz 2.402 – 2.481 GHz 2.402 - 2.481 GHz Max data rate 1- 3 Mbit/s 1 Mbit/s 2 Mbit/s Application Troughput 0.7-2.1 Mbit/s Up to 305 kbit/s Up to 1,360 kbit/s Topologies Point-to-point, scatternet Point-to-point, mesh network Point-to-point, mesh network Network Standard IEEE 802.15.1 IEEE 802.15.1 IEEE 802.15.1
  • 33. GATT Specification GATT Services collection of characteristics and relationships to other services that encapsulate the behaviour part of the device. GATT Characteristics Attributes that contains single logical value. GATT Descriptors Defined attributes that describe a characteristic value.
  • 34. Let’s see if a browser can cover all these features
  • 35. • Talking to embedded devices and IoT Nodes. • BLE - Modern Browsers supports this via Web Bluetooth
  • 36. • Talking to public/private IoT cloud. • Proven, Any browser can do this with a pool of supported protocols. • Even GraphQL backend can simply act as an IoT Cloud • Most of the IoT clouds are supporting javascript SDK’s.
  • 37. • Data Read/Write Operations, Commands and service executions. • Leveraging BLE services and characteristics. • With BLE security layer.
  • 38. • Pre Processing, Data clean-up, Data Aggregation • Huge data processing, caching and storing are already present in modern PWAs. • Modern Browser APIs are capable enough to handle this.
  • 39. • Protocol Conversion. • Let’s consider BLE as device communication medium • Huge varieties of cloud communication protocols are implemented and supported in modern browsers. • MQTT, HTTPs, CoAP, Web Sockets. • Directly connect to Kafka, Message Queues, Data Buffers, Apache NiFi, Azure, AWS, Google Cloud and more .
  • 40. Data Buffering • Data buffering in gateway level is mostly limited with an external persistent storage. • Latest Chrome File system API can read /write data on to the file system. Just like how a firmware is doing • Local Storage API can also be used to store the offline data till an extend.
  • 41. Offline Storage • Web SQL, indexed DB and client-side libraries can be used for local storage • Native File system API can be used to dump raw data for future reference • Fall back mechanism can be written to ensure the data is either successfully sent to the cloud or stored locally. • Connectivity callbacks and event handlers are much simpler within the browser.
  • 42. Remote Debugging • Remote Debugging and analysis is much much simpler with advanced JavaScript analytics tools • Chrome allows remote debugging port, so that you can monitor your gateway more like a server.
  • 44. Supported Protocols HTTP & HTTPS FTP SSH MQTT WebSocket SMTP RTSP Many more 
  • 46. • Local Storage • Indexed DB • Cache • Native File System API Web Storage
  • 47. Local Storage •Persistent Key Value Pair storage. •Nearly 10 MB data can be stored for each domain. •Not preferred to store more data.
  • 48. Indexed DB •Transactional DB System like SQL- based RDBMS •10MB to 2GB Storage •Can be extended with users permission. •Fixed Column tables are not a mandate •Store and retrieve data with indexed key.
  • 49. Native File System API • New in Chrome 79+ • The new Native File System API allows web apps to read or save changes directly to files and folders on the user's device. • Offline data storage can now be directly to the user file system just like any gateways. • Manual user permission acceptance required. • No limits as long as the device has storage capacity.
  • 50. What about Advanced features? Edge Computing (Aggregation, Averaging etc.) Anomaly detection Edge Analytics Predictions Anything else?
  • 51. Data Aggregation & Averaging • JavaScript can do this in all modern web browsers. • Complex data structures and algorithms are processed in modern PWA’s • Threading, Task Queue and Call Stack is managed by the browser. 
  • 52. Anomaly Detection & Edge Analytics • High frequency data stream can be passed through a trained ML model for anomaly detection. • Libraries like TensorflowJS can be used. • Realtime retraining logic can also be written.
  • 53. Predictions • Data stream can be passed through the ML models to predict futuristic output. • Predictions can be made using AI & ML libraries like tensorflow JS • Retraining and replacing new ML models are possible
  • 54. JS library for adding offline support
  • 55. JS library equipped with web BLE Utilsnpm i web-bluetooth-utils
  • 56. Demo Explained Sensor KIT • The sensor kit is equipped with a Bluetooth Module • The firmware ensure that it starts the BLE GATT Server • Which enables the discovery and connection from any BLE Client. Web Browser • A portable web application is running on chrome • Chrome search for devices which are advertising their availability • This search can be filtered with device ids or some other parameters Google Cloud • Firebase Realtime database • Direct data dump and real time subscription Web Application • React JS web application connected to google cloud. • Realtime subscription from firebase real-time database.
  • 57. Where can we use this? Connecting to vending machines Connect to BLE devices where we don’t need 24/7 live connection. Unlocking automobiles and lockers. Remote Controls Web Bluetooth 2 factor Authentication*
  • 58. Can a BLE device act as a web authenticator?
  • 59. I have some thoughts
  • 60. Before that – Let’s have some fun!
  • 61. Some more demo 🎥 📽 📽
  • 62. Consider a JWT (Token) based authentication system
  • 63. • Login screen will collect the username and password1 • Encrypted data will be send to the server2 • Server validate the request • Server generates JWT expiring in x time3 • All consecutive requests will have this JWT in the request headers4 • Server validates the JWT and provide necessary access to the user5 • on Logout server resets the token by setting the cookie6 Current Login System
  • 64. What if a smart BLE device is your web authenticator?
  • 65. What if a browser has an option called “Login with Bluetooth”
  • 66. What if your web application can be authenticated with your smartphone, smartwatch or any BLE devices?
  • 67. What if you want to give some critical access only within a premise?
  • 68. How can we do that?
  • 69. • Browser shows a login screen “Login with Bluetooth” 1
  • 70. • Browser search for nearby advertising BLE devices • User chooses the device 2
  • 71. • Browser try to connect to the device • Smart device validate and establish the connection 3
  • 72. • Smart device generate the JWT with short validity • Send the token to the Browser • Browser will use the token to authenticate the server. 4
  • 73. • User get access to the server for that short duration • Smart device will keep generating and sending tokens • Browser gets authenticated as long as the peripheral isconnected 5
  • 74. • Usual Logout and peripheral disconnection can cause the Logout • If the peripheral is static the acces control is limited to a premise (Geo fenced web access control) 6
  • 75. • Your Laptop/Desktop where you want to access the web authenticator connects with your smart BLE device1 • Your smart device generate JWT by using super secret or fetch JWT from the server. • This will have very small validity. May be 5 minutes or lesser.2 • “Bluetooth Login” option on your web application trigger BLE connection using web Bluetooth. • No need of username and password as the smart device can encode user info within the JWT.3 • Every time before the JWT expires, authentication device publish the new JWT. • This will ensure that the web access is continued as long as the BLE is connected.4 • The BLE smart authenticator can be fixed inside a building, so that this authenticator will work only within the BLE range • Can be considered this as a geo fenced access control5 • Usual logout action can be triggered 6
  • 76. Thank you  Sooraj Sanker @soorajsanker gh/soorajshankar soorajshankar@gmail.com

Editor's Notes

  1. I work for itc Infotech IoT and IIoT solutions Mobile cloud and front-end technologies Twitter Gh
  2. In Chrome 56, this shipped on Android, ChromeOS, and macOS. In Chrome 70 it is shipping on Windows 10. For earlier versions of Windows and Linux, it is still behind a flag (chrome://flags/#enable-experimental-web-platform-features).
  3. Piano Ping Firebase Twin Dynamo DB