b_hammonds
b_hammonds

Reputation: 66

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

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

Upvotes: 3

Views: 783

Answers (1)

Khaled Alanezi
Khaled Alanezi

Reputation: 361

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)

Upvotes: 1

Related Questions