User avatar
pauly
Posts: 12
Joined: Sat Mar 09, 2013 7:14 am
Location: Kent
Contact: Website

Re: Raspberry Pi 3 Bluetooth Setup

Sun Mar 13, 2016 3:07 pm

I thought I was on a brand new build from noobs but maybe I swapped back to an older wheezy image, will try again from scratch

hamdy.aea
Posts: 29
Joined: Sat Mar 12, 2016 3:55 pm

Re: Raspberry Pi 3 Bluetooth Setup

Sun Mar 13, 2016 3:19 pm

I reinstalled the packages and rebooted my pi. Now I just have a problem when I try to pair the Wireless Soundstick from Harman Kardon
:
[bluetooth]# pair 0C:A6:94:xx:xx:xx
Attempting to pair with 0C:A6:94:xx:xx:xx
Failed to pair: org.bluez.Error.AlreadyExists
Hamdy Abou El Anein

User avatar
Douglas6
Posts: 4778
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspberry Pi 3 Bluetooth Setup

Sun Mar 13, 2016 3:36 pm

That usually means that you are already paired. What does this show in bluetoothctl:

Code: Select all

info 0C:A6:94:xx:xx:xx

hamdy.aea
Posts: 29
Joined: Sat Mar 12, 2016 3:55 pm

Re: Raspberry Pi 3 Bluetooth Setup

Sun Mar 13, 2016 4:08 pm

now it works fine for me. I readed the bluetoothctl help. There i found the way to remove all the devices then i scanned again. I found my wireless speakers. i did a connect xx:xx:xx:xx not a pair and in raspbian I switched off the Analog speakers.
Hamdy Abou El Anein

User avatar
sadsfae
Posts: 6
Joined: Mon Mar 07, 2016 12:03 pm
Location: Dublin, Ireland
Contact: Website

Re: Raspberry Pi 3 Bluetooth Setup

Mon Mar 14, 2016 9:22 am

I've not had any luck with Bluetooth on Fedora, can someone tell me what I'm missing? I couldn't find the rpi-bluetooth command mentioned here on github (similiar to rpi-update). Here's what I've done to try to get it working but hcitool doesn't report any working adapters.

Code: Select all

modprobe btbcm
systemctl start bluetooth
Bluetooth service is now running.

Code: Select all

● bluetooth.service - Bluetooth service
 Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
 Active: active (running) since Mon 2016-03-14 08:54:58 GMT; 8s ago
 Docs: man:bluetoothd(8)
 Main PID: 1103 (bluetoothd)
 Status: "Running"
 CGroup: /system.slice/bluetooth.service
 └─1103 /usr/libexec/bluetooth/bluetoothd
dmesg says the kernel module is loaded:

Code: Select all

[   66.101917] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   66.110695] Bluetooth: BNEP filters: protocol multicast
[   66.119751] Bluetooth: BNEP socket layer initialized
No devices listed.

Code: Select all

hcitool dev
Devices:
As you can see there's no bluetooth devices listed.
Is there non-free firmware I need to snatch similiar to the wifi chipset to get it working?

To get wifi working I had to pull down these files in /lib/firmware:
https://github.com/RPi-Distro/firmware- ... 0-sdio.bin
https://github.com/RPi-Distro/firmware- ... 0-sdio.txt
Linux User #208453
http://hobo.house

User avatar
sadsfae
Posts: 6
Joined: Mon Mar 07, 2016 12:03 pm
Location: Dublin, Ireland
Contact: Website

Re: Raspberry Pi 3 Bluetooth Setup

Mon Mar 14, 2016 3:48 pm

sadsfae wrote:I've not had any luck with Bluetooth on Fedora, can someone tell me what I'm missing? I couldn't find the rpi-bluetooth command mentioned here on github (similiar to rpi-update). Here's what I've done to try to get it working but hcitool doesn't report any working adapters.

Code: Select all

modprobe btbcm
systemctl start bluetooth
Bluetooth service is now running.

Code: Select all

● bluetooth.service - Bluetooth service
 Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
 Active: active (running) since Mon 2016-03-14 08:54:58 GMT; 8s ago
 Docs: man:bluetoothd(8)
 Main PID: 1103 (bluetoothd)
 Status: "Running"
 CGroup: /system.slice/bluetooth.service
 └─1103 /usr/libexec/bluetooth/bluetoothd
dmesg says the kernel module is loaded:

Code: Select all

[   66.101917] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   66.110695] Bluetooth: BNEP filters: protocol multicast
[   66.119751] Bluetooth: BNEP socket layer initialized
No devices listed.

Code: Select all

hcitool dev
Devices:
As you can see there's no bluetooth devices listed.
Is there non-free firmware I need to snatch similiar to the wifi chipset to get it working?

To get wifi working I had to pull down these files in /lib/firmware:
https://github.com/RPi-Distro/firmware- ... 0-sdio.bin
https://github.com/RPi-Distro/firmware- ... 0-sdio.txt
I've also tried the bluez-firmware here:
http://www.bluez.org/download/

This doesn't seem to make a difference, I still can't see the bluetooth device.
Linux User #208453
http://hobo.house

User avatar
sadsfae
Posts: 6
Joined: Mon Mar 07, 2016 12:03 pm
Location: Dublin, Ireland
Contact: Website

Re: Raspberry Pi 3 Bluetooth Setup

Mon Mar 14, 2016 4:58 pm

sadsfae wrote:
sadsfae wrote:I've not had any luck with Bluetooth on Fedora, can someone tell me what I'm missing? I couldn't find the rpi-bluetooth command mentioned here on github (similiar to rpi-update). Here's what I've done to try to get it working but hcitool doesn't report any working adapters.

Code: Select all

modprobe btbcm
systemctl start bluetooth
Bluetooth service is now running.

Code: Select all

● bluetooth.service - Bluetooth service
 Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
 Active: active (running) since Mon 2016-03-14 08:54:58 GMT; 8s ago
 Docs: man:bluetoothd(8)
 Main PID: 1103 (bluetoothd)
 Status: "Running"
 CGroup: /system.slice/bluetooth.service
 └─1103 /usr/libexec/bluetooth/bluetoothd
dmesg says the kernel module is loaded:

Code: Select all

[   66.101917] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   66.110695] Bluetooth: BNEP filters: protocol multicast
[   66.119751] Bluetooth: BNEP socket layer initialized
No devices listed.

Code: Select all

hcitool dev
Devices:
As you can see there's no bluetooth devices listed.
Is there non-free firmware I need to snatch similiar to the wifi chipset to get it working?

To get wifi working I had to pull down these files in /lib/firmware:
https://github.com/RPi-Distro/firmware- ... 0-sdio.bin
https://github.com/RPi-Distro/firmware- ... 0-sdio.txt
I've also tried the bluez-firmware here:
http://www.bluez.org/download/

This doesn't seem to make a difference, I still can't see the bluetooth device.
I see some references to BCM43430A1.hcd here:
https://github.com/raspberrypi/linux/issues/1325

I've tried both of these from various github repos but none seem to make the bluetooth functionality show up.

Code: Select all

b95ee9032a723daa25ab9608a515e984  BCM43430A1.hcd
00b4a75a3bc247f96eb07f12b28dd061  bcm43430a1.hcd
Which one should we be using? Is there other firmware we should be using?
I'm also loading the following kernel modules to no avail

Code: Select all

bnep                   10336  2
btbcm                   4196  1 hci_uart
bluetooth             317981  7 bnep,btbcm,hci_uart
rfkill                 16036  6 cfg80211,bluetooth

Code: Select all

# bluetoothctl -a
Agent registered
[bluetooth]# devices
[bluetooth]# show
No default controller available

Code: Select all

# hcitool dev
Devices:
Linux User #208453
http://hobo.house

User avatar
pauly
Posts: 12
Joined: Sat Mar 09, 2013 7:14 am
Location: Kent
Contact: Website

Re: Raspberry Pi 3 Bluetooth Setup

Tue Mar 15, 2016 12:26 pm

pauly wrote:I thought I was on a brand new build from noobs but maybe I swapped back to an older wheezy image, will try again from scratch
By rights I should be too embarrassed to report back on what my issue was. I had taken the sd card out of my pi 3 to try something in the old pi 2 and forgotten about it :oops: hcitool scan is working fine here!

SirMcp
Posts: 5
Joined: Tue Mar 15, 2016 11:42 pm

Re: Raspberry Pi 3 Bluetooth Setup

Wed Mar 16, 2016 3:03 pm

I Just got my Pi. Pretty straight forward set except for bluetooth. I'm new to Linux and a few eggs shy of a dozen so be gentle with me. This is what I get trying to connect a phone and then a keyboard.

Code: Select all

Updating the GPU firmware - Debian/Raspbian
You can update the firmware using rpi-update by Hexxeh. On Raspbian, you can install it by running

sudo apt-get install rpi-update
To update the software, run

sudo rpi-update
Bluetooth daemon seems to be up but something is messing with the connection. both devices are set to trusted. Any help would appreciated.

User avatar
Douglas6
Posts: 4778
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspberry Pi 3 Bluetooth Setup

Wed Mar 16, 2016 4:22 pm

"Something is missing with the connection" is way too vague to be of any use to someone trying to help. Tell us what you want to do, what you've tried, and what is not working. (I'm not sure you pasted what you intended to paste.)

Drahngis
Posts: 2
Joined: Wed Mar 16, 2016 4:34 pm

Re: Raspberry Pi 3 Bluetooth Setup

Wed Mar 16, 2016 4:46 pm

Hi.

i'm trying to set up my Playstation 4 controller on my Raspberry pi 3 with Bluetooth.

I'm rather new to raspberry pi, so i've tried googling my way to finding out how to do it but i've got some problems.

When I write " Bluetoothctl " it works and I get in it, but I can't write anything at all..all I can do is press CTRL+C to leave it.

When I type " Systemctl start bluetooth" it says : Failed to start bluetooth.service:Access denied.

When I type " systemctl status bluetooth" it says:

Bluetooth.service - Bluetooth service
Loaded (/lib/systemd/system/bluetooth.service:enabled)
Active: Failed (result: exit-code)
Docs: man:bluetoothd(8)
Process: 2102 ExecStart=/usr/lib/bluetooth/bluetoothd (code=exited, status=203/exec)
Main PID: 2102 (code= exited, status=203/exec

when I type " sudo systemctl start bluetooth" it says:

Job for bluetooth.service failed. See "Systemctl status bluetooth.service' and 'journalctl -xm' for details

I can can type "hcitool scan" and find my PS4 controller.

I'm very sure i've updated all I can.

I would appreciate any help I can get :)

Davidstav
Posts: 1
Joined: Wed Mar 16, 2016 4:58 pm

Re: Raspberry Pi 3 Bluetooth Setup

Wed Mar 16, 2016 6:14 pm

I get to that point after I trust my BT device when I am suppose to connect it with the connect command but then it fails. It's paired and i've done everything I can think of right..

Anyone got any ideas?

Code: Select all

[bluetooth]# connect 90:48:9A:E8:9E:FA
Attempting to connect to 90:48:9A:E8:9E:FA
Failed to connect: org.bluez.Error.Failed

SirMcp
Posts: 5
Joined: Tue Mar 15, 2016 11:42 pm

Re: Raspberry Pi 3 Bluetooth Setup

Wed Mar 16, 2016 8:12 pm

[email protected]:~ $ hcitool scan
Scanning ...
20:43:00:50:34:8F Bluetooth Keyboard
[email protected]:~ $ sudo service bluetooth status
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Active: active (running) since Wed 2016-03-16 16:03:08 EDT; 2min 12s ago
Docs: man:bluetoothd(8)
Main PID: 717 (bluetoothd)
Status: "Running"
CGroup: /system.slice/bluetooth.service
└─717 /usr/lib/bluetooth/bluetoothd

Mar 16 16:03:08 raspberrypi bluetoothd[717]: Bluetooth daemon 5.23
Mar 16 16:03:08 raspberrypi bluetoothd[717]: Unknown key DisablePlugins in m...f
Mar 16 16:03:08 raspberrypi systemd[1]: Started Bluetooth service.
Mar 16 16:03:08 raspberrypi bluetoothd[717]: Starting SDP server
Mar 16 16:03:11 raspberrypi bluetoothd[717]: Bluetooth management interface ...d
Mar 16 16:03:11 raspberrypi bluetoothd[717]: Sap driver initialization failed.
Mar 16 16:03:11 raspberrypi bluetoothd[717]: sap-server: Operation not permi...)
Hint: Some lines were ellipsized, use -l to show in full.
[email protected]:~ $ sudo bluetoothctl
[NEW] Controller B8:27:EB:9E:89:00 raspberrypi [default]
[NEW] Device CC:F9:E8:B6:4B:ED SAMSUNG-SGH-I777
[NEW] Device 20:43:00:50:34:8F Bluetooth Keyboard
[CHG] Device 20:43:00:50:34:8F Connected: yes
[CHG] Device 20:43:00:50:34:8F Connected: no
[CHG] Device 20:43:00:50:34:8F Connected: yes
[CHG] Device 20:43:00:50:34:8F Connected: no

it can pair with the phone but won't connect. I get this 'Connection Failed: No such file or directory', with the phone. The BT keyboard tries to pair and then fails.

User avatar
Douglas6
Posts: 4778
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspberry Pi 3 Bluetooth Setup

Wed Mar 16, 2016 8:33 pm

To connect with a Bluetooth device, it must be paired, usually trusted, and waiting for a connection. A phone may be paired and trusted, but there is nothing running on it accepting connections. You'll need to connect FROM the phone to the Pi, which needs to be running a profile that will accept connections, whether it be A2DP (audio streaming), SSP (serial port), NAP (network access), OBEXFTP (file transfer), or something else.

Keyboards must be paired and trusted to connect to from the Pi. Connecting and immediately disconnecting usually means the keyboard is not trusted. What does bluetoothctl show with a 'info <bdaddr>' command, using the keyboard's bdaddr?

SirMcp
Posts: 5
Joined: Tue Mar 15, 2016 11:42 pm

Re: Raspberry Pi 3 Bluetooth Setup

Thu Mar 17, 2016 12:12 am

[bluetooth]# info 20:43:00:50:34:8F
Device 20:43:00:50:34:8F
Name: Bluetooth Keyboard
Alias: Bluetooth Keyboard
Class: 0x002540
Icon: input-keyboard
Paired: no
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: no

That's what i got.

User avatar
Douglas6
Posts: 4778
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspberry Pi 3 Bluetooth Setup

Thu Mar 17, 2016 12:19 am

SirMcp wrote:Paired: no
Try pairing it. Trust it again just to be sure. Then try connecting.

SirMcp
Posts: 5
Joined: Tue Mar 15, 2016 11:42 pm

Re: Raspberry Pi 3 Bluetooth Setup

Thu Mar 17, 2016 1:05 am

[bluetooth]# trust 20:43:00:50:34:8F
Changing 20:43:00:50:34:8F trust succeeded
[bluetooth]# pair 20:43:00:50:34:8F
Attempting to pair with 20:43:00:50:34:8F
Failed to pair: org.bluez.Error.ConnectionAttemptFailed

it's a no go. But i appreciate all of the help from this forum. :D

User avatar
Douglas6
Posts: 4778
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspberry Pi 3 Bluetooth Setup

Thu Mar 17, 2016 1:24 am

Do you have the keyboard in discoverable mode? Make sure it is. Check the manual for the keyboard. Then, in bluetoothctl, start the pairing agent with

Code: Select all

agent on
Then try

Code: Select all

pair <bdaddr>
You'll need to enter the keyboard's PIN; again, consult the keyboard manual. That should get it paired, now trust it

Code: Select all

trust <bdaddr>
if all that works, you should be able to connect.

Code: Select all

connect <bdaddr>

SirMcp
Posts: 5
Joined: Tue Mar 15, 2016 11:42 pm

Re: Raspberry Pi 3 Bluetooth Setup

Thu Mar 17, 2016 11:59 am

[email protected]:~ $ sudo bluetoothctl
[NEW] Controller B8:27:EB:9E:89:00 raspberrypi [default]
[NEW] Device CC:F9:E8:B6:4B:ED SAMSUNG-SGH-I777
[NEW] Device 20:43:00:50:34:8F Bluetooth Keyboard
[bluetooth]# agent on
Agent registered
[bluetooth]# pair 20:43:00:50:34:8F
Attempting to pair with 20:43:00:50:34:8F
[CHG] Device 20:43:00:50:34:8F Connected: yes
[agent] PIN code: 202863
[CHG] Device 20:43:00:50:34:8F Modalias: usb:v0518p1301d0001
[CHG] Device 20:43:00:50:34:8F UUIDs:
00001124-0000-1000-8000-00805f9b34fb
00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 20:43:00:50:34:8F Paired: yes
Pairing successful
[CHG] Device 20:43:00:50:34:8F Connected: no
[bluetooth]# trust 20:43:00:50:34:8F
Changing 20:43:00:50:34:8F trust succeeded
[bluetooth]# connect 20:43:00:50:34:8F
Attempting to connect to 20:43:00:50:34:8F
[CHG] Device 20:43:00:50:34:8F Connected: yes
Connection successful


Thank you for all of the help Douglas6.

ejed
Posts: 2
Joined: Thu Mar 17, 2016 3:02 pm

Re: Raspberry Pi 3 Bluetooth Setup

Thu Mar 17, 2016 3:09 pm

When I run info on my device is says:
Paired: yes
Trusted yes
Connected yes
LegaxyPairing: yes
UUID: Human Interface Device... (00001124-0000.....
UUID: PnP Information (00001200-0000.....
Modalias usb:v05ACp0255d0050

yet still the keyboad doesn't type into my raspian ui. Am I missing a step?

User avatar
Douglas6
Posts: 4778
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Raspberry Pi 3 Bluetooth Setup

Fri Mar 18, 2016 1:15 am

What type of keyboard is it? Keyboards typically describe themselves as 'Bluetooth keyboard' not an HID device. Could it be you're connecting to a track pad instead of the keyboard?

ejed
Posts: 2
Joined: Thu Mar 17, 2016 3:02 pm

Re: Raspberry Pi 3 Bluetooth Setup

Fri Mar 18, 2016 10:47 am

It's an Apple keyboard. I followed again with a fresh install and it worked great. 8-) Thanks. Any advice for getting things to auto pair again after a restart?

Also for noobs like me: I found that within [bluetooth]# it will auto finish commands and device id's or addresses if you just type the first bit and hit tab so it a lot easier (esspecially with scan on) you can type things like:

Code: Select all

[bluetooth]# con[tab] 04[tab]
instead of

Code: Select all

[bluetooth]# connect 04:04:04:04:04:04 

chapas
Posts: 17
Joined: Wed Aug 01, 2012 2:03 pm

Re: Raspberry Pi 3 Bluetooth Setup

Fri Mar 18, 2016 1:43 pm

Installed/connected my Bluetooth controller, but if i turn it off or do a reboot it does not connect automatically.

How to over come this?

( I waste loose so many hours in accomplishing things that seem so simple, that is why i don't deftly move to Linux. :( )

User avatar
chrisoh
Posts: 217
Joined: Sun Dec 06, 2015 8:50 pm
Location: Essex, UK

Re: Raspberry Pi 3 Bluetooth Setup

Fri Mar 18, 2016 2:16 pm

Was in a bit of a rush, but managed to get it working with the new Rii k12 bluetooth keyboard using:

jigneshkerai89's post here
jigneshkerai89 wrote: sudo apt-get install bluetooth bluez blueman
sudo reboot
The GUI showed the keyboard and successfully paired but failed to connect.

So I followed silenced post
silenced wrote: Do try the following:

~~~~
• sudo bluetoothctl
• agent on
• default-agent

make the keyboard discoverable

• scan on

wait...

• pair xx:xx:xx:xx:xx (device id)

(if asked for a "PIN code" -> enter that "PIN code" on your bluetooth keyboard and press ENTER on the bluetooth keyboard)

• trust xx:xx:xx:xx:xx (if not asked for a pin code this may work too)
• connect xx:xx:xx:xx:xx
Enjoy a cuppa
Raspberry Pi 3 model B Idle @ 250mA
  • HDMI +200mA
  • Minecraft 1.9 Server +100mA
  • 2.4Ghz dongle +20mA

typxxi
Posts: 44
Joined: Sat Mar 05, 2016 6:11 pm
Location: GERMANY

Re: Raspberry Pi 3 Bluetooth Setup

Fri Mar 18, 2016 9:53 pm

silenced wrote:
frankymusic wrote:hcitool scan delivers the BT address of my keyboard (20:73:AB:00:0D:C3).

Until "agent on" and "default-agent" everything runs as expected, but...
... the "pair" (together with the address of that keyboard) always says:
20:73:AB:00:0D:C3 not available...
Do try the following:
• sudo bluetoothctl
• agent on
• default-agent
• scan on
• pair xx:xx:xx:xx:xx (device id)
(if asked for a "PIN code" -> enter that "PIN code" on your bluetooth keyboard and press ENTER on the bluetooth keyboard)
• trust xx:xx:xx:xx:xx (if not asked for a pin code this may work too)
• connect xx:xx:xx:xx:xx
GREAT - works exactly as described for my Pi3 Raspbian after I tried it with scan on.

For the future: Does this way still requires the following installation if I have latest Raspbian Image 2016-03-18 already?

sudo apt-get install bluetooth bluez blueman
sudo reboot

Thx a lot :mrgreen:
WOLF

Return to “Troubleshooting”