I'm working on a project that involves interfacing a PC (windows based) with a raspberry pi 3 using Bluetooth with c++. I've done some research and found that the library BlueZ is one of the best options for successfully connecting both devices. My question is do I need to download and install BlueZ? or it comes with the latest version of Raspian? If I need to install it do you know how I could do it?
-
If you REALLY are using Jessie you are out of luck - it is obsolete. You should take the See Tour to see how this site works and read How do I ask a good question?– MilliwaysOct 7, 2020 at 3:45
-
And one criteria in StackExchange is to do research before asking! I will vote to close this as it show no sign of research!– Mats KarlssonOct 7, 2020 at 5:54
1 Answer
Yes, BlueZ is included in the latest versions of Raspberry Pi OS. To check that it is running on your system, use the command service bluetooth status
.
BlueZ's API for interfacing with various languages are documented at: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc
There is the the mgmt API for system level tasks and the D-Bus API for application level tasks.
There is a command line tool called bluetoothctl
that can be useful for exploring the capabilities of the various D-Bus API's. btmgmt
does the same for the mgmt API.
Typing help
in either of these tools will give you a list of the commands.
There are examples of how to do various tasks with BlueZ available in the source tree at: https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test