Android 5.0 peripheral mode, how to add data to a scan response

784 views Asked by At

When advertising from an android device (supports BLE Peripheral mode)

Is there a way to add advert data elements to a scan response?

I think it is sending empty scan responses when a central role device is doing an active scan as we are recieving two RSSI values in our own hardware

1

There are 1 answers

0
Khaled Alanezi On

Use the start advertising method with that has two arguments of type AdvertiseData. One will be the Advertisement packet and the other is the scan response. See this constructor from Android developer site:

startAdvertising(AdvertiseSettings settings, AdvertiseData advertiseData, AdvertiseData scanResponse, AdvertiseCallback callback)