Tx power level in BLE advertisement data

Our app acts as a Bluetooth peripheral. When advertising app only adds CBAdvertisementDataLocalNameKey in advertisement data. Recently we have observed that in newer iPhones, mainly iPhone 11 Pro and 12 Pro, OS adds TX power level bytes before local name. This does not happen on all iPhone 11 and 12. We have observed this on some iPhone 8 and 8 plus as well.

Please let us know why and when OS adds TX power level in advertising data as App cannot set the same.

Replies

Update
We could not find any correlation between OS version and/or Bluetooth version.We have noticed that the length of advertising data may have an impact on whether power level bytes are added or not. For instance, on most of the phones power level is not added when we advertise a local name of 13 characters. For local name of 14 characters or more, power level is present. But this behaviour is also not consistent on all phones. Also, if we add service UUID in advertisement data, power level is always present.

Steps to reproduce
  1. Create an instance of CBPeripheralManager.

  2. Start advertising with a local name of 18 characters.

  3. Capture the advertisement data using a Bluetooth sniffer tool.