简体   繁体   中英

How to Android BLE Passive scan?

While scanning for advertising data with startLeScan method, this method also request to pheripheral device for scan response data. I only want to scan for advertising data. I don't want to send response request to peripheral device. and peripheral device can't change advertise mode.

According Bluetooth 4.0 Core spec, There exists passive scan mode. https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=282159

And also, android has parameter that determines scan type.

And Active Scanning is android's default scan mode. http://androidxref.com/5.1.1_r6/xref/external/bluetooth/bluedroid/stack/btm/btm_ble_gap.c#327

How to use passive scan mode?

or

Possible to change or add in btm_ble_gap.c in external folder?

please help. thanks.

即使蓝牙堆栈内部支持被动扫描,由于某种原因,也没有可用于应用程序的公共 API。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM