Forgive me, I’m a serious RP beginner, but I’m having trouble getting Bluetooth working on my Raspberry Pi 3 box. Anything I connect to it through the OSMC GUI (I’ve tried my Galaxy S7 Edge, a Bluetooth keyboard, and a couple other BT devices), and they will all pair and connect and then immediately disconnect. I’ve tried command-line tools, and it acts the exact same way - pairs, connects, and immediately disconnects. I’m running OSMC 2016.11-1 and Kodi 16.1 if that helps. Any advice would be greatly appreciated. Thanks.
Please use the forum search, there are many threads discussing issues with RPi3 bluetooth. Many of these threads have useful suggestions in them.
Should none of these suggestions help, then come back here and list all you have tried and the results of those suggestions.
I definitely understand the response, especially being a noob (I preach RTFM myself), but I’ve researched this issue for several hours on this and other forums before finally deciding to post when there was no solution I could find (that’s definitely not to say I didn’t miss it, though). I’ve read through threads about BT forgetting connections after reboot, BT dongle issues, can’t connect issues, and even the “BlueTooth Mega Thread”, but these weren’t the issue I was having, which is that would connect and then immediately disconnect.
The thread that actually does reference it is this:
It states back in April that the issue should be fixed in the next update, but apparently it wasn’t, and that thread dies with no solution. I’ve unpaired/forgotten connections/rebooted/re-paired ad nauseam (both through the OSMC GUI and the command line), but the result is always the same.
If the update with the fix is still in the works, I understand and can wait for it, but it sounds like it should have at least been fixed in the last update. If there’s a fix I can apply, I’d love to get this working, but if it’s still a known issue with RPi3, I just need to know so I can stop working on it for now.
If you’re trying to stream for A2DP, you need to install the experimental A2DP support first. Support with the internal adapter seems more limited vs external adapters.
Thanks, Sam, but I can’t get anything to stay connected. I had tried my Android phone (Galaxy S7 Edge) first, and when it connected and immediately disconnected I suspected it may be a phone or RPi (or even service provider) limitation on BT connection type. That’s when I tried other, simpler devices (such as a BT keyboard) to see if I could get anything to work, but they’d all do the exact same thing: pair -> connect -> disconnect immediately. Eventually, audio/video streaming would be great, but I’d be happy just to have an BT device connect at this point.
Your phone won’t pair without the A2DP package
Your keyboard probably requires a pairing code, even 0000. Did you try this?
Also try pairing via CLI. It can be more reliable.
This has all been covered.
All devices that I’ve tried so far, including the keyboard, did require a pairing code, and those were all entered correctly and paired successfully and everybody was happy…for about 1.27 seconds when it would disconnect, regardless of the device. When I’d try to reconnect, it would give me an error and say it couldn’t.
I did follow instructions from a couple different threads on connecting through the CLI, but it behaved the same way. Starting from scratch (everything unpaired/forgotten) I could scan, see the devices, pair, connect, and then it would immediately disconnect again - just like in the GUI.
I hadn’t done anything with the A2DP package yet, but I’ll look into that in case it makes a difference for the phone.
Post a log when it disconnects?
I did find a reference to A2DP from last night when I was working on a few different things:
Dec 01 12:40:32 TEXSARCombulance bluetoothd[419]: a2dp-source profile connect failed for 50:C8:E5:A2:97:F4: Protocol not available
Dec 01 12:40:32 TEXSARCombulance mediacenter[309]: â— bluetooth.service - Bluetooth service
Dec 01 12:40:32 TEXSARCombulance mediacenter[309]: Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Dec 01 12:40:32 TEXSARCombulance mediacenter[309]: Drop-In: /etc/systemd/system/bluetooth.service.d
Dec 01 12:40:32 TEXSARCombulance mediacenter[309]: └─local.conf
Dec 01 12:40:32 TEXSARCombulance mediacenter[309]: Active: active (running) since Thu 2016-12-01 01:48:26 CST; 10h ago
Dec 01 12:40:32 TEXSARCombulance mediacenter[309]: Docs: man:bluetoothd(8)
Dec 01 12:40:32 TEXSARCombulance mediacenter[309]: Main PID: 419 (bluetoothd)
Dec 01 12:40:32 TEXSARCombulance mediacenter[309]: Status: "Running"
Dec 01 12:40:32 TEXSARCombulance mediacenter[309]: CGroup: /system.slice/bluetooth.service
Dec 01 12:40:32 TEXSARCombulance mediacenter[309]: └─419 /usr/libexec/bluetooth/bluetoothd
Dec 01 12:40:32 TEXSARCombulance mediacenter[309]: Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
Thinking that perhaps the existence of my phone in the Bluetooth list was possibly causing a problem with the other devices, I cleared out everything so that there were no paired devices, and I was able to successfully connect the BT keyboard and then a BT mouse (which disconnected the keyboard when I did). It worked for about 20-30 seconds and then disconnected. I unpaired both and re-paired the keyboard only, and it also worked for 20-30 seconds and disconnected. So, basically, it’s better, but the same problem still exists.
Also, I’ve unpaired the BT keyboard, and when I try to connect the keyboard from available devices, it allows me to enter the pairing code, it then looks like it accepted the code on the RPi, but it fails immediately and won’t pair or connect. Here are some logs during that process:
Dec 01 13:17:42 TEXSARCombulance mediacenter[348]: disabled
Dec 01 13:17:43 TEXSARCombulance mediacenter[348]: ● bluetooth.service - Bluetooth service
Dec 01 13:17:43 TEXSARCombulance mediacenter[348]: Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Dec 01 13:17:43 TEXSARCombulance mediacenter[348]: Drop-In: /etc/systemd/system/bluetooth.service.d
Dec 01 13:17:43 TEXSARCombulance mediacenter[348]: └─local.conf
Dec 01 13:17:43 TEXSARCombulance mediacenter[348]: Active: active (running) since Thu 2016-12-01 12:17:07 CST; 1h 0min ago
Dec 01 13:17:43 TEXSARCombulance mediacenter[348]: Docs: man:bluetoothd(8)
Dec 01 13:17:43 TEXSARCombulance mediacenter[348]: Main PID: 462 (bluetoothd)
Dec 01 13:17:43 TEXSARCombulance mediacenter[348]: Status: "Running"
Dec 01 13:17:43 TEXSARCombulance mediacenter[348]: CGroup: /system.slice/bluetooth.service
Dec 01 13:17:43 TEXSARCombulance mediacenter[348]: └─462 /usr/libexec/bluetooth/bluetoothd
Dec 01 13:17:43 TEXSARCombulance mediacenter[348]: Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
Dec 01 13:17:50 TEXSARCombulance mediacenter[348]: ● bluetooth.service - Bluetooth service
Dec 01 13:17:50 TEXSARCombulance mediacenter[348]: Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Dec 01 13:17:50 TEXSARCombulance mediacenter[348]: Drop-In: /etc/systemd/system/bluetooth.service.d
Dec 01 13:17:50 TEXSARCombulance mediacenter[348]: └─local.conf
Dec 01 13:17:50 TEXSARCombulance mediacenter[348]: Active: active (running) since Thu 2016-12-01 12:17:07 CST; 1h 0min ago
Dec 01 13:17:50 TEXSARCombulance mediacenter[348]: Docs: man:bluetoothd(8)
Dec 01 13:17:50 TEXSARCombulance mediacenter[348]: Main PID: 462 (bluetoothd)
Dec 01 13:17:50 TEXSARCombulance mediacenter[348]: Status: "Running"
Dec 01 13:17:50 TEXSARCombulance mediacenter[348]: CGroup: /system.slice/bluetooth.service
Dec 01 13:17:50 TEXSARCombulance mediacenter[348]: └─462 /usr/libexec/bluetooth/bluetoothd
Dec 01 13:17:50 TEXSARCombulance mediacenter[348]: Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
Dec 01 13:17:55 TEXSARCombulance mediacenter[348]: ● bluetooth.service - Bluetooth service
Dec 01 13:17:55 TEXSARCombulance mediacenter[348]: Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Dec 01 13:17:55 TEXSARCombulance mediacenter[348]: Drop-In: /etc/systemd/system/bluetooth.service.d
Dec 01 13:17:55 TEXSARCombulance mediacenter[348]: └─local.conf
Dec 01 13:17:55 TEXSARCombulance mediacenter[348]: Active: active (running) since Thu 2016-12-01 12:17:07 CST; 1h 0min ago
Dec 01 13:17:55 TEXSARCombulance mediacenter[348]: Docs: man:bluetoothd(8)
Dec 01 13:17:55 TEXSARCombulance mediacenter[348]: Main PID: 462 (bluetoothd)
Dec 01 13:17:55 TEXSARCombulance mediacenter[348]: Status: "Running"
Dec 01 13:17:55 TEXSARCombulance mediacenter[348]: CGroup: /system.slice/bluetooth.service
Dec 01 13:17:55 TEXSARCombulance mediacenter[348]: └─462 /usr/libexec/bluetooth/bluetoothd
Dec 01 13:17:55 TEXSARCombulance mediacenter[348]: Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
Dec 01 13:18:43 TEXSARCombulance mediacenter[348]: ● bluetooth.service - Bluetooth service
Dec 01 13:18:43 TEXSARCombulance mediacenter[348]: Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Dec 01 13:18:43 TEXSARCombulance mediacenter[348]: Drop-In: /etc/systemd/system/bluetooth.service.d
Dec 01 13:18:43 TEXSARCombulance mediacenter[348]: └─local.conf
Dec 01 13:18:43 TEXSARCombulance mediacenter[348]: Active: active (running) since Thu 2016-12-01 12:17:07 CST; 1h 1min ago
Dec 01 13:18:43 TEXSARCombulance mediacenter[348]: Docs: man:bluetoothd(8)
Dec 01 13:18:43 TEXSARCombulance mediacenter[348]: Main PID: 462 (bluetoothd)
Dec 01 13:18:43 TEXSARCombulance mediacenter[348]: Status: "Running"
Dec 01 13:18:43 TEXSARCombulance mediacenter[348]: CGroup: /system.slice/bluetooth.service
Dec 01 13:18:43 TEXSARCombulance mediacenter[348]: └─462 /usr/libexec/bluetooth/bluetoothd
Dec 01 13:18:43 TEXSARCombulance mediacenter[348]: Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
Dec 01 13:19:34 TEXSARCombulance mediacenter[348]: ● bluetooth.service - Bluetooth service
Dec 01 13:19:34 TEXSARCombulance mediacenter[348]: Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Dec 01 13:19:34 TEXSARCombulance mediacenter[348]: Drop-In: /etc/systemd/system/bluetooth.service.d
Dec 01 13:19:34 TEXSARCombulance mediacenter[348]: └─local.conf
Dec 01 13:19:34 TEXSARCombulance mediacenter[348]: Active: active (running) since Thu 2016-12-01 12:17:07 CST; 1h 2min ago
Dec 01 13:19:34 TEXSARCombulance mediacenter[348]: Docs: man:bluetoothd(8)
Dec 01 13:19:34 TEXSARCombulance mediacenter[348]: Main PID: 462 (bluetoothd)
Dec 01 13:19:34 TEXSARCombulance mediacenter[348]: Status: "Running"
Dec 01 13:19:34 TEXSARCombulance mediacenter[348]: CGroup: /system.slice/bluetooth.service
Dec 01 13:19:34 TEXSARCombulance mediacenter[348]: └─462 /usr/libexec/bluetooth/bluetoothd
Dec 01 13:19:34 TEXSARCombulance mediacenter[348]: Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
Dec 01 13:19:49 TEXSARCombulance mediacenter[348]: ● bluetooth.service - Bluetooth service
Dec 01 13:19:49 TEXSARCombulance mediacenter[348]: Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
Dec 01 13:19:49 TEXSARCombulance mediacenter[348]: Drop-In: /etc/systemd/system/bluetooth.service.d
Dec 01 13:19:49 TEXSARCombulance mediacenter[348]: └─local.conf
Dec 01 13:19:49 TEXSARCombulance mediacenter[348]: Active: active (running) since Thu 2016-12-01 12:17:07 CST; 1h 2min ago
Dec 01 13:19:49 TEXSARCombulance mediacenter[348]: Docs: man:bluetoothd(8)
Dec 01 13:19:49 TEXSARCombulance mediacenter[348]: Main PID: 462 (bluetoothd)
Dec 01 13:19:49 TEXSARCombulance mediacenter[348]: Status: "Running"
Dec 01 13:19:49 TEXSARCombulance mediacenter[348]: CGroup: /system.slice/bluetooth.service
Dec 01 13:19:49 TEXSARCombulance mediacenter[348]: └─462 /usr/libexec/bluetooth/bluetoothd
Dec 01 13:19:49 TEXSARCombulance mediacenter[348]: Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
Dec 01 13:19:51 TEXSARCombulance mediacenter[348]: disabled
Please forgive me if I’m including too much - I’m not really understanding what I’m looking at, so I wanted to make sure I provided enough data to help diagnose.
What’s the range?
What does connmanctl say when it drops? Does it still think it’s connected?
Are the batteries good?
The range is 1-2 feet, the batteries are charged on all the devices I’ve attempted, and I also plugged in the keyboard to a power source at times just to be sure. All had the same result.
I’m not familiar with connmanctl, but I started it and ran “enable bluetooth”, and it said “Error bluetooth: Already enabled”. Are there other commands I can use to get more information?
These would likely be the commands you want to use. What were the outputs and the logs displaying what happens when you use them?
I was using bluetoothctl before, and I tried it again just now. It has no problem scanning for devices, viewing the device information, controller status, etc. When I attempted to pair with the BT keyboard it alternated between “[CHG] Device 10:…:4B Connected: yes” and “[CHG] Device 10:…:4B Connected: no” a few times over a few seconds before giving a “Failed to pair: org.bluez.Error.AuthenticationFailed” error. I tried this with both a BT keyboard and mouse with the same result. I was also able to view the device information at will, so I feel fairly confident the devices are still consistently available.
OK, I downloaded NOOBS on a completely separate SD card and installed Raspbian from scratch, and when I tried connecting my phone (through the Raspbian GUI) it connected but gave me a much friendlier “services not available for this device” type of message and then disconnected.
I then tried pairing my BT keyboard, and it connected fine, worked for about 30 seconds, and then disconnected. When I tried reconnecting it gave me this error: “Connection failed - GDBus.Error.org.bluez.Error.Failed: Input/output error”
So, two different operating systems on different cards acting much the same way when it comes to Bluetooth. Do you think this pretty much points to a hardware problem?
Yes
Copy that, thanks. This is my first foray into the world of Raspberry Pi’s - are hardware defects somewhat prevalent with them, or did I just get unlucky with mine?
Considering how many they have sold and the few reports, I would say they are pretty reliable. They are well below the standard acceptable failure rate for consumer electronics; or at least the ones that leave the factory are.
Excellent - thanks, Sam. That gives me confidence that getting another RPi to replace this one will solve my problem. I appreciate all the help.
The Pi3 is less than one year old… you can return it for a replacement as per your rights.
Is your power supply powerful enough? I have a couple older (under powered) power supplies that seem to power power the Pi just fine UNTIL I try and connect anything to it…then wonky things happen.