This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux SDK 6.0 and bluetooth

We are using using the Linux Sitara SDK for development.   With this SDK I am trying to cross compile a simple bluetooth scan code for AM335x, but I get the following error.

ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../arm-linux-gnueabihf/libc/usr/include/./bluetooth/bluetooth.h: In function ‘uint64_t bt_get_le64(void*)’:

I initially started with the code provided here

http://people.csail.mit.edu/albert/bluez-intro/c404.html

but this error shows with a simple code like this. It seems 

#include <stdio.h>

#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>

int main(int argc, char **argv)
{

return 0;
}

Am I missing any other file to include?

  • Here is the complete error message

    ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../arm-linux-gnueabihf/libc/usr/include/./bluetooth/bluetooth.h: In function ‘uint64_t bt_get_le64(void*)’:
    ti-sdk-am335x-evm-06.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/../arm-linux-gnueabihf/libc/usr/include/./bluetooth/bluetooth.h:131:9: error: invalid conversion from ‘void*’ to ‘bt_get_le64(void*)::<anonymous struct>*’ [-fpermissive]

  • I needed to use gcc rather than g++ and use c files rather than c++ file. That made it work.