The document summarizes a presentation on interfacing Bluetooth Low Energy (BLE) with an Android device. It provides an introduction to BLE, including what a BLE device is, why BLE is used, and its role in IoT. It then demonstrates accessing BLE devices like Estimote beacons from an Android phone app and interfacing with the BLE device to read from and write to its modules. The presentation compares BLE to other wireless technologies for IoT and outlines how to configure and access BLE devices and services using Android APIs and apps.
1. All India Seminar
on
Internet Of Things (IoT)
Trends that affects Life
22-23 January 2016
At
Bhaikaka Bhawan, IE(I), GSC, INDIA
Day 2 – Session: 1
(10:00 AM to 10:45 AM)
Interfacing BLE with an Android based Device
by
Prof. Hemal Shah
Professor, Ganpat University
2. Outline
• Introduction to Bluetooth Low Energy (BLE)
– What is LE Device?
– Why BLE?
– Role of BLE in IoT
• Hardware Samples - Beacons
– Estimotes
• Accessing BLE Devices
• Interfacing with Android based device – Read from and Write
in to Device Module
– Demo
– Output
1/27/2016 2
4. 1. Perception layer/Physical Layer : Information origin and the core. All
Information perceived and collected in this layer.
Ex : BLE ,wireless sensors network (WSN),RFID, ZIGBEE, Bluetooth etc.
2. Network layer : Access network and core network, provides
transparent data transmission capability.
Ex: IPV4 and IPV6 Networks
3. Service layer : Application layer, includes data management sub-layer
and application service sub-layer.
Ex: Smart Health, Smart Transport, Smart Home, Smart Crowd sensing
IoT- Architecture (Continue…)
1/27/2016 4
5. Bluetooth Low Energy(BLE) Protocol Stack
Bluetooth Low Energy device is Hardware and Software.
1/27/2016 5
Figure:2 BLE Protocol Stack [2]
Assigned numbers are used in GAP for
inquiry response, manufacturer-
specific data, advertising data, low
energy UUIDs and appearance
characteristics, and class of device.
ATT is a much lower level mechanism
that basically defines how to transfer a
unit of data (an attribute).
GATT is built on top of ATT and defines
how higher level services are
composed and the framework for
operating on those services.
6. Bluetooth Low Energy(BLE) (Cont..)
Role of Perception layer:
• Manage Device Role (Master/Slave)
• Enabling Advertisement Channels
• Discoverability and convertibility modes
• Advertisement of Interval and Data
• Connection Interval, timeout, Slave Latency
• Output Power
1/27/2016 6
8. Technolog
y
NFC RFID BT BLE Wi-Fi Zigbee WPAN WiMa
x
2G-3G
Power Low Low Low Low High Low Low High High
Speed
(Kbps)
400 400 700 1000 10000
0
250 250 10000
0
5000
Distance
covered in
Meters
0.01 3 0 30 50-70 15 300 800 50000 Cellular
Network
depends
Cost to
Build IoT
Less Less Less Less Averag
e
Less Less High High
IoT Target
Applicatio
n
Payme
nt
Applic
ation,
Share
Details
in
short
Distan
ce
Product
Identificat
ion,
Tracking
Segments
Data
Exchan
ge in
Mediu
m
distanc
e, with
mediu
m scale
of data
Fitness
Tracking,
Health
Monitori
ng
Interfa
ce
with
Intern
et, IoT
Server
comm
unicati
on
Automoti
ve
product
support,
Sensor
Interface,
Home
Automati
on
Automoti
ve
product
support,
Sensor
Interface,
Smart
City
Automati
on
Interfa
ce with
Intern
et, IoT
Server
comm
unicati
on
Interface
with
Internet,
IoT Server
communica
tion
Figure 3 : Comparison of Different Communication Technologies [3]1/27/2016 8
Comparative measures of BLE with other Communication Technologies
9. Bluetooth SMART READY support was Apple with their iPhone 4s. Since then, all
of their devices iPads, iPhones, MacBooks and Apple TV too support BLE.
Samsung Galaxy series, Sony Xperia series and Google Nexus also started providing
BLE functionality with the release of Android 4.3 API that came with BLE
support.
BLE wearable Devices are:
• Heart rate monitors
• Smart watches
• Fitness trackers
These devices send their tracking details to smartphone app of the wearer or
other necessary party such as a personal physician.
Link1 Link2
1/27/2016 9
BLE Applications
10. What are Beacon?
• Beacons are Hardware Devices that can Emit
and Receive BLE Signals [3].
• Beacons are BLE devices that can be placed
throughout any ‘target’ area that emit a
signal that can be detected by other BLE
enabled devices.
• Depending on the beacon device and how
frequently it sends out a signal, the battery
life can last for a year or longer.
• Certain mobile devices themselves can also
act as a beacon that can both emit and
receive signals.
1/27/2016 10
12. Estimotes Beacon
• Estimote Beacon is a small computer [3].
• 32-bit ARM® Cortex M0 CPU with accelerometer, temperature sensor.
• 2.4 GHz radio using Bluetooth 4.0 Smart.
• Beacons can last more than 3 years on default settings on a single CR2477 battery.
1/27/2016 12
13. How we should access BLE?
Purpose of accessing BLE Device:-
• Setup & Configuration of the UUID, Major, Minor values
•Discovery of Nearby Smart Device
•Connection Management & State Management of Smart Device
•Retrieve, understand and use characteristics
•(Read/Write/Notify/Advertise) through Generic Attributes and Services
(GATT Services)
•Naming and Addressing Devices
•Measurement of RSSI values of Nearby devices for Energy Modeling and
Calculation for Energy Estimation
1/27/2016 13
14. Accessing Estimote Beacons
There are three ways to access:
1. Estimote App (Ex: NRF Master by Nordic)
2. Estimote Cloud (https://cloud.estimote.com/)
3. Estimote SDK (http://developer.estimote.com/)
1/27/2016 14
15. • Then on the Android Phone run any
BLE app from
• BLE Checker
• BLE Scanner
• BLE gatt
• Nrf Master
• These all applications have the GATT
Characteristics that is mainly
supported by the BLE
• Generic Attribute Profile (GATT) is built
on top of the Attribute Protocol
(ATT)[2].
• GATT defines two roles: Server and
Client.
Accessing Estimote BLE using Android APK
1/27/2016 15
31. References
[1] Xiaolin Jia, Quanyuan Feng , Taihua Fan, Quanshui Lei, “RFID technology and its applications in
Internet of Things (IoT)”, Consumer Electronics, Communications and Networks (CECNet), 2012 2nd
International Conference, IEEE, April-2012.
[2] https://www.bluetooth.org/tpg/RefNotes
[3] ”BLE/Beacons/ibeacon, Internet of Things”, Tim McKendrick ,Director of Project Management |
Vectorform
[4] An introduction to beacon, Locolo,Beekn, www.BEEKn.net
[5] https://www.linkedin.com/pulse/what-bluetooth-low-energy-means-internet-things-premaratne
[6] Microchip RN4020 (Bluetooth Low Energy Module)- Guide, 2014 Microchip Technology Inc. ,
Advance Information ,DS50002279A.
[7] Saminath.V, Jung Su ,”Understanding of Internet of Things (IoT) and Experimental Approach using
WICED Sense in Android Platform “, International Journal of Scientific and Research Publications,
Volume 5, Issue 7, July 2015, ISSN 2250-3153.
1/27/2016 31
32. Acknowledgment
• Prof. Rahul Shrimali, Ph.D Scholar, Ganpat University
• Prof. Umang Shukla, Asst Professor, SAL Engineering College
• Ms. Jinal Patel, M. Tech. Scholar, Saffrony Institute of Technology
1/27/2016 32