linuxbluetoothubuntu-12.04bluez

How to get started with Bluetooth for Ubuntu


I really need help getting started. I want to make a basic program (in C) that can read a bluetooth socket and print whatever it is sent. I tried to get Bluez (followed this:http://hackgnar.com/article/installing-the-latest-bluez-software-in-ubuntu-12/ it went great until the "make" at the end and then no luck, would not make and example program could not find bluetooth/bluetooth.h).

I guess my hopeful options are:

  1. some one can tell me what I'm missing with Bluez's install and possibly how to get started with it (compiling etc)
  2. Alternative to bluez? Laptop could do bluetooth file transfers before I installed bluez so do I even need it for this application?
  3. Any sort of comprehensive hello world (download, install, example, compile and run)

I have a strong programming background, just not in Linux (you can gloss over the C stuff but please not the Linux/Ubuntu stuff).

Thanks!


Solution

  • I can only guess that you have an old version of the kernel, or one of the required libraries. Try updating your linux installation (e.g. to a 3.5.x kernel or thereabouts).

    I had no problem completing the steps you took.

    If you are looking for example programs, you can always look at the simpler tools.

    On my ubuntu box I'd do e.g.

    sudo apt-get build-dep bluez-tools 
    apt-get source --compile bluez-tools 
    

    which gets all build dependencies, sources and builds the bluez-tools package on your system.