🎉 25% off Pre-Sale! Bluetooth LE course with real hardware included - no SDK required
Bluetooth® Low Energy Protocol · · 8 min read

Maximum Data Size in a Bluetooth Advertising Packet

How much data can you actually send in a Bluetooth Low Energy advertising packet? In this post, we break down the advertising packet format, legacy vs. extended advertising PDUs, and the maximum payload sizes for each type.

Maximum Data Size in a Bluetooth Advertising Packet

In a couple of previous posts (here and here), we covered the basics of Bluetooth Low Energy (Bluetooth LE) advertising and advertisement packets.

In this post, we'll go into more depth on Bluetooth advertisements and specifically the advertising packet payload and the maximum amount of data you can send out in the payload.

Bluetooth beacons are the most prominent devices that take full advantage of Bluetooth advertising packets. This is due to the reason that most beacons stay in the advertising state throughout their lifetime (do not allow connections), so they rely completely on advertising for relaying the relevant information to the scanning devices.

TLDR: want to skip right to the answer to the question: "How many bytes can I send in a Bluetooth advertising packet?" Click Here!

Bluetooth Advertising Packet Format

To fully understand how much data we can advertise as Bluetooth LE application developers, we need to understand the format of the advertising packet format, but before we dive into the advertising packet format, let's cover an important feature of Bluetooth Low Energy: the different PHY options available.

The Three PHYs

In Bluetooth Low Energy (Bluetooth LE), we have two main packet formats (which apply to both advertising and data packets – which are exchanged during a connection). They are the Coded PHY packet format and the Uncoded PHYs packet format.

The Uncoded PHY includes the original LE 1M PHY (which is the default PHY that has existed since the first version of Bluetooth LE in version 4.0 of the Bluetooth specification) and the optional LE 2M PHY (which was introduced in version 5.0 of the Bluetooth specification providing the option to double the data throughput rate).

The LE Coded PHY was introduced in version 5.0 of the Bluetooth specification. It is intended to be used for:

The LE 1M PHY utilizes a 1 megasymbol/second modulation scheme where each symbol represents 1 bit. The resulting raw transmission rate, in this case, is 1 Mbps.

The LE 2M PHY utilizes a 2 megasymbol/second modulation scheme where also each symbol represents 1 bit. The resulting raw transmission rate, in this case, is 2 Mbps.

The LE Coded PHY utilizes a 1 megasymbol/second modulation scheme but differs from the other two PHYs in that it utilizes either: 2 symbols per bit (S=2), or 8 symbols per bit (S=8). This "redundancy" is utilized by an algorithm that can allow the receiver to recover data in the case of corruption in the received packets. The resulting raw transmission rate, in this case, is 500 Kbps (in the case of S=2) and 125 Kbps (in the case of S=8).

In this post, we will focus on the Uncoded PHY packets since they are the most common. For more detailed information on the LE Coded PHY, see my previous post on the subject.

Advertising PDU Types

For Uncoded PHY packets, there are two main types of advertising PDUs (Protocol Data Unit) that can be utilized: Legacy Advertising PDUs and Extended Advertising PDUs.

Before we dive into the different types of legacy and extended advertising PDUs, it's important to note that they share the same packet format:

Uncoded PHY Packet Format (applies to both advertising and data packets)

The PDU portion is the field that contains the payload which you can utilize for sending out data in the advertising packet.

Legacy Advertising Packets

The legacy advertising PDUs are:

Here's a look at what a legacy advertising PDU format looks like:

Generic Packet Format
Legacy Advertising PDU Payload Format

The legacy advertising PDUs are sent only on the primary advertising channels (37, 38, and 39). This means they are supported by all Bluetooth Low Energy scanners.

You can refer to my previous post on Bluetooth Advertisements to learn more about the different types of advertising channels.

Extended Advertising Packets

The extended advertising PDUs are:

Here's a look at what an extended advertising PDU format looks like:

Extended Advertising PDU Payload Format

Notice that extended advertising packets utilize just two PDU types (ADV_EXT_IND + AUX_ADV_IND) to support the many types of advertising events by utilizing a field included in the PDU header.

Note that extended advertising is an optional feature (introduced in Bluetooth 5.0). So, they are not necessarily supported by any Bluetooth Low Energy scanner, even if it is listed to support Bluetooth 5.0. In fact, as of the writing of this post, most Bluetooth LE-enabled smartphones do not support them.

Advertising Packet Payload Format

Whether you are using legacy or extended advertising packets, the format of the payload is the same.

It is structured in the following manner:

LTV #1 LTV #2 LTV #n
Length Type Value Length Type Value ··· Length Type Value

Advertising Data Format

LTV stands for "Length-Type-Value". You can have as many of these as can fit within an advertising packet payload.

The Length and Type fields are mandatory and each takes up one byte.

The Maximum Length of Data you can Include in a Bluetooth LE Advertising Packet

So, we can already see that if we want to follow the Bluetooth specification, we will be losing two bytes to Length + Type. This leaves us with either 31 - 2 = 29 bytes (in the case of legacy advertising packets) or 254 - 2 = 252 bytes (in the case of extended advertising packets).

If you are looking to maximize the amount of payload that you want to include in the advertising packet then you can:

So, in summary, here's the answer to this very common question:

But again, consider utilizing scan responses and/or data compression to increase the size of user data that you want to include in the advertising data packets.

Note: keep in mind that some Bluetooth LE scanners will require you to include other advertising data types (such as Flags) in your advertising data, so this will impact the total amount of user data that you can truly advertise.

I hope you found this post useful and that it provided the information needed to really understand the background behind the answer to this common question about Bluetooth LE advertising data capacity.

💡
Want to learn more? Check out the Bluetooth Developer Academy for comprehensive courses on Bluetooth Low Energy development, including detailed guides on advertising, connections, and more!

Read next