How to scan for Bluetooth low energy devices using

2019-04-09 12:58发布

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?

1条回答
forever°为你锁心
2楼-- · 2019-04-09 13:50

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.

查看更多
登录 后发表回答