FREE “INTRO TO BLE” BOOK [HARDCOVER] →

Coded PHY: Bluetooth’s Long-Range Feature

Bluetooth Low Energy was designed to considerably reduce power consumption and cost while maintaining communication ranges similar to Bluetooth Classic (50-100m max). However, that is no longer the case. With the new Bluetooth long-range mode, you can now achieve ranges of over 1 kilometer using BLE!

This is useful for extending the range of a Bluetooth connection or discovering advertisements, but it also helps achieve more robust communication in noisy RF environments and areas with many obstacles.

Now, you may be interested in learning more about long-range mode and implementing it into your own application, but you probably don’t want to go through the 3,000+ pages of the Bluetooth Specification document to figure out the steps and configurations necessary for this. Well, you’ve come to the right place!

In this post, we’ll go over:

  • What is long-range mode (Coded PHY)?
  • Use cases for long-range mode
  • Coded PHY vs. 1M PHY vs. 2M PHY
  • Coded PHY packet format
  • Two methods for utilizing Coded PHY

Once you finish reading this blog post, you will understand the overall concepts and the steps required to implement ranges of over 1 km on your BLE Peripheral and Central devices.

Check out the following YouTube video for a very cool demo involving a drone for a real-life test of Bluetooth range and an exclusive Silicon Labs free dev kit giveaway announcement!

What is Bluetooth long-range mode?

Bluetooth long-range (also known as Coded PHY) is a new mode introduced in Bluetooth Version 5.0 to extend the range of Bluetooth devices from 30-100 feet to ranges of 1 kilometer and beyond. 

With this powerful range extension, you’ll see some tradeoffs in radio-on time, power consumption, and duty cycle for scheduling and coexistence over the air. As you might expect, this new mode requires some hardware changes. Because support for this new mode is optional, not all Bluetooth LE chipsets and modules (even those qualified for Bluetooth 5.0 and later) will support this new mode. Make sure you choose carefully.

Use cases for long-range mode

Long-range mode is not only useful for extending the range of Bluetooth devices. It’s also helpful to achieve a more reliable connection in signal-congested environments or environments with many obstacles.

Examples of applications include:

  • Remote control and remote identification system for drones [1]
  • Monitoring sensors deployed on large-area farms
  • Making connections more robust in areas with many obstacles, such as in industrial environments

💡Insider Tip: Access a complete course on implementing Bluetooth long-range in the Bluetooth Developer Academy.

Coded PHY (aka Bluetooth long-range) vs. 1M PHY vs. 2M PHY

Let’s step back for a minute. If you’ve been working with Bluetooth Low Energy for a while, you’ll know that 1M PHY is the original PHY introduced when Bluetooth Low Energy launched with Version 4.0 of the Bluetooth Core Specification. This PHY allows you to achieve a raw data rate of 1 Megasymbol per second. 

With Version 5.0 of the Bluetooth specification came two new PHYs: 2M PHY and Coded PHY. So, today (as of v5.4), we have three PHYs available:

  1. 1M PHY (1 Megasymbols per second) – the original PHY supported by all BLE devices
  2. 2M PHY (2 Megasymbols per second) – introduced in Bluetooth 5.0, achieves approximately double the speed of 1M PHY
  3. Coded PHY (1 Megasymbols per second) – introduced in Bluetooth 5.0, achieves ranges up to four times the range of 1M PHY. This is what we call Bluetooth long-range mode
Summary of BLE PHYs, modulation schemes, and coding schemes
Source: Bluetooth Core Specification document

For long-range Bluetooth, we are most concerned with the third PHY we mentioned above – the Coded PHY. This PHY allows us to reach long ranges with BLE. In it, the raw data is still transmitted at the rate of 1Mbps, but we’re transmitting multiple symbols for each of the bits of data that come from the user, the link layer, header, and packet. Effectively, this means that Coded PHY uses multiple symbols to represent each transmitted bit.

There are two configurations for Coded PHY:

  • S2, where each data bit is represented by two symbols. Data rate = 500 kbps (1/2 of 1M PHY data rate)
  • S8, where each data bit is represented by eight symbols. Data rate = 125 kbps (1/8 of 1M PHY data rate)

One thing to note is that not all the fields within a packet are coded with the same configuration, as some will always be configured to use the S=8 configuration. Power consumption will vary significantly based on the configuration selected due to its effect on radio-on time.

Below, we can see a comparison of the radio on-time between the 1M and Coded PHYs:

Bluetooth long range radio on-time
Source: Bluetooth Core Specification document

Coded PHY packet format

Coded PHY BLE packets have a different format than the standard 1M or 2M PHYs. 

https://lh3.googleusercontent.com/6344TgsPzoRodMmX5hTsoAIsoEtPSiNzFjb8X2LIKgQJVTRzg8c2gQZ0GR4juIDJ4dRLoftL2aNNV3w53MgbLnyonLOu_JMPemGGX2wP-ckBRHk2Lt9t8IzgWBYqCytdPauywlMr
Source: Bluetooth Core Specification document

A few important things to note about the Coded PHY format:

  • The Preamble is never coded, which allows the packet to be detected in any mode (Coded PHY, 1M PHY, or 2M PHY) before determining which mode was used for the remaining packet’s data.
  • FEC block 1 is always coded with S=8,
  • FEC block 2 is coded with S=2 or S=8 (depending on the configuration).
  • The CI (Coding Indicator) is used to indicate which coding scheme is used in FEC block 2 (S=2 or S=8).
  • The timing values shown indicate how long it takes to transmit the specific field within the packet.

How to utilize Bluetooth long-range (Coded PHY)?

Now that we understand what the Coded PHY packet format looks like let’s talk about how to actually utilize it in our applications. Coded PHY can be utilized in three ways:

  • Advertising-only State: Use Coded PHY for advertising and for discovery by a device that supports Coded PHY and receiving data included in the advertising packets (great for one-to-many communication)
  • Connection State: Switch to using Coded PHY during an existing (1M or 2M) connection via the PHY update procedure (
  • A Combination of the Two States: If you’re looking to utilize communication that utilizes long distances during the advertising and connection states

Advertising-only state

For two Bluetooth LE devices to successfully connect over long-range mode, one device (the Peripheral) will need to advertise on the Coded PHY while the other (the Central) will need to be configured to look for advertisements on the Coded PHY.

In this mode, Extended Advertisements are used. The way this works is by advertising on the Primary Advertisement channels, where these Primary Channel Advertisements point to Secondary Channel Advertisements that hold the advertising information needed to establish a connection.

Understanding the appropriate Advertising types used in the Coded PHY mode is crucial for developing BLE applications that can operate using long-range mode. Without the correct setup, a BLE Central device will not be able to discover and/or connect to a BLE Peripheral over the Coded PHY.

Let’s look at the different Advertising types used in Coded PHY:

https://lh3.googleusercontent.com/uYwDT_i1QDg1dVQeacwihQftmxWhn9F39aoOmILyG14YLNuGFwZC80tzVvA7QAUb0FMG2WQrtBvq-FYaM4HngfQ4IkJ9qO5ZoOfFfkM4oJewP1r3jGzDmoADiMAvSZKBYu9hDRun
Source: Bluetooth Core Specification document

Notice that the only Primary Advertising type allowed in Coded PHY is of type ADV_EXT_IND. The rest of the Advertising types allowed in Coded PHY are Secondary Advertising packets (AUX_SCAN_REQ, AUX_CONNECT_REQ, AUX_ADV_IND, AUX_SCAN_RSP, AUX_SYNC_IND, AUX_CHAIN_IND, and AUX_CONNECT_RSP).

This means that connection requests on Coded PHY do not occur on the Primary Advertisement channels, rather, they occur on the Secondary Advertisement channels. The PDU types used in this case are the AUX_CONNECT_REQ (the connection request packet) and AUX_CONNECT_RSP (the response to the connection request) types.

During a Connection (PHY update procedure)

Bluetooth provides the flexibility to switch to using different PHYs during a connection. Different PHYs can be used in each direction as well between the two connected devices. For example, this procedure can be used to switch to using the Coded PHY after two devices have connected using the standard 1M PHY, allowing the two devices to increase the range at which they maintain the connection.

The PHY Update Procedure can be initiated by either the Central or the Peripheral after the connection is established. 

When the Central initiates the PHY update procedure:

  • Central sends LL_PHY_REQ PDU
  • Peripheral responds with LL_PHY_RSP PDU
  • Central then responds to this with LL_PHY_IND PDU

When the Peripheral initiates the PHY update procedure:

  • Peripheral sends LL_PHY_REQ PDU
  • Central then responds to this with LL_PHY_IND PDU
peripheral-initiated PHY update procedure to utilize Bluetooth long range
Source: Bluetooth version 5.1 Core Specification document

The PDU includes both the preferred transmit- and receive-PHYs.

Coded PHY Peripheral implementation

The steps for implementing Coded PHY (long-range Bluetooth) will vary based on the BLE stack and development vendor, platform, or kit you use. However, in general, the implementation of Coded PHY on the Peripheral side involves the following steps:

  1. Enabling Extended Advertisements in the BLE stack (Host + Controller)
  2. Setting the Primary PHY to use the Coded PHY
  3. Setting the Secondary PHY to use the Coded PHY
  4. Setting the advertisement data

Coded PHY support on smartphones

The reality is that support for Coded PHY on smartphones varies significantly from device to device. Typically, you will see devices providing one of the following levels of support:

  • No Coded PHY support
  • Support for Coded PHY during a connection but not during advertising 
  • Support for advertising extensions and scanning but no support for Coded PHY on the advertising channels
  • Full Coded PHY support, including both Coded PHY advertising extensions and Coded PHY connections 

I’ve found that Samsung and OnePlus phones offer the best support for development and testing.

Silicon Labs FREE Giveaway

Check out the exclusive Silicon Labs Giveaway below (limited time and while supplies last!):

Summary

In this post, we went over the steps you will need to achieve ranges of over 1 kilometer for communication between two BLE devices.

We covered:

  • Basics and use cases of long-range Bluetooth (Coded PHY)
  • The technical details of Coded PHY, including the two different configurations available (S=2 and S=8)
  • The details of Coded PHY packets
  • The steps required to implement Coded PHY for BLE Central and BLE Peripheral devices

💡Still have more Coded PHY questions? Enroll in the Bluetooth Developer Academy today to get exclusive access to the Technical Guide to BLE Long-range (Coded PHY) video course.

“Learn The Basics of Bluetooth Low Energy EVEN If You Have No Coding Or Wireless Experience!"

Don't miss out on the latest articles & tutorials. Sign-up for our newsletter today!

Take your BLE knowledge to the next level.

If you’re looking to get access to full video courses covering more topics, then check out the Bluetooth Developer Academy.

As part of all the courses within the Academy, you’ll also be able to download the full source code to use as a reference or use within your own application.

By joining the Bluetooth Developer Academy, you will get access to a growing library of video courses.

The Academy also features access to a private community of Bluetooth experts, developers, and innovators. You’ll get to connect and interact with me and other experts in the Bluetooth space, learn from others’ experiences and knowledge, and share yours as well.

So, what are you waiting for?? Join today!

Get the new "Intro to Bluetooth Low Energy" hardcover book for FREE

This new & updated edition of my best-selling book is specially crafted to help you learn everything you need to get started with BLE development.

Grab your copy for FREE today!