This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

What's the maximum size for an advertisement package?

How large can an advertising package in BLE be?

Parents
  • An advertising packet can be up to 31 bytes of data. Each field (i.e. appearance, name, service UUID or similar) have a header of 2 bytes (length and type), meaning that the maximum user payload is 29 bytes.

    When you reach this limit, the ble_advdata_set() method of the SDK will start returning an error, NRF_ERROR_DATA_SIZE (0x0C).

    Remember that if you need to transfer additional data before establishing a connection, you can add a scan response, which can contain an additional 31 bytes. A scan response packet can be set by passing a pointer to an addtional ble_advdata_t as the second parameter of ble_advdata_set().

Reply
  • An advertising packet can be up to 31 bytes of data. Each field (i.e. appearance, name, service UUID or similar) have a header of 2 bytes (length and type), meaning that the maximum user payload is 29 bytes.

    When you reach this limit, the ble_advdata_set() method of the SDK will start returning an error, NRF_ERROR_DATA_SIZE (0x0C).

    Remember that if you need to transfer additional data before establishing a connection, you can add a scan response, which can contain an additional 31 bytes. A scan response packet can be set by passing a pointer to an addtional ble_advdata_t as the second parameter of ble_advdata_set().

Children
Related