Installing Bluetooth tools in Raspberry Pi

Hi there!
Following my previous post on how to get started with the Raspberry Pi "headless mode" I'll now show you how to install the Bluetooth tools.
On the project that I'm working on right now I'll be using Bluetooth with the Raspberry Pi so that later I can connect to several devices via Bluetooth. For this purpose I have ordered some USB Bluetooth dongles from ebay and some HC-05 Bluetooth modules, also from ebay.

(Click the photo for better resolution in Picasa Photostream)
The first thing to do is type "lsusb" in the terminal to see if your USB Bluetooth dongle is being recognized. As an example, the ones I ordered from ebay show up as:
Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
If it finds something saying "Bluetooth" you should be good to keep going. The installation of all the Bluetooth tools in the Raspberry Pi takes some time but is pretty easy. Just open a terminal and enter:
sudo apt-get install bluetooth bluez-utils blueman
Then go get your self a sandwich and wait for it to finish installing.
After that you can use hcitool to see if your device is being properly recognized. Open the terminal in your Raspberry Pi and enter:
hcitool dev
and it should show you the list of devices that you have connected to your Raspberry Pi and their MAC address. As an example mine shows:
Devices:
hci0 00:15:83:3D:0A:58
Now that you're sure that your device is being recognized you can try to scan for other bluetooth devices that may be nearby. To test, turn your phone's Bluetooth visibility on and then type in the terminal:
hcitool scan
When I test this with my phone I get:
If you get similar results, then you have your bluetooth dongle correctly working on your Raspberry Pi :). Later I'll post a tutorial on how to establish a serial connection between your Bluetooth dongle and an HC-05 Bluetooth module :)
For now, that's it!

Take care! :)



Did you find this post helpful? Do you wish to contribute to other projects regarding computer science, electronics, robotics or mechatronics that will be posted in this blog? If you wish to do so, you can donate via paypal using the button below. Thanks! :)

Donate

0 Comments:

top