C/C++ Bluetooth library

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


To include the Bluetooth libraries (bluetooth.h, hci.h, and hci_lib.h) in your Yocto image for developing a C++ application, you can follow these steps:

  1. Modify local.conf:
    Add the following line to your local.conf file to include the BlueZ package, which provides the necessary Bluetooth libraries:

    IMAGE_INSTALL_append = " bluez"
    
  2. Check for Required Recipes:
    Ensure that the BlueZ recipe is available in your Yocto layer. The common recipes for Bluetooth support are bluez and bluez5. You can add these to your image by including them in your local.conf or your image recipe.

  3. Rebuild Your Image:
    After making changes to your local.conf, run the following command to rebuild your image:

    bitbake <your-image-name>
    

    Replace <your-image-name> with the actual name of your reference image.

Make sure your Yocto environment is set up correctly and that you have the necessary layers included in your bblayers.conf. Also, verify that your BSP (Board Support Package) supports the BlueZ package. After rebuilding, check the output files to ensure the libraries are included in the generated image.

Please, also check if these links can help you solve your problem:

Bluetooth br-connection-profile-unavailable.