Search code examples
bluetoothsdkraspberry-pi3cross-compiling

Where to get Bluetooth/Bluetooth.h for Raspberry Pi?


This is a stupid question. But I cannot find a solution to it. I am trying to build a BLE application with reference to this tutorial https://people.csail.mit.edu/albert/bluez-intro/c404.html. I am cross-compiling for Raspberry Pi3 from my Windows pc wsl. I have downloaded the toolchain from https://github.com/raspberrypi/tools. And I have verified the toolchain by compiling a simple HelloWorld application and ran it from RaspberryPi. Now when I try to compile the above code I am getting the error

/mnt/c/Study/RaspberryPi/main.c:5:33: fatal error: bluetooth/bluetooth.h: No such file or directory
 #include <bluetooth/bluetooth.h>

I understand that Bluetooth.h is not my system. My question is where can I get it? So that I can cross-compile from windows. Do I have to download sdk for it? if needed where can I get it?


Solution

  • I found the answer from another forum. I am sharing the link here so that it can be useful if anyone has the same question.

    https://raspberrypi.stackexchange.com/a/119201/115617