User avatar
Imperf3kt
Posts: 903
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: STICKY: Bluetooth not working after update - need info

Sat Sep 02, 2017 5:51 am

This is really starting to enrage me, but I'll try to keep it civil.

Sometimes bluetooth works flawlessly, but if I leave my bluetooth keyboard idle too long, it disconnects as a battery saving feature. It will never connect again until I restart.
I could live with that, annoying as it was, but I just updated raspi-config, did a sudo apt-get update and upgrade and when I connected my keyboard it worked fine, headphones too.
Then thevkeyboard did its power saving thing and I tried to reconnect it, it refuses stating "already connected" at which point I tried to disconnect it.
Nothing, it just says "disconnecting" for many minutes.
After rebooting and trying to connect either my headphones or keyboard, I get the following error message.
"connection failed - GDBus.Error.org.bluez.Error.Failed: Input/output error"
Which is the error I always see when trying to reconnect, except now it says this even on the first connection attempt of any bluetooth device.

I opened a terminal and using my onscreen keyboard typed bluetoothctl
The devices list shows 'new' and lists the two devices as it should.
Then I type show and get this:
Image


I can only conclude bluetooth on the Pi is so cheap that it doesn't work.
Stephen Hawking, rest in peace.
8 January 1942 – 14 March 2018

jmorrison
Posts: 2
Joined: Tue Sep 05, 2017 7:16 pm

Re: STICKY: Bluetooth not working after update - need info

Tue Sep 05, 2017 7:33 pm

I am having problems after upgrading.

I was able to connect to a bluetooth LE device with gatttool before upgrading, and now it doesn't connect.
I have a CSR 8510 usb dongle plugged into a Pi2


While the upgrade was running it logged the packages mostly successful but also logged errors about running out of disk space.
I thought the scripts/dpkg or whatever would abort instead of charging on with an upgrade and not enough space. Why wouldn't the debian scripts check for disk space on a system with only 8G space? Is this a bug with dpkg/aptitude?

Code: Select all

uname -a
Linux raspberrypi2 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux

root@raspberrypi2:/boot# gatttool -b C8:FD:19:9C:D5:00 -I
[C8:FD:19:9C:D5:00][LE]> connect
Attempting to connect to C8:FD:19:9C:D5:00
Error: connect error: Transport endpoint is not connected (107)
[C8:FD:19:9C:D5:00][LE]>
The Pi was acting slow at times and ok at other times. Dmesg shows mmc_rescan errors. Some google results blame flash problems for this but things were working fine before the upgrade. I came across a linux patch for the mmc driver to reset it, so I suppose there's a chance it's the kernel/driver.

Unfortunately I didn't save a disk image of the flash card, so rolling back won't be so easy.

Code: Select all

[ 1349.613808] INFO: task kworker/3:2:86 blocked for more than 120 seconds.
[ 1349.613825]       Not tainted 4.9.35-v7+ #1014
[ 1349.613831] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 1349.613838] kworker/3:2     D    0    86      2 0x00000000
[ 1349.613875] Workqueue: events_freezable mmc_rescan
[ 1349.613915] [<807146b0>] (__schedule) from [<80714bd4>] (schedule+0x50/0xa8)
[ 1349.613935] [<80714bd4>] (schedule) from [<805b6c5c>] (__mmc_claim_host+0xb8/0x1cc)
[ 1349.613952] [<805b6c5c>] (__mmc_claim_host) from [<805b6da0>] (mmc_get_card+0x30/0x34)
[ 1349.613971] [<805b6da0>] (mmc_get_card) from [<805bf830>] (mmc_sd_detect+0x2c/0x80)
[ 1349.613990] [<805bf830>] (mmc_sd_detect) from [<805b9a64>] (mmc_rescan+0x1c8/0x38c)
[ 1349.614013] [<805b9a64>] (mmc_rescan) from [<80136660>] (process_one_work+0x158/0x454)
[ 1349.614035] [<80136660>] (process_one_work) from [<801369c0>] (worker_thread+0x64/0x568)
[ 1349.614054] [<801369c0>] (worker_thread) from [<8013c8c8>] (kthread+0x10c/0x124)
[ 1349.614073] [<8013c8c8>] (kthread) from [<80108148>] (ret_from_fork+0x14/0x2c)

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

Re: STICKY: Bluetooth not working after update - need info

Tue Sep 05, 2017 9:28 pm

Have you tried using bluetoothctl? I believe all of the gatttool functionality has been swept up into the new version of bluetoothctl.

jmorrison
Posts: 2
Joined: Tue Sep 05, 2017 7:16 pm

Re: STICKY: Bluetooth not working after update - need info

Tue Sep 05, 2017 10:44 pm

Code: Select all

[NEW] Device C8:FD:19:9C:D5:00 CONSOLE
[CHG] Controller 00:1B:41:A4:BF:03 Discovering: no
Attempting to connect to C8:FD:19:9C:D5:00
Failed to connect: org.bluez.Error.Failed
I believe all of the gatttool functionality has been swept up into the new version of bluetoothctl.
Do you have any references for that? Anyway it worked before with gatttool

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

Re: STICKY: Bluetooth not working after update - need info

Tue Sep 05, 2017 10:53 pm

Not much more than typing 'help' into bluetoothctl, and messing around a bit with an HM-10. Is the BLE device advertising itself as connectable?

andrei.carp
Posts: 2
Joined: Fri Sep 15, 2017 1:38 pm
Location: Iași, România

Re: STICKY: Bluetooth not working after update - need info

Sat Sep 16, 2017 9:56 am

Hello!

I'm also having troubles with the Bluetooth on board Raspberry PI3. I'm currently running the latest Raspbian OS (just downloaded a fresh image yesterday) in desktop mode. I can't get Bluetooth to work and I tried lots of stuff that I read in this thread.
I'm starting to think that maybe I have a defective chip, although wireless seems to work fine.

I'm pretty rusty with Linux, I haven't used it since my college years (about 11 years ago). Could you please help me diagnose my board? To check if I'm facing a hardware problem or not?

Best regards,
Andrei

User avatar
HenryReynolds
Posts: 3
Joined: Wed Aug 16, 2017 1:34 pm

Re: STICKY: Bluetooth not working after update - need info

Sun Sep 17, 2017 12:50 pm

w0w thanks for many reply, I love reading it.

johndavies
Posts: 147
Joined: Fri Dec 20, 2013 1:00 pm

Re: STICKY: Bluetooth not working after update - need info

Fri Sep 29, 2017 11:03 pm

I had great difficulty in the past trying to get bluetooth to work and gave up trying because my successes were so rare and other people were having similar problems. I do not have a bluetooth keyboard or a mouse and can only test audio. I am not technically minded and may not explain things very clearly. So far I have only added Stretch to my Raspberry Pi 2 which has a Plugable 4.0 Bluetooth adapter to provide bluetooth access. Typing "bluetoothctl" and then "scan on" seems to provide a bluetooth connection very quickly. You need to choose your bluetooth speaker output via a right click on the speaker icon on the top line. Audio from Absolute Radio and radio from BBC iplayer come through a beatspill speaker very clearly. Audio played via omxplayergui only comes through the television as normal. Typing "omxplayer -o alsa http://radio URL or the path to a video" allows the sound to come through a bluetooth speaker. There is no problem with the radio sound output but video and sound have not been synchronised. I realise that the Raspberry PI 2 is less powerful than the Raspberry Pi 3. Next I shall try to play mpc/mpd through a bluetooth speaker. If any one has found a simple way of doing this, or of using omxplayergui to provide a bluetooth output I would appreciate their advice.
Last edited by johndavies on Fri Sep 29, 2017 11:34 pm, edited 1 time in total.

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

Re: STICKY: Bluetooth not working after update - need info

Fri Sep 29, 2017 11:21 pm

You just won't get good synchronization with video and Bluetooth audio on a Pi unless you use a video player that has an adjustable delay. I'm not familiar with omxplayergui, but I suspect it is older than the omxplayer version that includes the -o option. You may be able to modify the source code.

alnaseh
Posts: 38
Joined: Thu Jun 23, 2016 5:12 am

Re: STICKY: Bluetooth not working after update - need info

Mon Mar 19, 2018 2:21 pm

Hi,

I have issues with the new release of raspbian (2018-03-13-raspbian-stretch-lite)

My speaker was working fine previously ( i do not recall which version was it). now im trying to connect to the device but no luck.

It is giving me

Code: Select all

raspberrypi bluetoothd[394]: a2dp-sink profile connect failed for 11:75:58:0D:84:4A: Protocol not available
I tried many things including downgrade the bluez to 5.23 as mentioned in some of the threads here. no luck


any advise is appreciated

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

Re: STICKY: Bluetooth not working after update - need info

Mon Mar 19, 2018 3:25 pm

I'm not sure if BlueALSA is included in the Raspbian Lite distribution. I think not. Google for a solution to install and enable BlueALSA.

alnaseh
Posts: 38
Joined: Thu Jun 23, 2016 5:12 am

Re: STICKY: Bluetooth not working after update - need info

Mon Mar 19, 2018 3:59 pm

Douglas6 wrote:
Mon Mar 19, 2018 3:25 pm
I'm not sure if BlueALSA is included in the Raspbian Lite distribution. I think not. Google for a solution to install and enable BlueALSA.

much appreciated. it works now.

alnaseh
Posts: 38
Joined: Thu Jun 23, 2016 5:12 am

Re: STICKY: Bluetooth not working after update - need info

Wed Mar 21, 2018 6:03 pm

Hi,

i faced another issue. currently the bluetooth speaker is working fine while configuring .asoundrc to:

Code: Select all

pcm.!default {
        type plug
        slave.pcm {
                type bluealsa
                device 11:75:58:0D:84:4A
                profile "a2dp"
        }
}
it works fine with aplay. on the other hand, gstreamer autoaudiosink is still redirected to the 3.5mm jack instead of the bluetooth device.

How can we make the bluetooth device the default for any output.

alnaseh
Posts: 38
Joined: Thu Jun 23, 2016 5:12 am

Re: STICKY: Bluetooth not working after update - need info

Thu Mar 22, 2018 3:54 am

alnaseh wrote:
Wed Mar 21, 2018 6:03 pm
Hi,

i faced another issue. currently the bluetooth speaker is working fine while configuring .asoundrc to:

Code: Select all

pcm.!default {
        type plug
        slave.pcm {
                type bluealsa
                device 11:75:58:0D:84:4A
                profile "a2dp"
        }
}
it works fine with aplay. on the other hand, gstreamer autoaudiosink is still redirected to the 3.5mm jack instead of the bluetooth device.

How can we make the bluetooth device the default for any output.
it seems that gstreamer couldn't find bluez package to compile the bluez module to allow this.

Code: Select all

No package 'bluez' found
i tried to install bluez-utils but it seems that raspberry is missing this lib, hence gstreamer is not working properly with bluez.

did anyone manage to get it right in the latest raspbian (gstreamer + bluetooth)?

alnaseh
Posts: 38
Joined: Thu Jun 23, 2016 5:12 am

Re: STICKY: Bluetooth not working after update - need info

Sat Mar 24, 2018 5:51 pm

alnaseh wrote:
Thu Mar 22, 2018 3:54 am
it seems that gstreamer couldn't find bluez package to compile the bluez module to allow this.

Code: Select all

No package 'bluez' found
i tried to install bluez-utils but it seems that raspberry is missing this lib, hence gstreamer is not working properly with bluez.

did anyone manage to get it right in the latest raspbian (gstreamer + bluetooth)?
OK. it seems it was simple, i just need to install bluealsa & libasound2-dev

toaruScar
Posts: 1
Joined: Sun Apr 08, 2018 10:56 pm

Re: Bluetooth not working after update - information needed!

Sun Apr 08, 2018 11:01 pm

timjstone wrote:
Thu May 19, 2016 7:44 am
More info
running "sudo systemctl status hciuart.service -l " gives the following
it seems to fail to talk to the module

pi@raspberrypi:~ $ sudo systemctl status hciuart.service -l ● hciuart.service - Configure Bluetooth Modems connected by UART
Loaded: loaded (/lib/systemd/system/hciuart.service; enabled)
Active: failed (Result: exit-code) since Wed 2016-05-18 21:13:31 UTC; 10h ago
Process: 1059 ExecStart=/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow - (code=exited, status=1/FAILURE)

May 18 21:13:31 raspberrypi hciattach[1059]: Initialization timed out.
May 18 21:13:31 raspberrypi hciattach[1059]: bcm43xx_init
May 18 21:13:31 raspberrypi systemd[1]: hciuart.service: control process exited, code=exited status=1
May 18 21:13:31 raspberrypi systemd[1]: Failed to start Configure Bluetooth Modems connected by UART.
May 18 21:13:31 raspberrypi systemd[1]: Unit hciuart.service entered failed state.
I run in to this problem on a raspberry pi 3B+.
I connected to a bluetooth speaker and plays music through it. After a while (1-2 hour), the speaker went silent, and above happens. A reboot will fix this problem but it's annoying that this keeps coming back.

becklo
Posts: 1
Joined: Wed May 02, 2018 9:55 am

Re: STICKY: Bluetooth not working after update - need info

Wed May 02, 2018 10:03 am

Hi, I am facing troubles with the bluetooth on my raspberry pi 3. After a clean install of the last Raspbian (2018-04-18-raspbian-stretch) when I click the Bluetooth logo on my taskbar it displays "no bluetooth adapter found".
When I try bluetoothctl it says "waiting for bluetoothd".
When I start it manually using "sudo systemctl start bluetooth", the status is active but when I retry bluetoothctl it says "no controller available".
According to the status of hciuart.service it is a timeout of the initialization of bcm43xx.
Also, the hciconfig command returns nothing and command like sudo hciconfig hci0 up returns 'Can't get device: No such device'.
Does anyone faced this problem ? How can I fix this ?

Best regards.

marthasimons
Posts: 2
Joined: Fri May 04, 2018 11:31 am
Location: USA California

Re: STICKY: Bluetooth not working after update - need info

Fri May 04, 2018 11:34 am

i have this problem to :cry:

julien.launay
Posts: 51
Joined: Wed Mar 30, 2016 5:22 am

Re: STICKY: Bluetooth not working after update - need info

Mon Jun 04, 2018 5:28 pm

Hello,

When I pair between my smartphone and raspberry bluetooth on stretch, the icon that appears in the list of bluetooth on my smarphone is in the form of headphones and microphone.
Whereas under jessie it was a classic rectangle. It works perfectly on jessie, not on stretch.
So you can not use rfcomm and do data transfer. I feel we can only make audio connections on stretch! I do not understand anything, because it worked perfectly under Jessie. But since the arrival of Stretch, nothing else works. Do you have a solution.

I try sudo rfcomm watch hci0
I use on my smartphone the bluetooth client appli bluetooth serial controller. When I clic on connect, it says unable to connect! In fact When I use bluetoothctl at the same time I could see connected YES and 1 s after connected NO. This manipulation works perfectly on Jessie version, not on stretch. I this we can only transfert audio data! Do you have a solution to deseable Audio profi on stretch!?l

Thanks to help me.
Your sincerely.

Julien Launay

julien.launay
Posts: 51
Joined: Wed Mar 30, 2016 5:22 am

Re: STICKY: Bluetooth not working after update - need info

Mon Jun 04, 2018 5:43 pm

Hello.
Do you know if A2DP bluetooth agent is already install in stretch version. I don't want my raspberry pi to be paired as a audio device.
So I this I have to unistall A2DP to not to have a headless icone on my smartphone when I pair.
Thanks to your help.
https://gist.github.com/mill1000/74c747 ... e9994ff84c

Regards.

Julien

Return to “Troubleshooting”

Who is online

Users browsing this forum: zsarge09 and 60 guests