How to scan for Bluetooth low energy devices using bluez API
I'm new in programming Bluetooth low energy using BlueZ. I want to develop a native code c to scan nearby devices using a BlueZ API for Bluetooth low energy under Android 4.0.3. Anyone know which BlueZ methods I should use? If you're looking to write native c code to scan BLE devices, your best option would be to get the bluez package from here and look at how that is implemented. For scanning for devices, see the /tools/hcitool.c source file, specifically the function static void cmd_lescan(int dev_id, int argc, char **argv) and understand how that is implemented. I hope this helps. 来源: https