Beetle: Operating System Support for the Internet of Things

Similar documents
Beetle: Many-to-many communication in Bluetooth LE. Amit Levy, Laurynas Riliskis, Philip Levis, David Mazières, and Keith Winstein

Beetle. Sharing, flexibility and access control for Bluetooth Low Energy. Amit Levy James Hong Laurynas Riliskis Philip Levis Keith Winstein

Beetle: Flexible Communication for Bluetooth Low Energy

Internet of Things Bill Siever. New Applications. Needs. Wearables. Embedded Smarts. Simple to Setup. Networking w/ Long Battery Life (Low Power)

Wireless Sensor Networks BLUETOOTH LOW ENERGY. Flavia Martelli

Bark: Default-Off Networking and Access Control for the IoT. James Hong, Amit Levy, Laurynas Riliskis, Philip Levis Stanford University

Performance Evaluation of Bluetooth Low Energy Communication

Lecture 04 Introduction: IoT Networking - Part I

When is Bluetooth not Bluetooth?

Bluetooth low energy technology Bluegiga Technologies

Bluetooth Mesh. Johan Hedberg

Which application/messaging protocol is right for me?

Tap BLE API Documentation

Tizen Connectivity Support. for IoT Devices. Steve(Taesoo) Jun, Ph.D. Copyright 2017 Samsung. All Rights Reserved.

Bluetooth LE 4.0 and 4.1 (BLE)

IOTIVITY INTRODUCTION

Towards a Secure Internet of Things. Stanford University Philip Levis (representing many contributors)

Energy Efficient Mobile Compu4ng Building low power sensing devices with Bluetooth low energy. Simo Veikkolainen Nokia May 2014

System Architecture Challenges in the Home M2M Network

DEEP ARMOR. Hands-on Exploitation & Hardening of Wearable and IoT Platforms. Sumanth Naropanth & Sunil Kumar

12/2/09. Mobile and Ubiquitous Computing. Bluetooth Networking" George Roussos! Bluetooth Overview"

PM0257. BlueNRG-1, BlueNRG-2 BLE stack v2.x programming guidelines. Programming manual. Introduction

TI SimpleLink dual-band CC1350 wireless MCU

Guide to Wireless Communications, 3 rd Edition. Objectives

2013 Cisco and/or its affiliates. All rights reserved. 1

Inside Bluetooth Low Energy

Terminal I/O Profile. Client Implementation Guide. Release r02

Integrating Custom Hardware into Sensor Web. Maria Porcius Carolina Fortuna Gorazd Kandus Mihael Mohorcic

Security for Secure IoT: Advanced Architectures for IoT Gateways. Simon Forrest Director of Segment Marketing, Consumer Electronics

for Multi-Services Gateways

CISS Communication Protocol Bluetooth LE

Wireless Connectivity Options for IoT. By: MIST Makers John Varela and Nicholas Landy

Message Queuing Telemetry Transport

Bluetooth. Quote of the Day. "I don't have to be careful, I've got a gun. -Homer Simpson. Stephen Carter March 19, 2002

nblue TM BR-MUSB-LE4.0-S2A (CC2540)

3 Software Stacks for IoT Solutions. Ian Skerrett Eclipse

Integration of Wireless Sensor Network Services into other Home and Industrial networks

CASAN: A New Communication Architecture for Sensors Based on CoAP

Arm Mbed Edge. Shiv Ramamurthi Arm. Arm Tech Symposia Arm Limited

b) Diverse forms of physical connection - all sorts of wired connections, wireless connections, fiber optics, etc.

Mobile Security Fall 2011

Jonas Green, Björn Otterdahl HMS Industrial Networks AB. February 22, 2017

Towards a Secure Internet of Things

BLE Command Line Interface Document

Bluetooth Smart: The Good, The Bad, The Ugly... and The Fix

Hands-On with IoT Standards & Protocols

Harvesting IOT data. (Using IP networks) Ericsson 2014

IrDA INTEROPERABILITY

Safely and Efficiently Programming a 64kB Computer

Introduction to Bluetooth Low Energy

Proposed Node and Network Models for M2M Internet

Managing Your APIs in a Manufacturing Environment

Multi-link support for up to four simultaneous connections in any combination of roles

The Zentri Secure IoT Platform

High Volume Messaging with IBM MessageSight for use in Mobile, Web and M2M solutions

Tolerating Malicious Drivers in Linux. Silas Boyd-Wickizer and Nickolai Zeldovich

MQTT MQ TELEMETRY TRANSPORT. AN INTRODUCTION TO MQTT, A PROTOCOL FOR M2M AND IoT APPLICATIONS. Peter R. Egli INDIGOO.COM. indigoo.com. 1/33 Rev. 1.

SMART Technologies. Introducing bluetooth low energy and ibeacon

A Real-Time BLE enabled ECG System for Remote Monitoring

Android. Lesson 1. Introduction. Android Developer Fundamentals. Android Developer Fundamentals. to Android 1

TinyOS meets IP -- finally

Controlling electrical home appliances, using Bluetooth Smart Technology (October 2015) Pedro José Vieira da Silva

Ch 1. Mobile Adaptive Computing

Click to edit Master title style Buzzing Smart Devices

BT121 Bluetooth Smart Ready Module. May 2015

INTERNET OF THINGS (IoT) DESIGN CONSIDERATIONS FOR EMBEDDED CONNECTED DEVICES ANDREW CAPLES SENIOR PRODUCT MARKETING MANAGER, NUCLEUS

Bluegiga Bluetooth Smart Software v.1.3 5/28/2014 1

BLUETOOTH 4.1 FREQUENTLY ASKED QUESTIONS

An Incubator Project in the Apache Software Foundation. 13 July 2016

BT121 Bluetooth Smart Ready Module. July 2016

B U I L D I N G O N T H E G A T E W A Y. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

ARM mbed mbed OS mbed Cloud

Bluetooth Low Energy on Android

Application of Android Mobile Platform in Remote Medical Monitoring System

Talon Communications. Wireless and Video Product Development It s what we do!

tcpcrypt: real transport-level encryption Andrea Bittau, Mike Hamburg, Mark Handley, David Mazieres, Dan Boneh. UCL and Stanford.

CISS - Connected Industrial Sensor Solution

Middleboxes in Cellular Networks

Preparing CMS for an IP Version 6 World

Wi-Fi helping out Bluetooth Smart for an improved home automation user experience

Enabling technologies for Wireless Sensor Networks VTT Technical Research Centre of Finland Ltd

Experimental Evaluation of Transport Services CoAP, HTTP and SPDY for Internet of Things

New Release - Continuous Wave Recording for ECG, EMG, Airflow and Snore Sensors (02/2017)

CIP over 6LoWPAN. Technical Track. Prepared by Dayin Xu, Paul Brooks, Yi Yu, David Brandt Presented by Paul Brooks.

PushyDB. Jeff Chan, Kenny Lam, Nils Molina, Oliver Song {jeffchan, kennylam, molina,

Terminal I/O Profile Client Implementation Guide

How onem2m fits into the landscape of IoT technologies

Advanced Computer Networking. CYBR 230 Jeff Shafer University of the Pacific QUIC

ARM mbed Reference Designs

Sensor-to-cloud connectivity using Sub-1 GHz and

MNEM IoT Presentation for Export

IoT Infrastructure. idevicesinc.com

Mobile and Ubiquitous Computing

IOTIVITY AND EMBEDDED LINUX SUPPORT. Kishen Maloor Intel Open Source Technology Center

Cloud Based IoT Application Provisioning (The Case of Wireless Sensor Applications)

Developing ILNP. Saleem Bhatti, University of St Andrews, UK FIRE workshop, Chania. (C) Saleem Bhatti.

Bluetooth Low Energy Based CoAP Communication in IoT CoAPNonIP: An Architecture Grants CoAP in Wireless Personal Area Network

Bidirectional wireless communication between IBM Cloud and Bluetooth Low Energy peripherals through SimpleLink Wi-Fi

Arm Mbed Edge. Nick Zhou Senior Technical Account Manager. Arm Tech Symposia Arm Limited

Transcription:

Beetle: Operating System Support for the Internet of Things Amit Levy, James Hong, Laurynas Riliskis, Philip Levis, David Mazières, and Keith Winstein

The Internet of Things Ideal Future

The Internet of Things Today

It's Not An Internet Connectivity is poor and constrained Edge devices cannot communicate with each other Edge devices can only communicate with one application Vertical integration of peripherals, gateways, and cloud Simple, desirable use cases are impossible Monitor battery life of all my devices

Why? Some non-fundamental Reasons Vendors want to own the user experience Standardization takes time WWW, Z-Wave positive historical examples Messaging probably a negative example

What are the Fundamental Reasons?

It's the gateway stupid!

It's the [Gateway] Stupid! IoT devices are feable and weak Low power: achieved by being mostly of Simple network protocols: Bluetooth Low Energy et al Naming is harder Honey, what's the toaster's IP address, again? It's up to gateways to provide: connectivity, nameing, security...

Operating Systems Today

Operating Systems Today

Operating Systems Today Small number of tailored device interfaces Printer File system X Windows HID TCP/IP stack

Linux is not IoT Scale!

Operating Systems Today The IoT will have 1,000,000,000 device types! We can't hope to support each type in every OS separately For now, instead of safe, shared interfaces we get exclusive streams L2CAP sockets for BLE, serial devices for ZigBee, etc 6lowpan is an exception (sort of)

We need a single OS interface for all devices!

Outline Looooooong Intro Bluetooth LE architecture Beetle Network architecture Mechanisms: HAT Virtual devices Service export control

Outline Looooooong Intro Bluetooth LE architecture Beetle Network architecture Mechanisms: HAT Virtual devices Service export control

Bluetooth Low Energy Single-hop protocol Physical, Link and Application layers Optimized for small exchanges and low energy: ~24 byte exchanges; infrequently μa power consumtpion Can run for years on coin battery

Bluetooth Low Energy Connections Advertising Packets Generic Attribute Protocol (GATT) L2CAP Link Layers

Link Layer Piconet topology Two roles: Peripheral (fitness band, watch, dead-bolt, etc) Central (smart phone, laptop, gateway, etc) Centrals manage connections with multiple peripherals Peripherals can connect to a single central only

L2CAP Channels Logical channels over single link Reliable Some channels reserved (e.g. GATT, signaling) L2CAP Header Length Channel ID Payload

Generic Attribute Protocol (GATT) Handle Type Value 0x0200 service glucose 0x0201 measurement data 0x0202 context data 0x0203 feature data 0x0204 record control data 0x0205 service time 0x0533 service heart rate 0x0535 measurement data 0x0540 location data characteristics characteristics

GATT Two roles: Server has the attributes Peripherals and Centrals can be both clients and servers simultaneously Key/Type/Value store: Read/Write Notify/Indicate Find by type Opcode Handle Opcode parameters (type, value...)

GATT: Simple Example Notify 0x7: 152bpm Notify every 1 second Notify 0x7: 154bpm Server Notify 0x7: 152bpm Notify 0x7: 157bpm Client

A peripheral can only maintain one open connection!*

One-to-One Communication App App OS BLE App Gateway

The Internet of Things Today

Today: Gateway Interposes on Data Each peripheral connects to a single app on the gateway Can only communicate directly with that app App consumes GATT data. Mediates only supported interactions: Issue GATT commands to other connected peripherals Proprietary protocol to servers (e.g. over app-specific HTTP) (Limited) Intent-based interface to other apps The app doesn't support an interaction you want? Tough luck...

GATT: Three Important Properties Self-Describing: Standardized service/characteristic types Incorporates service discovery Transactional Only onle outstanding command per connections in each direction High level Application-level transactions == protocol transactions

Outline Looooooong Intro Bluetooth LE architecture Beetle Network architecture Mechanisms: HAT Virtual devices Service export control

Beetle Builds a network out of BLE A software layer that runs on your gateway Device-to-device communication Safe multi-app communication, locally or over Internet Fine grained access control Completely backwards compatible with existing BLE devices

Beetle: Design Overview Privileged user-space process on Linux and Android Provides networking to BLE devices Gateway routes between peripherals, apps and cloud Leverage richer userinterface on gateway Applications GATT Beetle HAT Characteristic Caching Access Control GATT Radio

Beetle: Gateway Mechanisms Handle address translation (HAT) Multi-link networking Virtual devices Software connectivity Interface with other protocols (e.g. HTTP, Intents) Service export control Fined-grained security policies Naming

Handle Address Translation (HAT) Re-export peripheral services as gateway services Proxied attributes on the gateway Associated with a remote attribute on a peripheral Beetle routes messages to proxied attributes to the appropriate peripherals Translate peripherals handles into gateway address space Similar role to NAT in TCP/IP world

Handle Address Translation (HAT) 0x0510 0x1210 0x0200 service cadence service service cadence heart 0x0100 service heart

HAT: Discovery Typical BLE connection has fixed set of services In Beetle, new services appear as more peripherals connect or policy is changed Take advantage of Service Changed characteristic Notifies client when new set of services changes Provides a range of afected handles Keep track of which peripherals might notice the service has changed to minimize noise If a peripheral never asks for a service, it shouldn't matter

HAT: Notifications GATT notifications are a two-step process: Subscribe/unsubscribe to notification by writing 1 or 0 to an attribute Server begins notifying when value changes Cannot re-expose subscription attribute directly Instead: Maintain a subscription set for every server notification source Intercept subscribe and unsubscribe messages Only forward first subscribe or last unsubscribe to server

HAT Creates a Network Re-exporting attributes on gateway enables peripheral-to-peripheral communication Aggregating attributes from multiple servers allows many-to-many peripheral communication HAT must maintain app-level protocol semantic Leverage knowledge of app-level protocol semantics to retain reasonable performance

Demo: Lights and Switches

Virtual Devices Virtual devices speak GATT for non-ble links: IPC, TCP/IP, USB, etc Provide access to non BLE services GPS Emulated device with test data Legacy Internet services (e.g. HTTP) Complexity handled by HAT

Virtual Devices: Local A user-level process that speaks GATT Access to Beetle over IPC (e.g. UNIX domain sockets) Similar to programming an app now (identical on Android) Very useful: Multiple user apps Expose local, non-ble, sensors Prototyping hardware Custom multiplexing

Virtual Devices: Network Services Virtual devices can exist on the Internet In the cloud, local area network Scenario 1: Internet service supports Beetle Beetle OS service connects directly over TCP Don't need to write a tailored app Scenario 2: Legacy Internet service (e.g. HTTP/REST) A local virtual device exports data over the legacy protocol

Service Export Control So much connectivity!! Need a way to control who sees what Strava shouldn't only see my current heart rate when I allow it Routing at app-level protocol gives us more flexibility Many possible criteria for access control Physical location Identity Pre-established trust Out-of-band authentication (e.g. user login)

Beetle Gateway should route communication but not mediate application data Beetle is an OS service on the gateway that creates a network from BLE Three key mechanisms: HAT for peripheral communication Virtual devices for multiple-apps, device emulation and connecting other networks Service export control pushes policies to more featureful gateway devices Completely backwards compatible with existing BLE devices

Questions?

Beetle Linux Implementation Linux user-level process ~1300 lines of code (in Go) No changes to Kernel Although could be useful Global handle address space Virtual devices over UNIX domain sockets

Peripheral-to-Peripheral RTT