Gyul kim
Gyul kim

Reputation: 31

how to Ble scanner Scan response request when i needed?

I'm developing bluetooth le scanner app. When device is near by, I want to send 'Scan response request' . and when device is far, I want to stop sending 'Scan response request'. Results found in google, android 'scan callback' is send to device 'Scan response request'.

  1. How to send 'Scan response request' when i needed not always?

Results found in google, 'passive scan mode' is what i needed. But 'passive scan mode' is in Mashmellow not Lollipop. ('Passive Scan mode' : scan only advertising data not Scan response data)

  1. Can i use 'Passive scan mode' in Lollipop?

Upvotes: 1

Views: 922

Answers (1)

Emil
Emil

Reputation: 18472

  1. You can not set a RSSI threshold when SCAN_REQ should be sent out. The Bluetooth controller will simply send out a SCAN_REQ when it receives an advertisement.

  2. No. Android only supports Active Scan in their public APIs.

Note that if you are in control of the peripheral, you could configure it to send out ADV_NONCONN_IND advertisements rather than ADV_IND advertisements. Then no SCAN_REQ or SCAN_RSP will be sent.

Upvotes: 1

Related Questions