Lecture 12: Bluetooth LE Topics: BLE Basics, code example.

Slides:



Advertisements
Similar presentations
Azure IoT and Bluetooth LE Jared Rhodes MCSD, Xamarin Certified Developer Senior Consultant Magenic Technologies Marshall Stewart Power Engineer Mangan.
Advertisements

w/ Android, iOS, and Windows Phone
Computer Networks,Internet,& SMTP Priyanka Daultani Department of Computer Science USF, San Francsico, CA.
ZigBee. Introduction Architecture Node Types Network Topologies Traffic Modes Frame Format Applications Conclusion Topics.
Bluetooth 4.0: Low Energy.
Topic 6 – Wireless Technology and handheld devices 1)TechMed scenario covers The uses of wireless technologies and handheld devices In the scenario: “Some.
CS378 - Mobile Computing Connecting Devices. How to pass data between devices? – Chat – Games – Driving Options: – Use the cloud and a service such as.
Bluetooth Low Energy Based Ticketing Systems 11 th February, 2015 Sriharsha Kuchimanchi Supervisor: Prof. Riku Jantti Instructor: Shkumbin Hamiti.
Chapter 4 Computer Networks – Part 1
Doc.: IEEE /205 Submission Pat Kinney, Intermec Technologies Intermec’s PicoLink  WPAN MAC Overview.
Introduction to Networking. Key Terms packet  envelope of data sent between computers server  provides services to the network client  requests actions.
Bluetooth Low Energy
Week 12 (2012) Dr. Ghada Drahem. INTENDED LEARNING OUTCOMES This lecture covers: Networking concepts and terminology Common networking and communications.
(Ultra low power connectivity for small devices) By: Parthesha K.N. 8 th semester I T S I T, Tumkur.
BLUETOOTH WIRELESS TECHNOLOGY
Outline Introduction Bluetooth Low Energy (BLE)
21 st november  Iphone – texting-internet-apps- when texting it sends wirelessly to the reciver  Laptop-downloading-internet- it travels using.
Doc.: IEEE /205r1 Submission Pat Kinney, Intermec Technologies Intermec’s PicoLink  WPAN MAC Overview.
The Semantic IoT Amr El Mougy Slim Abdennadher Ghada Fakhry.
KyungPook National University CSOS Hye Youn Kang.
15-1 Networking Computer network A collection of computing devices that are connected in various ways in order to communicate and share resources Usually,
Network - definition A network is defined as a collection of computers and peripheral devices (such as printers) connected together. A local area network.
Wireless Sensor Network Solution ANT Message Protocol 박 유 진.
Week-3 (Lecture-1). Some Important internet terms: Archie : A program used to search files at FTP sites. There are currently 30 Archie servers in the.
BLUETOOTH LOW ENERGY Kieon Seong. Introduction  Chap 1. What is Bluetooth Low Energy? Difference Between Classic Bluetooth Device Types Design Goals.
Wireless Communication Hwajung Lee Key Reference: Prof. Jong-Moon Chung’s Lecture Notes at Yonsei University.
1.4 wired and wireless networks lesson 1
Tutorial on Bluetooth Low Energy(BLE)
Bluetooth 4.0: Low Energy.
Bluetooth 4.0: Low Energy.
Internet of Things Amr El Mougy Alaa Gohar.
Network Basics Networks – 201.
IBeacon Many communication technologies are well known such as Wi-Fi, Bluetooth, ZigBee Puthea Khem.
Agenda BLE in IoT devices Bluetooth Low Energy Protocol Stack
Module 1: Understanding Local Area Networks
KyungPook National University
Bluetooth.
Bluetooth connection & GAIA protocol
Internet of Things Some notes from “Enabling to Internet of Things” by Want, Schilit, and Jenson.
Bluetooth Low Energy Overview.
Pertemuan 12 Virtual Trunking Protocol
BLUETOOTH THE STANDARD & ISSUES.
Cross Platform Development using Software Matrix
Bluetooth Low Energy Bluetooth Smart Nenad Četić – Makers NS.
MCA – 405 Elective –I (A) Java Programming & Technology
DT80 range Modbus capability
PROGRESS 서재희.
A Wireless LAN technologies IEEE
Ken Gunnells, Ph.D. - Networking Paul Crigler - Programming
Insights into designing short range communication interface for IOT
Introduction to client/server architecture
#01 Client/Server Computing
Bluetooth.
Client-Server Interaction
Wednesday, September 19, 2018 What Is the Internet?
Net 431 D: ADVANCED COMPUTER NETWORKS
Wireless NETWORKS NET 434 Topic No 7 Bluetooth-IEEE802.15
Internet of Things (IoT)
Wireless Communication between Android Application and Sensors
Wireless NETWORKS NET 434 Topic No 7 Bluetooth-IEEE802.15
Chapter 11 Data Link Control (DLC)
EEC-484/584 Computer Networks
Computer Networks,Internet,& SMTP
Starting TCP Connection – A High Level View
Architecture Competency Group
Unit 11- Computer Networks
Allocating IP Addressing by Using Dynamic Host Configuration Protocol
Networking 101.
Lecture 12: Bluetooth LE Topics: BLE Basics, code example.
#01 Client/Server Computing
Presentation transcript:

Lecture 12: Bluetooth LE Topics: BLE Basics, code example

What is BLE? A wireless protocol for connecting two devices. Direct connection between two devices; e.g. phones and health trackers. A lightweight subset of classic Bluetooth. Introduced by Nokia; Became a part of the Bluetooth 4.0 core specification. Power manage: wake lock, reboot.

BLE vs. Classic BT Spec. BLE BT Classic Topology Star Scatternet Throughput 0.7 – 2.1 Mbps 0.3 Mbps Message 8 – 47 bytes 358 bytes Power < 15 mA < 30 mA Cost Low High Range 50 – 150 m < 30 m Latency 3 ms 100 ms Power manage: wake lock, reboot.

Devices: Two Roles Peripheral Device (Server) Central Device (Client) Small Low power Resource constrained Connects to a more powerful (central) device e.g., heart rate monitors, BLE proximity tags Central Device (Client) More processing power More memory e.g. Smartphone and tablets Power manage: wake lock, reboot.

Advertising: Two Kinds of Payloads Advertising Data Payload (Mandatory) – constantly transmitted out of the peripheral to let the central know its existence. Scan Response Payload (optional) – only if a central device requests for this. Power manage: wake lock, reboot.

Advertising Process A peripheral periodically transmits an advertising packet at a specific advertising interval. Longer interval ≡ longer battery life, less responsive. If a listening device (central) is interested in a scan response payload, it can request for it, and the peripheral will respond with additional data. Power manage: wake lock, reboot.

Advertisement-based Communication Typically, peripherals would advertise, establish a connection, and start exchanging data. Using advertisement packets, peripherals can broadcast data to any central in its listening range. Power manage: wake lock, reboot.

Generic Access Profile (GAP) Controls connection and advertising processes. Makes a device visible to the world. Determines how two devices can/cannot interact. Defines the role of a device. Power manage: wake lock, reboot.

Generic Attribute Profile (GATT) Defines how two BLE devices transfer data back and forth using concepts like Services and Characteristics. GATT works only after a dedicated connection between two devices has been established. Connections are exclusive, i.e. a peripheral can only connect to one central device. Communication is two-way. Power manage: wake lock, reboot.

Connected Network Topology One central and many peripherals. For two peripherals to talk, all messages have to pass through a central.

Broadcast Communication So, see the difference? Advertisement-based vs. Connection-based: Connection-less Broadcast Communication Connection-oriented Two-way Communication

GATT (once they are connected) GATT ≈ a client-server relationship. A peripheral is a GATT Server which holds service and characteristic definitions. A central is a GATT Client which sends requests to the server (peripheral).

Again, see the difference? Advertisement-based vs. Connection-based: Connection-less, broadcast communication Connection-oriented, two-way communication

Connection-oriented, two-way communication GATT Transaction All transactions are started by a GATT Client, which receives a response from the GATT Server. When establishing a connection, a peripheral suggests a connection interval. A central device tries to connect to the peripheral at every connection interval to check for new data. Connection-oriented, two-way communication

GATT Transaction Profiles, services, and characteristics: Profile: Predefined collection of Services, compiled by either Bluetooth SIG or a peripheral designer. Service: A collection of characteristics. Unique ID called UUID (16 bit – 128 bit) Characteristic: Encapsulates a single data point. Can be used for sending data back to a peripheral as we can write into a characteristic.

Programming BLE in Android Scanning and Listing BLE Devices Class Useful Methods BluetoothManager getAdapter() BluetoothAdapter getBluetoothLeScanner() BluetoothLeScanner startScan() stopScan() ScanCallback onScanResult() BLUETOOTH and LOCATION permissions are required (manifest.xml) Red colored methods are async – do not call more than one at the same time.

Programming BLE in Android Getting Connected and Listing Services: Class Useful Methods BluetoothDevice connectGatt() BluetoothGatt discoverServices() getServices() BluetoothGattServices getCharacteristics() BluetoothGattCharacteristics getDescriptors() BluetoothGattDescriptor BluetoothGattCallback onConnectionStateChange() onServicesDiscovered() Red colored methods are async – do not call more than one at the same time.

Programming BLE in Android Reading Characteristics (i.e. data): Class Useful Methods BluetoothDevice BluetoothGatt setCharacteristicsNotification() writeDescriptor() BluetoothGattServices BluetoothGattCharacteristics getValue() BluetoothGattDescriptor setValue() BluetoothGattCallback onCharacteristicRead() onCharacteristicChanged() onDescriptorWrite() Red colored methods are async – do not call more than one at the same time.

References https://en.wikipedia.org/wiki/Bluetooth_low_energy https://learn.adafruit.com/introduction-to-bluetooth-low-energy/introduction https://developer.android.com/guide/topics/connectivity/bluetooth-le.html http://www.rfwireless-world.com/Terminology/Bluetooth-vs-BLE.html https://www.link-labs.com/blog/bluetooth-vs-bluetooth-low-energy Power manage: wake lock, reboot.