How Does Bluetooth Technology Work

Bluetooth technology has become standard in just about every electronic device. From your smart phone to your computer to your car. A number of devices are available to pair to other devices and the list continues to grow.

Today you can get Bluetooth headsets and earbuds, Bluetooth speakers, a Bluetooth mouse and keyboard for your computer and a wearable watch or Fitbit that connects to your smart phone.

But that’s not all, you can find Bluetooth on bathroom scales, home blood pressure monitors, and other medical devices.

FitTrack Dara - Smart Body BMI Scale
Bluetooth Scale from FitTrack

Bluetooth is also available on a number of smart home devices like smart light bulbs. And you can even find Bluetooth toys for kids as young as 4 years old.

And with Bluetooth Mesh networking, the technology will be central to the development of the Internet of Things (IOT) connecting everything from our phones to the buildings and cities of the 21st Century.

Royalty-free multimedia photos free download | Pxfuel
Smart City

Since Bluetooth is so ubiquitous, it is easy to assume that most of us use at least one or two Bluetooth devices on an almost daily basis. It’s there when we need it, connection issues are infrequent, and we probably don’t give it another thought.

But what exactly is Bluetooth? And how come it has become one of the preferred connection methods for consumer electronics? And how exactly does it work?

If you’ve wondered about any of these questions you’ve come to the right place. Over the next several paragraphs I hope to explain what Bluetooth is, how it works, why it is so versatile and how it is only getting better.

What is Bluetooth?

Wireless Bluetooth Headphones and a phone | Shot on Canon EO… | Flickr
Bluetooth Headset and Smart Phone

Let’s start off by explaining exactly what Bluetooth is – in as simple as a way as I can. Bluetooth is a standardized protocol that allows information to be sent and received wirelessly via a 2.4 GHz ISM band. This is the same unlicensed frequency band (between 2400 to 2483.5 MHz) that Wi-Fi uses. But as we’ll see, there are distinct differences between the two.

It should be noted right up front., this is a very safe protocol for wireless communications, especially those that require a very short range (say around 100 meters or more likely less), and very low energy consumption.

Bluetooth works by pairing devices directly using a protocol that allows for multiple devices to send and receive data over a small network.

How Bluetooth Works

To understand how Bluetooth works, we need to understand three different aspects of the protocol:

  • Bluetooth Addresses and Naming Conventions
  • The Connection Process
  • Bluetooth Network Topology

Let’s look at these each in turn and see how they all work together to connect devices across a very small network in order to exchange data.

Bluetooth Addresses and Naming Conventions

Just like houses, every single Bluetooth device has a unique address that identified is. For Bluetooth devices we abbreviate this address as BD_ADDR.

All Bluetooth addresses are the same length and they are made-up of 48 bits (or 6 bytes).

Under default conditions, this address will be presented as a hexadecimal value of 12 digits, separated by colons (example – 00:22:FF:33:EE:66).

The first thing to highlight is that the first half of the address, 24 bits worth, is part of a unique identifier that has to do with the organization – or in this case the manufacturer of the Bluetooth device. This upper half that identifies the manufacturer is called the Organizationally Unique Identifier or OUI – and it is assigned by the Institute of Electrical and Electronics Engineers (IEEE).

The IEEE is the global MAC Registration Authority and they call out the assignment of MAC Addresses in their IEEE 802 Standard. They maintain a list of ALL Bluetooth manufacturers and their associated OUI on the OUI/MA-L List.

Helpful Link: To find out the manufacturer from the OUI without scrolling through the OUI list, you can do a Bluetooth MAC Address Lookup.

Let’s look in more detail at the Bluetooth Address Structure.

Bluetooth Address (BD_ADDR) Structure

The Bluetooth address (BD_ADDR) will be visible in most of the devices that have a wireless connection related to Bluetooth and the exact structure is shown in the diagram above – and it is made up of three distinct parts.

  • NAP – or Non-significant Address Part is made up of 16 bits and it is used for Frequency Hopping Synchronization for frames and packets.
  • UAP – or Upper Address Part is made up of the next 8 bits and is used to seed the various algorithms of the Bluetooth specification. Together these two parts (the NAP and UAP) make up the OUI which identifies the Bluetooth manufacturer.
  • LAP – or Lower Address Part is made up of the last 24 bits and is assigned by the manufacturer and is unique to each individual device. This is transmitted with each frame and packet as part of the packet header.

In addition to the address, each Bluetooth device can have a unique name assigned to them. Devices will usually have user-friendly names that will be given to them by the manufacturer and this will not be unique to each device but is usually the make and model of the Bluetooth device.

The user is usually presented this easy to understand name instead of the MAC address, and unless we have multiple versions of the same Bluetooth device (which if you’re like me you most certainly do), it should be easy to find the device you’re looking for.

On top of that, most master devices (phones, vehicles, computers) will allow you to assign a unique name to the slave device of your own creation (I talk about masters and slaves in the section below about networks).

For instance, I’m currently wearing a set of Modal Bluetooth Headphones (MD-HPBT01) that I have simply renamed “Orange Headphones” in my phone because I have three of this exact model of headphones floating around the house – and I need an easy way to identify the set that is already paired to my phone. (The headphones are a grayish color, but I put a small bit of orange tape on them to be able to identify them quickly from the rest – modern day problems call for modern day solutions).

The rules for naming these devices are less strict since the actual communication will use the BD_ADDR behind the scenes of your chosen name. One of the few restrictions is that Bluetooth names can only be a maximum of 248 bytes (i.e. 248 characters) in length.

Now that we understand how Bluetooth addresses and names are handled, let’s look at the actual connection and pairing process.

The Bluetooth Connection Process

Bluetooth Connection Process from the Bluetooth.com

Creating a Bluetooth connection between two devices is a multi-step process involving three progressive phases: Inquiry, Paging and Connection.

Phase 1 – Inquiry – When two Bluetooth devices know absolutely nothing about each other, one of them must run an inquiry to try to discover the other.

This happens by one device sending out the inquiry request, and any device listening for such a request will respond with its address, and possibly its name and other information.

It is important that the first device is set to discoverable mode. This allows other Bluetooth devices that are nearby to detect it and try to establish a connection. In the case of most slave devices (headphones, keyboards, etc.) – simply turning the device on will put in a discoverable state.

Phase 2 – Paging (Connecting) — When two devices find each other then they move on the paging step. Paging is the process of forming a connection between two Bluetooth devices. Before this connection can be initiated, each device needs to know the address of the other (found in the inquiry process).

Phase 3 – Connection – After a device has completed the paging process, it enters the connection state. This is established by the passing of passkeys. This passkey exchange is easily handled by today’s modern devices and usually the user is only prompted to indicate which device they’d like to pair with. Behind the scenes the two devices will exchange passkeys and if they match then a connection is established.

For devices like computers and some smart phones, they may always be in a state of inquiry as they look for new Bluetooth devices to connect to. If they find one, they will prompt you to accept the pairing. This provides additional control and security over the process.

Now usually, all of the above steps happen very quickly and very easily with little intervention by the user. One of the main appeals about the Bluetooth protocol is the ease of connection between two devices.

Instructions might vary slightly from device to device, but the main three steps listed above will all be followed: Both devices need to be available to be paired (discoverable), an initiation process and passkeys are exchanged – and then the connection is established. For us users, this all happens in a matter of seconds and mostly at the push of a button.

When there are problems with connection issues between Bluetooth devices, one of the most common issues is the that they do not have the required profiles available. We’ll talk more about profiles later in this post.

Bluetooth Modes

While connected, a device can either be actively participating or it can be put into a number of low power modes a detailed below.

Active Mode – the device is actively transmitting or receiving data.

Sniff Mode – a power-saving mode, where the device is less active but continues to listen for transmission at a set interval (e.g. every 100ms).

Hold Mode – another 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 device to hold. We’ll learn more about the master and slave connection in the next section.

Park Mode — 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.

Bluetooth Bonding and Long Term Key Generation

Once two Bluetooth devices have connected, they can be bonded together.

This is another behind-the-scenes terminology, and most people use pairing and bonding interchangeably. But where as pairing is the exchanging of Short Term Keys (STK) for an immediate connection. Bonding is the exchange of Long Term Keys (LTK) AFTER an initial pairing has occurred and then storing those LTKs for use later, in Phase 2 of the diagram above, the next time the two devices establish a connection.

This bonding process came about because of the Bluetooth Low Energy (BLE or LE) specification. We’ll learn more about BLE later in this post.

Bonding offers the advantage of having pairing connections become automatic once both devices are turned on and in close proximity. It is what allows your phone to automatically connect with your headphones when both are powered up – or why your phone inside the house might connect to your wife’s vehicle when she turns the car on to go the store and thus interrupting your work conference call.

Bonds are created when devices pair up, they share their addresses, names, and profiles, and then store them in memory. Then they also share a common secret key, the LTK, which allows them to bond whenever they’re together in the future. This allows them to exchange encrypted information in the future without having to share the basic address and connection info all over again.

The Bluetooth Network: Masters, Slaves and Piconets

Bluetooth networks are called Piconets and they all start with a master and slave connection. The master controls when, where and how devices will exchange data. With some devices, the master-slave relationship can also switch. And a master device in one piconet can be a slave in another one. Also of note: one master can be connected to up to seven different slave devices. And a slave may be connected to two masters, but will only respond to one master at a time. This is common if you have a favorite pair of headphones and you have them paired with both your personal phone and your work phone via Bluetooth multipoint. The headphones will go into a low-energy mode and then wake-up and respond when it gets the signal from whatever Master needs it’s attention.

When two devices are connected together it is called a Single-Slave Piconet. When a Master is connected to more than one device, it is called a Mult-Slave Piconet. But really, those names are only for the truly technical. For our purposes it is enough to call them simply Piconets. And they can have a variety of configurations and topologies just built on this master-slave relationship as shown in the diagram below.

File:Bluetooth network topology.png - Wikimedia Commons
Bluetooth Network Topology Showing Multiple Piconets and Master-Slave Connections from WikiCommons.

A piconet network is an ad-hoc network that connects Bluetooth devices. The piconet will consist of two or more devices occupying the same channel, they are even synchronized through a common clock and a sequence in the jump.

This will allow the master device to interface with up to 7 active slave devices. But because a slave of one device can be master of another device, configurations of piconets can have up to a total of 255 slave devices, being either inactive or parked, bearing in mind that the master device can be active at any time, however, an active station must be parked first.

A group of devices regardless of their type can be connected via Bluetooth technology on an ad-hoc basis. With this, a piconet is created as soon as two devices connected. Bluetooth will always designate one of these Bluetooth devices as the main control unit or master unit – and the the other device(s) will be designated the slave(s).

Once this happens, data can be sent to any of those slave devices, along with their request in the same way as it was sent to the first slave device.

It must be taken into account that the slaves will only be able to transmit and receive this data from their master, so it will not be possible to talk with other slaves of the piconet directly. This coordination allows all of the piconet to function with a very low probability of disruption by one device on another. To make this happen, each new Bluetooth device added to the piconet, will be assigned a specific time within the transmission period to operate, thus, they will not collide or overlap with other possible units. that are working within the same piconet.

Note: for the non-technical, this time allotment given to each slave device is at the micro-second level and happens faster than you could ever possibly hope to observe or notice. Therefore you can feel confident that you can connect multiple devices to your phone (up to 7) without any fear of interference or connection issues caused by one device on another.

One last note: The scope of the specific piconet will vary depending on the type of Bluetooth device that we have at hand. And the range of the Piconet varies depending on the class of the Bluetooth device. Data transfer rates across a Piconet range between 200-210 kilobits per second.

Bluetooth Versions

Bluetooth has been constantly evolving since it was conceived in 1994. The most recent update of Bluetooth, Bluetooth v5.0, is just beginning to gain traction in the consumer electronics industry, but some of the previous versions are still widely used. Here’s a rundown of the commonly encountered Bluetooth versions:

Bluetooth 1.2

The v1.x releases laid the groundwork for the protocols and specifications future versions would build upon. Bluetooth v1.2 was the latest and most stable 1.x version.

These modules are rather limited compared to later versions. They support data rates of up to 1 Mbps (more like 0.7 Mbps in practice) and 10 meter maximum range.

Bluetooth 2.1 + EDR

The 2.x versions of Bluetooth introduced enhanced data rate (EDR), which increased the data rate potential up to 3 Mbps (closer to 2.1 Mbps in practice). Bluetooth v2.1, released in 2007, introduced secure simple pairing (SSP), which overhauled the pairing process.

Bluetooth v2.1 modules are still very common. For low-speed microcontrollers, where 2 Mbps is still fast, v2.1 gives them just about everything they could need. The RN-42 Bluetooth module, for example, remains popular in products like the Bluetooth Mate and BlueSMiRF HID.

Bluetooth 3.0 + HS

You thought 3 Mbps was fast? Multiply that by eight and you have Bluetooth v3.0’s optimum speed — 24 Mbps. That speed can be a little deceiving though, because the data is actually transmitted over a WiFi (802.11) connection. Bluetooth is only used to establish and manage a connection.

It can be tricky to nail down the maximum data rate of a v3.0 device. Some devices can be “Bluetooth v3.0+HS”, and others might be labeled “Bluetooth v3.0”. Only those devices with the “+HS” suffix are capable of routing data through WiFi and achieving that 24 Mbps speed. “Bluetooth v3.0” devices are still limited to a maximum of 3 Mbps, but they do support other features introduced by the 3.0 standard like better power control and a streaming mode.

Bluetooth v4.0 and Bluetooth Low Energy (BLE)

Bluetooth 4.0 split the Bluetooth specification into three categories: classic, high-speed, and low-energy. Classic and high speed call back to Bluetooth versions v2.1+EDR and v3.0+HS respectively. The real standout of Bluetooth v4.0 is Bluetooth low energy (BLE).

BLE is a massive overhaul of the Bluetooth specifications, aimed at very low power applications. It sacrifices range (50m instead of 100m) and data throughput (0.27 Mbps instead of 0.7-2.1 Mbps) for a significant savings in power consumption. BLE is aimed at peripheral devices which operate on batteries, and don’t require high data rates, or constant data transmission. Smart watches and, now thanks to Bluetooth 5.0, headphones, are a good example of this application.

Bluetooth 5.0

Bluetooth 5.0 is the latest version of the Bluetooth wireless communication standard. It’s commonly used for wireless headphones and other audio hardware, as well as wireless keyboards, mice, and game controllers. Bluetooth 5.0 is also used for communication between various smart home and Internet of Things (IoT) devices.

A new version of the Bluetooth standard means various improvements, but only when used with compatible peripherals. In other words, you won’t see any immediate benefit from upgrading to a phone with Bluetooth 5.0 if all your Bluetooth accessories were designed for an older version of Bluetooth. Bluetooth is backwards compatible, however, so you can continue using your existing Bluetooth 4.2 and older devices with a Bluetooth 5.0 phone. And, when you buy new Bluetooth 5.0-enabled peripherals, they’ll work better thanks to your Bluetooth 5.0 phone.

Importantly, most of the improvements being made to Bluetooth 5.0 are to the Bluetooth Low Energy (BLE) specification, which was introduced back with Bluetooth 4.0, and not to the classic Bluetooth radio that uses more power. Bluetooth Low Energy is designed to reduce the energy usage of Bluetooth peripherals. As mentioned, it was originally used for wearables, beacons, and other low-power devices, but had some serious restrictions.

For example, wireless headphones couldn’t communicate over Bluetooth Low Energy, so they had to use the more power-hungry Bluetooth classic standard instead.

Bluetooth 5.0 also enables a cool new feature that allows you to play audio on two connected devices at the same time. In other words, you could have two pairs of wireless headphones connected to your phone, and then stream audio to both of them at once, all via standard Bluetooth. Or you could play audio on two different speakers in different rooms. You could even stream two different audio sources to two different audio devices at the same time, so two people could be listening to two different pieces of music, but streaming from the same phone.

Bluetooth 5.0’s primary benefits are improved speed and greater range. In other words, it’s faster and can operate over greater distances than older versions of Bluetooth.

The official Bluetooth marketing material from the Bluetooth standard organization advertises that Bluetooth 5.0 has four times the range, two times the speed, and eight times the broadcasting message capacity of older versions of Bluetooth. Again, these improvements apply to Bluetooth Low Energy, ensuring devices can take advantage of them while saving power.

With Bluetooth 5.0, devices can use data transfer speeds of up to 2 Mbps, which is double what Bluetooth 4.2 supports. Devices can also communicate over distances of up to 800 feet (or 240 meters), which is four times the 200 feet (or 60 meters) allowed by Bluetooth 4.2. However, walls and other obstacles will weaken the signal, as they do with Wi-Fi.

Technically, devices can actually choose between more speed or a longer range. That “two times the speed” benefit is helpful when operating at short range and sending data back and forth. The increased range would be optimal for Bluetooth beacons and other devices that only need to send a small amount of data or have a use-case where they send the data slowly, but want to communicate at greater distances. Both are low energy implementations allowed within the Bluetooth protocol.

This flexibility between speed and distance means devices can choose which makes the most sense. For example, wireless headphones could use the increased speed for high bitrate streaming audio, while wireless sensors and smarthome devices that just need to report their status information could choose the increased distance so they can communicate at longer distances. And, because they can use Bluetooth Low Energy and still get these benefits, they can operate on battery power for much longer than they would with the more power-hungry classic Bluetooth standard.

If you’re interested in the technical details, you can view the official Bluetooth 5.0 specifications online

Bluetooth Profiles

Within the Bluetooth standard there are a number of Bluetooth profiles that more clearly define how data is transmitted for different uses. For instance, a Bluetooth headset with the “Hands-free” Profile (HSP) will operate differently than a Bluetooth came controller that would be following the Human Interface Device (HID) profile.

Let’s take a look at a few of the more commonly-encountered Bluetooth profiles in alphabetical order…

Advanced Audio Distribution Profile (A2DP)

Advanced audio distribution profile (A2DP) defines how audio can be transmitted from one Bluetooth device to another. Where HFP and HSP send audio to and from both devices, A2DP is a one-way street, but the audio quality has the potential to be much higher. A2DP is well-suited to wireless audio transmissions between an MP3 player and a Bluetooth-enabled stereo.

Most A2DP modules support a limited set of audio codecs. In the least they’ll suport SBC (subband codec), they may also support MPEG-1, MPEG-2, AAC, and ATRAC.

A/V Remote Control Profile (AVRCP)

The audio/video remote control profile (AVRCP) allows for remote controlling of a Bluetooth device. It’s usually implemented alongside A2DP to allow the remote speaker to tell the audio-sending device to fast-forward, rewind, etc.

Hands-Free Profile (HFP) and Headset Profile (HSP)

Bluetooth earpieces use the headset profile (HSP) or hands-free profile (HFP).

HFP is used in the hands-free audio systems built into cars. It implements a few features on top of those in HSP to allow for common phone interactions (accepting/rejecting calls, hanging up, etc.) to occur while the phone remains in your pocket.

Human Interface Device (HID)

HID is the go-to profile for Bluetooth-enabled user-input devices like mice, keyboards, and joysticks. It’s also used for a lot of modern video game controllers, like WiiMotes or PS3 controllers.

Bluetooth’s HID profile is actually a riff on the HID profile already defined for human input USB devices. Just as SPP serves as a replacement for RS-232 cables, HID aims to replace USB cables (a much taller task!).

Wireless Protocol Comparison

Bluetooth is far from the only wireless protocol out there. You might be reading this tutorial over a WiFi network. Or maybe you’ve even played with ZigBees or XBees. So what makes Bluetooth different from the rest of the wireless data transmission protocols out there?

Let’s compare and contrast. We’ll include BLE as a separate entity from Classic Bluetooth.

Bluetooth isn’t the best choice for every wireless job out there, but it does excel at short-range cable-replacement-type applications. It also boasts a typically more convenient connection process than its competitors (ZigBee specifically).

ZigBee is often a good choice for monitoring networks — like home automation projects. These networks might have dozens of wireless nodes, which are only sparsely active and never have to send a lot of data.

BLE combines the convenience of classic Bluetooth, and adds significantly lower power consumption. In this way it can compete with Zigbee for battery life. BLE can’t compete with ZigBee in terms of network size, but for single device-to-device connectivity it’s very comparable.

WiFi is probably the most familiar of these four wireless protocols. We’re all pretty familiar with what purpose it’s best for: Internet. It’s fast and flexbile, but also requires a lot of power. For broadband Internet access it blows the other protocols out of the water.

You can learn more about the differences and similarities of Bluetooth and Wifi by reading our article: What is the difference between Wi-fi and Bluetooth?

Conclusion

For most personal devices, you’ll find Bluetooth is more than up to the task for the job. With the newer functionality of Bluetooth 5.0 along with improvements in Bluetooth Low Energy (BLE) it is clear that Bluetooth technology is going to be around a long time to help us connect and pair up our computers, our phones, our vehicles, our homes and our personal devices for a long time to come.

Photo of author

Bill David