Upload
sushanth-patwari
View
264
Download
6
Embed Size (px)
DESCRIPTION
latest bluetooth knowledge.
Citation preview
1
BLUETOOTH AND BLUETOOTH LOW ENERGY
Term paper for EECE 510
[1]
Sushanth Patwari
SXP0063
University Of Louisiana at Lafayette
Department of Electrical and Computer Engineering
2
Contents 1. Introduction: .............................................................................................................................................. 3
1.1. What is Bluetooth and why Bluetooth? ................................................................................................. 3
1.2. What is Bluetooth low energy (BLE)? ................................................................................................... 4
2. Paradigms:................................................................................................................................................. 5
2.1. Client-Server Architecture: .................................................................................................................... 6
2.2. Service-Oriented architecture: ............................................................................................................... 6
3. Architecture: ............................................................................................................................................. 6
3.1. Controller: .............................................................................................................................................. 7
3.2. Physical layer: ........................................................................................................................................ 7
3.3. Direct Test Mode: .................................................................................................................................. 8
3.4. Link Layer:............................................................................................................................................. 8
3.5. The Host/Controller Interface (HCI): .................................................................................................... 8
3.6. Host: ....................................................................................................................................................... 8
3.7. Security manager protocol: .................................................................................................................... 9
3.8. Attribute protocol: .................................................................................................................................. 9
3.9. The Generic attribute profile: ............................................................................................................... 10
3.10. Generic access profile: ....................................................................................................................... 10
4. The application layer: ............................................................................................................................. 11
4.1. Characteristics: ..................................................................................................................................... 11
4.2. Service: ................................................................................................................................................ 11
4.3. Profiles: ................................................................................................................................................ 11
5. Hardware case study: .............................................................................................................................. 12
6. Applications: ........................................................................................................................................... 14
7. Conclusion: ............................................................................................................................................. 16
8. References: .............................................................................................................................................. 17
Figure.1…………………………………………………………………………………………... 7
Figure.2……………………………………………………………………………………………9
Figure.3…………………………………………………………………………………………..12
Figure.4…………………………………………………………………………………………..13
Figure.5…………………………………………………………………………………………..15
Table.1…………………………………………………………………………………………...16
3
1. Introduction:
1.1. What is Bluetooth and why Bluetooth?
We find Bluetooth in every smart phone today and many consumer electronics which need
connectivity. Bluetooth is a wireless technology standard for exchanging data over short
distances. Bluetooth uses short wavelength UHF radio waves in the ISM band from 2.4 to 2.485
GHz). Bluetooth creates PAN (personal area networks)[4], the range of PAN varies from few
centimeters to a few meters. PANs are used for communicating among personal devices
themselves or for connecting to a higher level network and the internet. Bluetooth was originally
conceived as a wireless alternative to RS-232 data cables. Bluetooth had a lot of advantages over
RS-232, most important of them being no wire clutter and no problems of synchronization.
Bluetooth was invented by telecom vendor Ericsson and it is now maintained and managed by
the Bluetooth Special Interest Group (SIG), which is a Group of companies from various fields
such as telecommunication, computing, networking, and consumer electronics. The SIG
develops and maintains the Bluetooth standard. A manufacturer must make the device it
manufactures meet the Bluetooth SIG standards to market it as a Bluetooth device.
Bluetooth has become a necessity in every smart phone today and many applications
have been developed around it. Bluetooth applications once was just a hands free headset but
now it has applications in diverse fields. Now a day’s one can find Bluetooth in speakers,
personal health monitoring systems, home automation and wireless mouse, keyboard etc..,. The
list goes on as new applications keep adding to the list every day.
I am going to mostly concentrate on Bluetooth Low Energy (BLE) the most recent offering from
Bluetooth. BLE uses the Bluetooth brand and borrows a lot of technology from Bluetooth
4
classic. It is being implemented in most of the new applications and promises to make use of
minimal power, most important feature a consumer would want in this mobile world.
1.2. What is Bluetooth low energy (BLE)?
Bluetooth low energy is a brand new technology that has been designed as both a complementary
technology to classic Bluetooth as well as the lowest possible power wireless technology [3] that
can be designed and built. Bluetooth has a complete different design goals and caters to different
market segments.
BLE has found widespread usage because of a new paradigm in connected computing which is
being called as Internet of Things (IoT). IoT is a network of devices which are always connected
together. Most of the devices in this network are mobile devices, which are scarce on power and
BLE provides a most efficient way of keeping them connected as it utilizes very little power. In
fact an application using BLE can run up to years on a single coin cell battery. A projected 30
billion devices will enter into the IoT ecosystem by 2020 according to ABI Research [5]. Analyst
firms all over the world recognize Bluetooth Smart as a key enabler in the Internet of Things.
Classic Bluetooth was designed to bring together the different worlds of computing and
communication. The most common application was linking cellphones to laptops. The most
popular application of classic Bluetooth was that it could provide an audio link from the cell
phone to a headset placed on or around the ear. As technology progressed it found new
applications such as wireless printing and file transfer. As the applications increased they
required higher bandwidth and faster radios have been constantly added to different Bluetooth
versions over the time.
5
Version1- Basic rate- 1 Mbps
Version2- Enhanced data rate- 3Mbps
Version3- 54Mbps
Version4- 0.3Mbps
As we can see the version four the data rate has reduced, because this was designed to achieve
low power requirements required for devices powered by button cell batteries.
The advantage with the Bluetooth low energy is that it is possible to build two types of devices:
dual mode and single mode. A dual mode device is a Bluetooth device which supports both
Bluetooth classic and Bluetooth low energy. A single mode Bluetooth is a device which only
supports Bluetooth low energy. Therefore by using Bluetooth dual mode in an application we
can have the best of both worlds or just use the single mode where there is limited power
available.
One more thing that Bluetooth does which has led to its rise is its ability to work in congested
environments. So many wireless standards fall down at the as soon as they become popular due
to congestion from many other radios [2]. There could be a thousand devices within a few meters
of a device even then device discovery and connection function as expected in a Bluetooth
device.
2. Paradigms:
Any technology is built around a set of paradigms, Bluetooth low energy is built around two
main architectural paradigms.
(i) Client-server architecture
(ii) Service oriented architecture
6
2.1. Client-Server Architecture:
Smart gateways allow interconnection between the internet and low energy slaves. This is
possible because of the pure client-server architecture. A client can be connected directly to the
server or it could be connected via an internet gateway from the other side of the world.
This Client server architecture is what makes it possible to monitor and control smart home
devices (home automation) [2]. For example it makes a person to check if his windows are all
closed and his heating system shut off while he is away on way to his vacation.
2.2. Service-Oriented architecture:
In addition to the client server architecture is the service oriented paradigm. This model
organizes the information in the server into services. These services can be used in any way,
they are available to be readily to be used. They have a defined behavior which will produce the
same result.
3. Architecture: BLE Architecture is divided in to three basic parts.
(i) Controller
(ii) Host
(iii) Applications
7
Fig1: The Bluetooth Architecture.
3.1. Controller:
The controller consists of both the physical layer, direct test mode, some of the Host controller
interface.
The host has the following protocols: logical link control, adaptation protocol, attribute protocol
and the security manager protocol.
3.2. Physical layer:
It is responsible for transmitting and receiving bits using the 2.4 GHz radio. The modulation
scheme used for BLE is called Gaussian frequency shift keying (GFSK). As it was mentioned
above that Bluetooth has the capability to function even when there are lot of other radios present
in the same area transmitting at the same time, the reason for this is that 2.4 GHz channel is split
up into 40 different RF channels, each 2MHz apart from each other. This layer transmits
information at one bit of data for every one microsecond.
8
3.3. Direct Test Mode:
This mode comes into play during the testing of the physical layer. What this mode does is that it
lets a tester to give some commands to the physical layer which will either send a sequence of
test packets or receive a sequence of test packets. The tester then can analyze if the physical layer
is working according to the required specifications.
3.4. Link Layer:
This can be considered as the most complex part of the Bluetooth low energy architecture. This
layer is responsible for advertising, scanning, creating and maintaining connections. The packet
structure, checksum values, encryption is also taken care by this layer.
3.5. The Host/Controller Interface (HCI):
Many devices have a HCI, this allows a host to communicate with the controller. This a standard
interface and can be found on almost of all devices having Bluetooth. It is the main reason for
communication between the host and the controller.
3.6. Host:
The host contains multiplexing layers, protocols, and procedures for doing many things.
Protocols contained in the host are:
(i) Logical link control and adaptation
(ii) Security Manager Protocol
(iii) The attribute protocol
(iv) The generic attribute protocol
(v) The general access profile.
9
Logical link control and adaptation (L2CAP): It is the multiplexing layer. It defines the
L2CAP channel and L2CAP signaling command. It is a single bidirectional data channel that
is terminated at a particular protocol or profile on the peer device.
Fig2: The L2CAP packet structure.
3.7. Security manager protocol:
We always pair Bluetooth devices so that next time the devices come into proximity they can
send data easily without following all the steps from the beginning. The security manger
defines the protocol for this. Pairing is the process of trusting another device by
authenticating the other device. The Security Manager also provides a security toolbox for
generating hashes of data, generating confirmation values, and generating short-term keys
used during pairing.
3.8. Attribute protocol:
This protocol defines how data can be accessed on a peer device. The client server
architecture mentioned above can be seen in action here. The data is stored on a server called
as attribute server in ‘attributes’ so that an attribute client can read and write. Whenever a
client requests some data it requests the server and the server responds with response
messages. The attribute protocol defines six types of messages:
1) Requests sent from the client to the server.
2) Responses sent from the server to the client in reply to a request.
10
3) Commands sent from the client to the server that have no response.
4) Notifications sent from the server to the client that have no confirmation.
5) Indications sent from the server to the client and
6) Confirmations sent from the client to the server in reply to an indication.
By looking at these we can say that both client and server can start a conversation and request a
response, they can also send messages which do not require responses. Attribute protocol also
defines some permissions like for example it ca allow a client to read or write an attributes value
or just allow the client to just access the value.
3.9. The Generic attribute profile:
The generic attribute profile is above the attribute protocol. We mentioned about attributes in the
above section, the generic attribute profile defines how they are used. The generic attribute
protocol defines several things such as “characters”, “services” and the relation between the
services. It also defines a number of procedures that can be used to discover the services. A
service has to be as simple as possible because if we create a complex service it becomes
difficult for it to be used in a different context. Reusability is a very important character when it
comes to creation of a service. A simple example for a service is a battery service.
3.10. Generic access profile:
It defines the how devices discover other devices and connect to them. It also defines how any
useful information is shared between them. All smart phone users will be familiar with the
concept of bonding. This profile defines how devices can create a permanent relationship known
as bonding. To make this possible the profile defines how devices can be discoverable,
connectable and bondable.
11
4. The application layer: At the top resides the application layer. It defines characteristics, service and profile.
4.1. Characteristics:
It is a bit of data with a universally unique identifier (UUID).They are defined in a computer
readable format so as to make it easy for the computers to download this computer readable
specification and display it to the user.
4.2. Service:
A service is a set of characteristics in a human readable format. A service can include many other
services. The parent server only defines the services that are included in it but cannot change
their behavior or characteristics. The services can be divided as primary and secondary services,
the primary services are what an application is intended to do where as a secondary service
assists the primary services.
4.3. Profiles:
Profiles are nothing but the applications. They describe the devices and the services running on
them. Profile also describe how these devices can be connected, discovered. They also define the
server and client behaviors associated with the devices.
12
Fig3: Example for the profile-service relationship
This section gave a brief explanation on Bluetooth low energy’s architecture and how it
functions. The internal organization has been explained. A single service can be used by several
profiles to perform a particular application on the device. The behavior of the service is
independent of the profile using it at the particular time.
5. Hardware case study: I used this module as a part of a larger project, using this module gave me hands on experience
on the functioning on how Bluetooth and Bluetooth low energy technology are implemented.
Bluetooth module-CC256xqfnem by Texas instruments [6]
CC256xqnem is a dual mode evaluation module board by Texas instruments. It supports both
Bluetooth classic and Bluetooth low energy evaluation. I found this board most suitable for me
13
as it is not only perfect for the particular project because of its low power feature, it is also gives
me a great chance of exploring the world of Bluetooth and experiment with it.
Fig4: CC256xqfnem by Texas Instruments.
Features [6]:
Bluetooth Specification v4.1
Dual Mode - Bluetooth & Bluetooth low energy or ANT
TI Bluetooth Stack with many profiles
Other profiles available on request i.e. Audio Profiles
14
FCC, IC, CE certified
High sensitivity (-93 dBm typ.)
UART Interface
4 Layer PCB design
ROM spin to enable offload host and saves current with assisted audio
SBC encode/decode on chip
Support for 2 wire UART (TX, RX), SW flow control (H5 protocol), and 4 wire UART (H4
protocol)
Up to 10 Bluetooth low energy connections
The stack is provided by Texas instruments and is called as Bluetopia. It has several profiles and
the basic testing of the data can be done by using the inbuilt SPP profile. In this profile we can
set the board as server and data transfer can be observed between the module and any mobile
device having Bluetooth. I used the tera term virtual terminal to setup the connection, where as
an app called as blueterm readily available on android play store which is installed on the smart
phone, acknowledges the reception of data. The communication takes place through COM port
and the baud rate is 115200, the data is sent in 8bit boundaries and stop bit is 1 bit.
6. Applications: Bluetooth low energy has applications in several domains. The main areas where it has got main
applications are the health care and fitness areas. My application using the above mentioned
hardware is related to the health care field.
15
As explained above Bluetooth low energy defines several profiles and some of the profiles it
defines for health care are
BLP (Blood Pressure Profile) - for blood pressure measurement.
HTP (Health Thermometer Profile) - for medical temperature measurement devices.
GLP (Glucose Profile) - for blood glucose monitors.
CGMP (Continuous Glucose Monitor Profile).
These profiles can be used for their respective applications. The architecture of a typical
healthcare system can be shown as below [7].
Fig 5. : Wearable healthcare systems
The user can be in any type of environments, indoor, outdoor wearing these obstructive and light
weight devices on his body. The brains of these devices are the sensors, they make it possible to
collect any type of information from the human body. The make it possible to collect signals
16
from various parts of the body such as electroencephalogram (EEG) , electrocardiography(ECG),
electromyography(EMG) or oxygen saturation (SPO2). These sensors are called wearable
sensors. The data collection and processing units form the core of the system. The data collection
and processing can be done on the chip, cell phone or a computer. These hardware depending on
their complexities and abilities can monitor, analyze and even provide feedback. If we look at the
above figure we can see that it provides three architectures which shows that a phone alone, a
computer alone or a combination of a phone and a computer can provide for a data collection and
processing hardware.
There are several commercially available products these days which are making our lives easier
and are using the Bluetooth low energy technology to make this possible.
Table 1: Commercial Available Healthcare Devices Using Bluetooth Low Energy
7. Conclusion:
Bluetooth low energy is really what is making the IoT possible. It has the potential to become the
most widely used wireless protocol for devices which have a problem of battery and limited
17
applications. Even as BLE is a very useful technology there are some problems I faced while
doing my project.
What I had to do during my course of building and compiling codes for my application using
BLE is that I had to work on several tools, and faced a lot of problems while dealing with
hardware manufactured by different companies as each company has its own tool and other
features which are generally not compatible with devices of other companies. I personally feel that
this is a major obstacle which is hindering the growth of IoT. If there is a universal tool which
could function with any hardware then the task of building applications by using hardware
manufacture by different companies will be faster and hassle free. This would help in creating
very efficient applications as we can choose the best available hardware for our project and work
on them without having to worry about various tools.
8. References:
[1] www.bluetooth.com
The following text book has helped me a lot in preparation of this report, it is the main source for
most of the information I have gained on Bluetooth low energy.
[2] Bluetooth Low Energy, The developers hand book, Robin Heydon, Prentice Hall.
[3] http://www.bluetooth.com/pages/bluetooth-smart.aspx
[4] http://en.wikipedia.org/wiki/Bluetooth_low_energy
[5] https://www.abiresearch.com/
18
[6] http://www.ti.com/tool/CC256xqfnem
[7] Ting Zhang, Jiang Lu, Fei Hu, Member, IEEE and Qi Hao, Member, IEEE, Bluetooth Low
Energy for Wearable Sensor-based Healthcare Systems, 2014 Health Innovations and Point-of-
Care Technologies Conference, Seattle, Washington USA, October 8-10, 2014, IEEExplore.