BLE Peripheral advertise scan response data with hashed uuid

My application advertises service uuid FC66 and 00410b66-2553-48d7-cf18-000000002154 in advertising data, and "loading" as local name in response data in foreground. But iOS cut local name to "loadi" and add Hashed UUID data 0100000000000000000000000600000000 to response data.

Why iOS add hashed uuid data? Is it because my 128-bit uuid format is wrong?

We want to advertise the complete local name data. How to avoid this problem?

What you did not mention here, but is visible in the log snippet you provided, the app is in the background.

When an advertising app is not in the foreground advertising operates differently than when your app is in the foreground.

In particular, when your app is advertising while in the background:

  • The CBAdvertisementDataLocalNameKey advertisement key is ignored, and the local name of peripheral is not advertised.
  • All service UUIDs contained in the value of the CBAdvertisementDataServiceUUIDsKey advertisement key are hashed and placed in a special “overflow” area; they can be discovered only by an iOS device that is explicitly scanning for them.
  • If multiple apps and/or system processes are advertising in the background, the frequency at which your peripheral device sends advertising packets may decrease.

This is a system behavior and there is no way to avoid this.


Argun Tekant /  DTS Engineer / Core Technologies

Thanks,I solve this problem by delay advertise.

My app changes to foreground first, and I start advertising. But bluetoothd thought my app is in background in this time.

BLE Peripheral advertise scan response data with hashed uuid
 
 
Q