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

Problems with latest Bluetooth code

Mon Oct 30, 2017 11:38 pm

I've spent just a few hours on this, but am experiencing strange behavior with today's

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade
When performed on my current system, things looked promising briefly. But then (perhaps after a power-cycle?) running bluetoothctl, it would respond with 'waiting to connect to bluetoothd' and then immediately overwrite that message with the '[bluetooth] #' prompt. 'sudo bluetoothctl' seemed to work, but I couldn't connect to the speaker that was previously working. I tried to remove BlueZ and install again, but that left the system unable to see the adapter (hci0).

So, I imaged a new card with the 2017-08-16-raspbian-stretch image. I again did a

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade
and reboot, and this time, from the start, bluetoothctl is responding again with 'waiting to connect to bluetoothd' again overwritten by the bluetoothctl prompt. 'sudo bluetoothctl' appears to work normally. The adapter is up, and bluetoothd seems to be running normally.

Very odd, so I thought I'd bring it up.

drgeoff
Posts: 8015
Joined: Wed Jan 25, 2012 6:39 pm

Re: Problems with latest Bluetooth code

Tue Oct 31, 2017 11:13 am

Maybe not totally unconnected with what jamesh posted at viewtopic.php?f=28&t=196529&p=1228787#p1228787

B.Goode
Posts: 5607
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Problems with latest Bluetooth code

Tue Oct 31, 2017 12:04 pm

drgeoff wrote:
Tue Oct 31, 2017 11:13 am
Maybe not totally unconnected with what jamesh posted at viewtopic.php?f=28&t=196529&p=1228787#p1228787
Isn't that exactly what the thread title and introductory sentence refer to...

[Subsequent edit: Oops, no, jumped to conclusions. I was referring to the Announcement at viewtopic.php?f=63&t=187256&p=1228724#p1228724 - I assumed @Douglas6 was doing the same.]
Last edited by B.Goode on Tue Oct 31, 2017 12:21 pm, edited 1 time in total.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5069
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Problems with latest Bluetooth code

Tue Oct 31, 2017 12:17 pm

That thread is about pulseaudio problems. There hasn't been enough information provided to be able to link the two threads.

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

Re: Problems with latest Bluetooth code

Tue Oct 31, 2017 1:08 pm

Well the first link is about audio streaming (not necessarily PulseAudio, which is no longer used.) But yes, I wanted to test the new Bluetooth patches that jamesh announced. No luck. The problem I experienced was strictly with bluetoothctl, and seemingly only when run under the 'pi' user.

I'll try to test with a later version of Raspbian today, in between scary movies.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5069
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Problems with latest Bluetooth code

Tue Oct 31, 2017 1:12 pm

Douglas6 wrote:
Tue Oct 31, 2017 1:08 pm
Well the first link is about audio streaming (not necessarily PulseAudio, which is no longer used.) But yes, I wanted to test the new Bluetooth patches that jamesh announced. No luck. The problem I experienced was strictly with bluetoothctl, and seemingly only when run under the 'pi' user.

I'll try to test with a later version of Raspbian today, in between scary movies.
A few of us have tried to reproduce the problem at the office and haven't been able to. If you manage it again, it would be nice to know the exact steps required.

Edit: Note that a reboot is required after the upgrade.

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

Re: Problems with latest Bluetooth code

Tue Oct 31, 2017 1:25 pm

My first post described the steps pretty completely.
1. Burn an SD with 2017-08-17-raspbian-stretch.
2. Run sudo apt-get update and sudo apt-get dist-upgrade.
3. Reboot.
4. Run bluetoothctl as user pi. Receive a 'Trying to connect to bluetoothd...' error.

I didn't test it before the upgrade, I'll do that now. Perhaps a hardware problem occurred coincidentally. But again, the adapter and bluetoothd are reporting normally.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1687
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Problems with latest Bluetooth code

Tue Oct 31, 2017 1:36 pm

For completeness, which platform are you testing on?

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

Re: Problems with latest Bluetooth code

Tue Oct 31, 2017 1:45 pm

Sorry, yes. Pi3B, with on-board Bluetooth chip. Also, via SSH, over WiFi.
[EDIT: Also, if I recall, I set it to boot to command line, right about the time the error began.]

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5069
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Problems with latest Bluetooth code

Tue Oct 31, 2017 2:15 pm

Douglas6 wrote:
Tue Oct 31, 2017 1:25 pm
My first post described the steps pretty completely.
1. Burn an SD with 2017-08-17-raspbian-stretch.
2. Run sudo apt-get update and sudo apt-get dist-upgrade.
3. Reboot.
4. Run bluetoothctl as user pi. Receive a 'Trying to connect to bluetoothd...' error.

I didn't test it before the upgrade, I'll do that now. Perhaps a hardware problem occurred coincidentally. But again, the adapter and bluetoothd are reporting normally.
Previously I was testing with the latest image and everything just worked. Testing with the image you're using and the instructions you gave above, it's still fine.

You'd lose the devices you had already paired because the older image had a hardcoded BT MAC address, which is now calculated from the pi's serial number.

EDIT: Just tried booting to CLI only and using bluetoothctl over ssh. Still no issues.

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

Re: Problems with latest Bluetooth code

Tue Oct 31, 2017 2:21 pm

Ok, that explains some of my results (I forgot about the bdaddr changes.) Still doesn't explain my 'waiting to connect to bluetoothd' error when using bluetoothctl as pi, but not under sudo. I'm burning the latest image now, and will continue my testing.

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

Re: Problems with latest Bluetooth code

Tue Oct 31, 2017 4:07 pm

I was not able to reproduce my previous problems, with the latest Raspbian. I'll keep looking into it. Meanwhile, the new Bluetooth code looks promising. I'm currently streaming from an internet radio station over Wi-Fi and broadcasting it to a Bluetooth speaker. In almost an hour, no stoppages, and a minimal amount of glitching, which could be attributed to the server, my shoddy network, or Bluetooth in general.

Return to “Troubleshooting”

Who is online

Users browsing this forum: No registered users and 8 guests