- Saved searches
- Use saved searches to filter your results more quickly
- clopresti/rpi-bluetooth
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- Setting up Raspberry Pi 4 Wi-Fi and Bluetooth
- Updating the Raspberry Pi 3 / 4 Raspbian
- Setting up Raspberry Pi 3 / 4 Wi-Fi
- Setting up Raspberry Pi 4 Bluetooth
- 10 Best Bluetooth Dongles for Raspberry Pi Suitable for Any Project
- MIATONE® Wireless Bluetooth CSR 4.0 USB Adapter Dongle ($6.99)
- Bluetooth USB for the Raspberry Pi – Pihut ($7.33)
- TRIXES Raspberry Pi Micro Bluetooth 2.0 Dongle ($4.79)
- JBtek Raspberry Pi Bluetooth 4.0 USB adapter – For Windows 8 / Windows 7 / Vista
- Panda Wireless Combo (Wifi+Bluetooth) ($13.99)
- Nano USB to Bluetooth Dongle V2.0 ($2.63)
- Panda Bluetooth 4.0 USB Nano Adapter ( $10.99 )
- Xmanx® Mini USB Bluetooth 4.0 Low Energy Micro Adapter ($9.99)
- Super Fast USB to Bluetooth Dongle V4.0 ($10.50)
- USB Bluetooth 4.0 Low Energy Micro Adapter Dongle ($6.99)
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
clopresti/rpi-bluetooth
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
Using Bluetooth With The Raspberry Pi
The following instructions show how to setup and use a USB Bluetooth adapter with the Raspberry Pi. Please note that these instructions only apply to the latest Raspbian Jessie distribution. If you are using a different distribution or an older Raspbian build such as Wheezy some of the instructions will need to be changed as the Bluetooth stack and utilities have changed with the Jessie release and BlueZ 5.23.
A lot of the instructions I found online were relating to the older wheezy builds and it took some extra time to find the correct way to do things with Jessie. There were also a few configuration changes that needed to be made in order to work around some known issues/bugs relating to the RFCOMM (serial over Bluetooth) communication on the Pi. I have documented all this and hopefully I can save you some time if you are trying to do a similar things.
I am using a USB Bluetooth 4.0 adapter with a Broadcom BCM20702 chipset but there are many other supported Bluetooth adapters including those with CSR (Cambridge Silicon Radio) chipsets. I tested on a Raspberry Pi 2 but all this should work with any version of the Raspberry Pi as long as you are running the latest Raspbian Jessie distribution.
First make sure your Pi is up to date:
> sudo apt-get update > sudo apt-get upgrade > sudo rpi-update > sudo reboot
Insert your USB Bluetooth adapter into one of the USB ports on the Pi and enter:
You should see output similar to the following:
If you used an adapter with a different chipset like CSR you might see ‘Cambridge Silicon Radio’ insead of ‘Broadcom Corp’. If you do not see something similar to this it might mean that there is something wrong with your adapter or it is not recognized/supported.
Next install the bluez and bluetooth manager packages:
> sudo apt-get install bluetooth blueman bluez python-gobject python-gobject-2
Now you can check you your adapter state:
You should see output similar to the following:
BD Address: XX:XX:XX:XX:XX:XX UP RUNNING PSCAN ISCAN
The [XX:XX:XX:XX:XX:XX] part is the MAC address of your Bluetooth adapter If you do not see «UP RUNNING» enter the following to turn on Bluetooth:
Part 2. Paring and Connecting Devices
Start the command line Bluetooth manager
You should see a line similar to:
Controller XX:XX:XX:XX:XX:XX raspberrypi [default]
‘raspberrypi’ is the default name you will see when pairing/connecting to the Pi from other devices
Setting up Raspberry Pi 4 Wi-Fi and Bluetooth
The Raspberry Pi 4 Model B has an integrated Wi-Fi and Bluetooth adapter. You can set up the Raspberry Pi 4 Wi-Fi on the desktop, as well as on the console. With the same price as the predecessor models, you can save the money for a USB adapter with a Raspberry Pi 4 and ideally have two more USB ports at your disposal.
I will show in this tutorial how easy it can be to set up the Raspberry Pi 4 Wi-Fi and Bluetooth devices such as keyboards or mobile phones.
The Raspberry Pi 4 Wi-Fi can be set up easier than ever.
None of the previous Raspberry Pi models had the wireless receiver integrated, so you had to get a compatible USB stick and update it. This is still possible in principle, but the process has now become much simpler and can take place completely via the graphical user interface (GUI).
Updating the Raspberry Pi 3 / 4 Raspbian
If you’re using a fresh micro SD card, you can save yourself some update steps by downloading the latest Raspbian / Raspberry Pi OS version and transferring it to the SD card. If you already have a micro SD card with a version of Raspbian, it must be updated so that the appropriate packages are loaded, because without them the modules are not usable. As the downloads on the Foundation’s website are not updated weekly, updating to the latest version of Raspbian definitely makes sense.
To update the repositories we open the terminal and enter the following commands (internet connection must exist, for example via an ethernet cable):
sudo apt-get update sudo apt-get dist-upgrade sudo apt-get upgrade sudo rpi-update
The last command is only important for those who have not updated their packages for a very long time. Alternatively, you can also use sudo raspi-config to perform a system update. Updating may take a little while, depending on when the last time you updated.
Setting up Raspberry Pi 3 / 4 Wi-Fi
If you are directly connected to the keyboard and a mouse, you can start the desktop and see the Wi-Fi button in the top right corner of the taskbar. Clicking on it will show all of the available wireless networks in the area that you can connect to:
If you are connected to the Pi via SSH connection from your desktop computer, you can also follow this tutorial. In it, I show how to set up a wireless connection without the help of the GUI.
Setting up Raspberry Pi 4 Bluetooth
In order to use the integrated Bluetooth adapter of the Raspberry Pi 4, a few tools must be installed. So open the console again and enter the following:
sudo apt-get install pi-bluetooth sudo apt-get install bluetooth bluez blueman
The second line installs packages to control the Bluetooth module via the graphical interface. At the top left should also be a Bluetooth symbol visible after a reboot ( sudo reboot ).
Now you can connect the Pi with other devices (such as Bluetooth mouse, smartphones, etc.) and transfer files if necessary.
If you also want to automatically share files over the Bluetooth connection and integrate them into your programs, I showed in a previous tutorial how to set up a Bluetooth connection to the smartphone via the console.
10 Best Bluetooth Dongles for Raspberry Pi Suitable for Any Project
Bluetooth with Raspberry Pi. A great set which allows many small and bigger tasks to be accomplished. They are interfaced through Raspberry Pi compatible Bluetooth dongles. Not every Bluetooth dongle is compatible with Raspberry Pi hence must be purchased after specifications are read.
MIATONE® Wireless Bluetooth CSR 4.0 USB Adapter Dongle ($6.99)
Wireless Bluetooth technology allows plug and play with other Bluetooth devices. It also works with wireless speakers and wireless headphones. This Bluetooth dongle supports windows 10, windows 8, windows 7, XP, Vista, 2003, 2000 Me 64/32 bit.
You can find this product here.
Bluetooth USB for the Raspberry Pi – Pihut ($7.33)
A nano usb dongle v2.0 compatible with both newer and older versions (v2.0 – v3.0 Mbps) of Bluetooth devices. It can get pi interacting with all devices such as headsets, notebooks, handheld pc’s. It has an internal LED to show that the device is working and a range of 20m. It has been checked for compatibility with Raspberry PIX.
There isn’t a manual sent in by the team hence you have to make it useful yourself. The product works well and is easy to use.
TRIXES Raspberry Pi Micro Bluetooth 2.0 Dongle ($4.79)
This is a pretty compact sized dongle allowing the user to keep it plugged in. It has a range of 100 meters and can transfer data up to 3Mbps.
You can find this product here.
JBtek Raspberry Pi Bluetooth 4.0 USB adapter – For Windows 8 / Windows 7 / Vista
Out of 86 customer reviews this was rated 5 star by 67 percent people. The customers seem happy as they write “works perfectly with Raspberry Pi”. Works great with Bluetooth mouse too.
You can find this product here.
Panda Wireless Combo (Wifi+Bluetooth) ($13.99)
It has a 150 Mbps Wireless USB Adapter with 2dBi antenna along with the Bluetooth module.
The wireless adapter does not have a great range. It works with windows 10 after installation. The wifi works perfectly but there were issues in Bluetooth according to one customer (could be bad technical skills of customer).
A review from a customer on amazon.
“I have used this with a Raspbian pi install and I was impressed with out well it worked out of the box. Fast speeds and I was happy to see how well it worked for the price!
Had some issues connecting to a hidden SSID and while I’m still trying to figure out if that’s software or hardware it’s not enough to remove a star.
Definitely get this if you’re looking to add Bluetooth and WiFi to your rPi”
You can find this product here.
Top 10 Suggested Articles
Nano USB to Bluetooth Dongle V2.0 ($2.63)
It is compatible with Bluetooth v2.0 and v1.2 and has internal Red LED to show that the device is working correctly. It has a range of 20 meters and symbol rate of 3Mbps.
- Supporting profiles : Networking, Dial-up, Fax, LAN Access and Headsets
Some customer reviews from amazon:
“Bluetooth connections are easy to configure and now stable for weeks or nearly a month. Useful because it has a real low power consumption.”
“Bought 3 – they are only £2 each – and plugged on into my Ubuntu box. Nothing else to do, just worked. Bit more fiddly with the Pi 2, (primarily lack of USB ports!) but again, no real problems. “Does the job, inexpensive, so get a couple if you are getting any.”
Panda Bluetooth 4.0 USB Nano Adapter ( $10.99 )
It supports 80-feet operating range when connected to a Bluetooth Smart device and is compatible with Windows XP/Vista/7/8, Linux.
There were problems installing the driver so you can check beforehand from the people who have previously used it or the customer support staff of Panda. The dongle works well. It doesn’t support HID proxy that is if you are using Bluetooth you won’t be able to use the bootloader.
You can find this product here.
Xmanx® Mini USB Bluetooth 4.0 Low Energy Micro Adapter ($9.99)
It has a 20 meters long transmission distance and simplified use with an attractive user interface. This s pecifically works with Microsoft’s new Bluetooth 4.0 Low Energy support in Windows 8 and later and does not add Bluetooth Low Energy capability to Windows versions that don’t have it.
You can find this product here.
Super Fast USB to Bluetooth Dongle V4.0 ($10.50)
Driver are built-in in windows 7/8/XP so the user does not need to install any software. Plug and let the device install driver itself.
The customers were happy with the range and said that it worked fine.
You can find this product here.
USB Bluetooth 4.0 Low Energy Micro Adapter Dongle ($6.99)
- Enables your PC or laptop to wirelessly communicate with Bluetooth-enabled devices, like Smartphones.
- Upgraded Bluetooth support for Windows 8, 7, Visa, XP or Linux PCs. Plug and play
- Attractive user interface. A setup CD guides through installation.
- Latest Version 4.0 Class 2 Smart Ready Adapter with Low Energy Technology.
- Compatible with earlier Bluetooth versions 1.0 ,2.0 and 2.1 .
- Signal is more stronger than the square version.
This rates 4.2/5. It works well for how cheap it is. Range is pretty good too. Also, the small dongle doesn’t add much bulk to the raspberry pi. Works well with a Television attached.
Users experienced difficulties with the power button. It takes AAA batteries so one can always put in new batteries if required. The response is pretty great as said by the customers.
You can find this product here.