Continuing our study on wireless communication protocols in this free Wireless and Mobile Communication course, in this post, we will study Bluetooth. Let’s study the Bluetooth Standard from a beginner’s perspective.
What is Bluetooth?
- Bluetooth is a wireless technology standard used for exchanging data between devices over short distances.
- Bluetooth uses short-wavelength ultra-high-frequency radio waves (at 2.4 GHz), invented by Ericsson in 1994 to acheive this.
- Though Bluetooth was standardized by the IEEE, the responsibility of maintaining Bluetooth as a standard resides with the Bluetooth Special Interest Group (SIG).
- It oversees the development of the specification, manages the qualification program, and protects the trademarks.
- In 2019, with close to 6 billion Bluetooth enabled units having been shipped, Bluetooth is by far the most commonly found and used standard for short-distance communication.
Why is Bluetooth used in modern devices and IoT?
- Bluetooth is easily the most favoured amongst the tech-savvy when it comes to developing products that require it to communicate with another device.
- The main reason for this is that Bluetooth is quite easy to use, implement and is also pretty cost-effective.
- The fact that it requires less energy to transmit data also adds up to the cost-effectiveness and hence is an ideal choice for IoT projects that are expected to work on low-power.
- Another reason why Bluetooth is the go-to standard for short-range communication is the speed of transmission, which can reach up to 2 Mbps easily. This makes it possible for applications such as wireless displays streaming video files in high definition or HQ audio being streamed to a wireless headset.
Bluetooth Networks and their advantages
- Bluetooth is a WPAN (Wireless Personal Area Network) standard that enables devices within a range of 10 meters to communicate with each other.
- The networks that are formed by multiple devices connected by Bluetooth are divided into two:
- A piconet is a network that consists of up to eight devices connected together.
- One of the devices is a master and the rest are all slaves.
- It covers only a smaller area.
- An example of piconets could be a mobile phone connected to a pair of wireless headphones and a smartwatch. Here, the mobile phone is the master while the pair of headphones and the smartwatch are slaves.
- A scatternet consists of two or more piconets.
- They are formed when one of the devices in a piconet (either the master or a slave) decides to become a slave to the master of another piconet.
- It can cover a larger area when compared to piconets thanks to the larger number of participants.
- Implementations of scatternets are scarce due to some technical limitations of Bluetooth.
Process of connecting two devices via Bluetooth
Creating a connection between two devices via Bluetooth is a multi-step process that takes place over three stages, which are given below.
This is done when the two devices to be connected have no clue about the details of the other. Here, one of the devices sends out an inquiry request to discover the other device. The device listening for such a request responds with its details like name and address upon receipt of the request message.
Paging is the process of the two devices connecting with each other, which can be done only if each device knows the address of the other which is discovered in the inquiry stage.
As soon as paging is done, the devices enter the connection mode. Once they are connected, they get the ability to communicate with each other. While connected, the devices could be in one of four modes possible:
- Active Mode – This is the regular connected mode, where the devices actively share data between themselves.
- Sniff Mode – This is a power-saving mode, where the devices sleep and listen for transmissions only once every 100 ms.
- Hold Mode – Hold mode is a temporary, power-saving mode where a device sleeps for a defined period and then returns back to active mode when that interval has passed. The master can command a slave to hold.
- Park Mode – Park is the deepest of sleep modes. A master can command a slave to park, and that slave will become inactive until the master tells it to wake back up.
- Pairing is the process of creating bonds between two connected devices.
- Bonded devices automatically establish a connection whenever they’re close enough.
- Mobile phone users who use Bluetooth headphones or transfer files over Bluetooth would have come across pairing. You need to pair devices only once, after which they automatically get connected the next time they are near each other.
- When devices pair up, they share their addresses, names, and profiles, and store them in memory. They also share a common secret key, which allows them to bond whenever they are in range in the future.
- Pairing usually happens with an authentication process where the user validates the process.
- The user validation could be as simple as just clicking a button, or could be as complex as manually entering a 16-character alphanumeric string, but is generally a 4-digit or 6-digit PIN that is to be entered.
Bluetooth profiles are additional protocols that build upon the basic Bluetooth standard to more clearly define how Bluetooth is being used. Hence, the Bluetooth profiles that a device supports define its area/scope of application. For two Bluetooth devices to be compatible, they must support the same profiles.
The five most commonly used profiles are:
Serial Port Profile (SPP)
- SPP is one of the most fundamental profiles of Bluetooth communication, and as the name suggests, behaves like a serial connection.
- Here, data is sent out in bursts sequentially.
- Using SPP, devices communicate as if there are separate transmission and reception channels. An example of SPP being used is in the communication between two Arduino Boards, facilitated by Bluetooth modules.
Human Interface Device (HID)
- The HID profile is for Bluetooth-enabled user-input devices like mice, keyboards, and joysticks.
- The Bluetooth HID works similar to the HID profile created for USB enabled user input devices, and its purpose is to replace the need for USB cables.
Hands-Free Profile (HFP) and Headset Profile (HSP)
- The HSP and HFP are used in Bluetooth enabled earphones or headphones.
- HFP is also used in the hands-free audio systems built into cars.
- They implement a few more features that enable the user to end or hold the call, or tune the volume without needing to touch the mobile phone.
Advanced Audio Distribution Profile (A2DP)
- The A2DP defines how audio can be transmitted and received between two Bluetooth devices.
- It differs from the HSP and HFP by being able to transmit audio in only one direction, but with much higher quality.
- An example of A2DP being implemented is in the case of a Bluetooth speaker connected to an MP3 player.
A/V Remote Control Profile (AVRCP)
- The AVRCP allows for the remote control of a Bluetooth device.
- It is generally implemented alongside A2DP to allow the remote speaker to tell the audio-sending device to fast-forward, rewind, etc.
- An example of AVRCP being used is a Bluetooth remote controlling a Bluetooth speaker.
Bluetooth Specifications and comparison of Bluetooth versions
|Bluetooth Classic||Bluetooth v4.x||Bluetooth v5.0||Bluetooth v5.2|
|Data rates||1 Mbps||1 Mbps||2 Mbps||2 Mbps|
|Maximum Range||10 m||30 m||200 m||200 m|
|Power Consumption||Very High||High||Low||Very Low|
|Throughput||700 kbps||300 kbps||1400 kbps||1400 kbps|
|Message Capacity||31 bytes||31 bytes||255 bytes||255 bytes|
- Bluetooth v5.2 is its lastest version, unveiled at CES 2020 in January 2020 by the Bluetooth SIG.
- Apart from features enhancing Bluetooth v5’s major objective of making it friendly for Internet of Things (IoT) applications, version 5.2 also came with a feature named Isochronous Channels (ISOC).
- ISOC lays the foundation for the implementation of LE (Low Energy) Audio in Bluetooth Low Energy (BLE) devices, supporting Bluetooth 5.2 or later.
- LE Audio allows for multiple wireless headphones to connect to a single source, or for a single pair of wireless headphones to connect to multiple sources.
- LE Audio also adds support for hearing aids.
- LE Audio runs on Bluetooth Low Energy Radio, which lowers battery consumption.
- ISOC lays the foundation for the implementation of LE (Low Energy) Audio in Bluetooth Low Energy (BLE) devices, supporting Bluetooth 5.2 or later.
Bluetooth Low Energy
- Bluetooth Low Energy (BLE), formerly known as Bluetooth Smart, was developed by the Bluetooth SIG.
- BLE is intended to provide considerably reduced power consumption while still maintaining a similar communication range as Bluetooth Classic.
- This is done by giving up on data transfer rates.
- Most operating systems such as iOS and Android support BLE natively.
- BLE was further made available to the public by incorporating it with Bluetooth v4.0.
- Apart from Bluetooth enabled devices (that support versions above 4), some devices that can interact with BLE devices are motes and beacons.
- BLE motes are system-on-chip based devices for Bluetooth Low Energy-based applications.
- A mote is a wireless transceiver that is typically combined with a sensor of some type to create a remote sensor.
- Some examples of BLE motes are the NRF5xx series and the TI CC26xx series, which are mainly used in IoT applications.
- BLE beacons are hardware transmitters that broadcast their identifier (ID) to nearby portable electronic devices, and these identifiers are picked up by a compatible app or operating system.
- This enables smartphones, tablets, and other devices to perform actions when in close proximity to a beacon.
- An example of this is automated messages to your smartphone in a retail store.
- The main difference between motes and beacons is that beacons only transmit, while motes can also be used as receivers.
- BLE beacons come in all shapes and sizes, ranging from a small coin cell form factor to a USB stick.
Bluetooth protocol stack
The Bluetooth standard has a protocol stack of its own, just like the OSI and TCP/IP model for networks. But unlike the OSI model, Bluetooth doesn’t require its devices to use all the layers of the protocol stack. The following image shows all the protocols present in the stack.
The Core Protocols are those that are ad hoc protocols essential for the functioning of a large number of Bluetooth’s features.
- Bluetooth Radio
- Lays down the physical structure and specifications for transmission of radio waves.
- Similar to the physical layer protocols in the OSI and TCP/IP models.
- Defines the air interface, frequency bands, frequency hopping specifications and modulation techniques.
- The baseband layer is responsible for searching other devices.
- It defines the addressing scheme, packet frame format, timing, and power control algorithms, and is also responsible for assigning master/ slave roles.
- Link Management Protocol (LMP)
- Establishes and manages links that are already established.
- Is also responsible for authentication and encryption of the link.
- Logical Link Control and Adaptation Protocol (L2CAP)
- Is the heart of the protocol stack and allows the communication between the upper and lower layers.
- It modifies the packages from the upper layer as required by the lower layer and vice versa.
- Service Discovery Protocol (SDP)
- Allows for the discovery of services on the connected Bluetooth device after link is established.
Cable Replacement Protocols
- Radio Frequency Communications (RFComm) Protocol
- It provides a virtual serial port for applications that require it.
- Eliminated the need for cables.
These protocols are adopted from other models, such as the TCP/IP model and the OSI model.
- Point-to-Point Protocol (PPP)
- Facilitates communication between two directly connected computers (Bluetooth devices in this case).
- Wireless Application Protocol (WAP)
- Standardizes the way how wireless Bluetooth devices can become a part of a network.
The other three adopted protocols are IP and TCP/UDP, which are used to carry packets through a network.
These can be used in sending instructions to a Bluetooth module and to change the device’s settings like baud rate and name. You can usually find information on how to configure setting using AT commands with your Bluetooth device’s datasheet.
Comparison of Bluetooth with other wireless communication protocols
|IEEE specification||802.15.1||802.15.4||802.11 a/b/g|
|Frequency Band||2.4 GHz||868/916 MHz, 2.4 GHz||2.4 GHz, 5 GHz|
|Data rates||1 Mbps||250 kbps||54 Mbps|
|Range||10 m||10 – 100 m||100 m|
|Number of RF channels||79||16||14|
|Channel bandwidth||1 MHz||0.3/0.6 MHz; 2 MHz||22 MHz|
|Modulation Type||GFSK||BPSK + ASK; O-QPPSK||
BPSK, QPSK, COFDM, CCK, M-QAM
|Extension of Basic Cell||Scatternet||Cluster tree, Mesh||ESS|
|Authentication||Shared Secret||CBC-MAC (CCM)||WPA2 (802.11)|
Advantages of Bluetooth
- The most important and obvious advantage of Bluetooth is that it is wireless.
- Implementing Bluetooth is a cheap process, and cuts down costs significantly.
- Bluetooth is automatic and generally doesn’t require one to push buttons or manually create connections (when paired).
- Bluetooth is standardized and hence can be used across a wide range of devices.
- Other wireless devices rarely interfere with Bluetooth devices.
- As Bluetooth employs low power signals, it is an energy-efficient technology.
- Allows for the sharing of both data and voice simultaneously.
- Bluetooth is upgradable to new versions and newer versions are backward compatible with the older ones.
Disadvantages of Bluetooth
- Data rates of Bluetooth generally is around 2 Mbps, while similar technologies can offer data rates of up to 4 Mbps.
- The range of operation is generally only within 10 meters.
- Security implemented in Bluetooth is quite elementary, which shall be discussed in the next section.
Security issues of Bluetooth
There are a number of ways in which Bluetooth security can be penetrated because there is little security in place. Some of the major techniques by which the security provided by Bluetooth can be bypassed are:
- Bluejacking – Bluejacking is the sending of unsolicited messages over Bluetooth to Bluetooth-enabled devices such as mobile phones. Bluejacking is generally harmless, as the user does not what is happening and assumes that the phone is malfunctioning.
- Bluesnarfing – Similar to Bluejacking but being more harmful, Bluesnarfing is the unauthorized access of information from a wireless device through a Bluetooth connection. This allows the person to download and view the contents of the victim’s phone such as his contacts list or calendar.
- Bluebugging – Bluebugging takes it to a whole new level, by allowing the hacker to access and remotely control all features of the victim’s phone.
- Car whispering – This involves the use of software that allows hackers to transmit and receive audio to and from a Bluetooth enabled car stereo system.
This post was an elementary introduction to the various aspects of the Bluetooth wireless standard. The technical aspects and implementations will be discussed in the upcoming sections of this Wireless and Mobile Communication course. Stay tuned!