User avatar
bob_binz
Posts: 441
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Error with bluetooth / bluez

Sat May 26, 2012 4:07 pm

Hi

Just tried

Code: Select all

sudo apt-get install bluetooth bluez-utils
and received the following

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  bluez dbus gir1.2-glib-2.0 libcap-ng0 libgirepository-1.0-1
  libsystemd-login0 python-dbus python-dbus-dev python-gi
Suggested packages:
  dbus-x11 python-dbus-doc python-dbus-dbg python-gi-cairo
Recommended packages:
  bluez-alsa bluez-cups bluez-gstreamer
The following NEW packages will be installed:
  bluetooth bluez bluez-utils dbus gir1.2-glib-2.0 libcap-ng0
  libgirepository-1.0-1 libsystemd-login0 python-dbus python-dbus-dev
  python-gi
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,450 kB of archives.
After this operation, 5,946 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://archive.raspbian.org/raspbian/ wheezy/main libcap-ng0 armhf 0.6.6-1 [12.0 kB]
Get:2 http://archive.raspbian.org/raspbian/ wheezy/main libsystemd-login0 armhf 37-1.1 [23.6 kB]
Get:3 http://archive.raspbian.org/raspbian/ wheezy/main dbus armhf 1.5.12-1 [348 kB]
Get:4 http://archive.raspbian.org/raspbian/ wheezy/main libgirepository-1.0-1 armhf 1.32.1-1 [96.0 kB]
Get:5 http://archive.raspbian.org/raspbian/ wheezy/main gir1.2-glib-2.0 armhf 1.32.1-1 [170 kB]
Get:6 http://archive.raspbian.org/raspbian/ wheezy/main python-gi armhf 3.2.0-3 [479 kB]
Get:7 http://archive.raspbian.org/raspbian/ wheezy/main python-dbus-dev all 1.1.0-1 [108 kB]
Get:8 http://archive.raspbian.org/raspbian/ wheezy/main python-dbus armhf 1.1.0-1 [244 kB]
Get:9 http://archive.raspbian.org/raspbian/ wheezy/main bluez armhf 4.99-2 [895 kB]
Get:10 http://archive.raspbian.org/raspbian/ wheezy/main bluetooth all 4.99-2 [37.5 kB]
Get:11 http://archive.raspbian.org/raspbian/ wheezy/main bluez-utils all 4.99-2 [37.4 kB]
Fetched 2,450 kB in 8s (286 kB/s)                                              
Selecting previously unselected package libcap-ng0.
(Reading database ... 39713 files and directories currently installed.)
Unpacking libcap-ng0 (from .../libcap-ng0_0.6.6-1_armhf.deb) ...
Selecting previously unselected package libsystemd-login0.
Unpacking libsystemd-login0 (from .../libsystemd-login0_37-1.1_armhf.deb) ...
Selecting previously unselected package dbus.
Unpacking dbus (from .../dbus_1.5.12-1_armhf.deb) ...
Selecting previously unselected package libgirepository-1.0-1.
Unpacking libgirepository-1.0-1 (from .../libgirepository-1.0-1_1.32.1-1_armhf.deb) ...
Selecting previously unselected package gir1.2-glib-2.0.
Unpacking gir1.2-glib-2.0 (from .../gir1.2-glib-2.0_1.32.1-1_armhf.deb) ...
Selecting previously unselected package python-gi.
Unpacking python-gi (from .../python-gi_3.2.0-3_armhf.deb) ...
Selecting previously unselected package python-dbus-dev.
Unpacking python-dbus-dev (from .../python-dbus-dev_1.1.0-1_all.deb) ...
Selecting previously unselected package python-dbus.
Unpacking python-dbus (from .../python-dbus_1.1.0-1_armhf.deb) ...
Selecting previously unselected package bluez.
Unpacking bluez (from .../bluez_4.99-2_armhf.deb) ...
Selecting previously unselected package bluetooth.
Unpacking bluetooth (from .../bluetooth_4.99-2_all.deb) ...
Selecting previously unselected package bluez-utils.
Unpacking bluez-utils (from .../bluez-utils_4.99-2_all.deb) ...
Processing triggers for man-db ...
Setting up libcap-ng0 (0.6.6-1) ...
Setting up libsystemd-login0 (37-1.1) ...
Setting up dbus (1.5.12-1) ...
[ ok ] Starting system message bus: dbus.
Setting up libgirepository-1.0-1 (1.32.1-1) ...
Setting up gir1.2-glib-2.0 (1.32.1-1) ...
Setting up python-gi (3.2.0-3) ...
Setting up python-dbus-dev (1.1.0-1) ...
Setting up python-dbus (1.1.0-1) ...
Remove stale byte-compiled files...
Setting up bluez (4.99-2) ...
[ ok ] Reloading system message bus config...done.
[....] Starting bluetooth:Segmentation fault
invoke-rc.d: initscript bluetooth, action "start" failed.
dpkg: error processing bluez (--configure):
 subprocess installed post-installation script returned error exit status 139
dpkg: dependency problems prevent configuration of bluetooth:
 bluetooth depends on bluez; however:
  Package bluez is not configured yet.
dpkg: error processing bluetooth (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of bluez-utils:
 bluez-utils depends on bluetooth; however:
  Package bluetooth is not configured yet.
dpkg: error processing bluez-utils (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 bluez
 bluetooth
 bluez-utils
E: Sub-process /usr/bin/dpkg returned an error code (1)
Is this a raspbian problem or a me problem?

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA

Re: Error with bluetooth / bluez

Sat May 26, 2012 9:38 pm

Unknown at this time what is causing the problem. These bluetooth packages were giving problems to the autobuilders and I built them manually to clear up some dependencies. It's possible the package was incorrectly built when I built it. I have a bluetooth USB dongle I was looking at getting to work and I'll take a look at this within the next day or two and see if I can track down what the issue might be.

louisb
Posts: 47
Joined: Wed Mar 07, 2012 7:08 am

Re: Error with bluetooth / bluez

Wed May 30, 2012 11:05 pm

mpthompson wrote:Unknown at this time what is causing the problem. These bluetooth packages were giving problems to the autobuilders and I built them manually to clear up some dependencies. It's possible the package was incorrectly built when I built it. I have a bluetooth USB dongle I was looking at getting to work and I'll take a look at this within the next day or two and see if I can track down what the issue might be.
I also get a segfault on bluez. here is the back trace:

Code: Select all

Program received signal SIGSEGV, Segmentation fault.
0x4015b014 in ?? () from /usr/lib/libcap-ng.so.0
(gdb) bt
#0  0x4015b014 in ?? () from /usr/lib/libcap-ng.so.0
#1  0x400121c0 in __tls_get_addr () from /lib/arm-linux-gnueabihf/ld-linux.so.3
#2  0x4015b220 in capng_clear () from /usr/lib/libcap-ng.so.0
#3  0x4015b220 in capng_clear () from /usr/lib/libcap-ng.so.0
#4  0x2a00c618 in main (argc=1073782848, argv=0xb) at src/main.c:451


running readelf -A /usr/lib/libcap-ng.so.0 using readelf -A I get:

Code: Select all

raspbian@pisces:/etc/init.d$ readelf -A /usr/lib/libcap-ng.so.0.0.0
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "6"
  Tag_CPU_arch: v6
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-1
  Tag_FP_arch: VFPv2
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align_needed: 8-byte
  Tag_ABI_align_preserved: 8-byte, except leaf SP
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_VFP_args: VFP registers
  Tag_ABI_optimization_goals: Aggressive Speed
  Tag_DIV_use: Not allowed
should it really have Tag_ABI_optimization_goals: Aggressive Speed?

Hope this helps.

Louis

mauimauer
Posts: 1
Joined: Mon Jun 04, 2012 6:28 pm

Re: Error with bluetooth / bluez

Mon Jun 04, 2012 6:30 pm

Check: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631807
The attached patch worked on my RPi with Raspbian.

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA

Re: Error with bluetooth / bluez

Tue Jun 05, 2012 6:28 am

I've been documenting this problem and following this bug in the Raspbian bug base here:

https://bugs.launchpad.net/raspbian/+bug/1008593

I'm glad a potential fix was found. I'll make the suggested changes to the packages, rebuild them and put them into our repository in the next 24 hours or so.

User avatar
bob_binz
Posts: 441
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: Error with bluetooth / bluez

Fri Jun 08, 2012 6:50 pm

Mike, not to hassle, but is this done? (i.e. patched libcap-ng) I just went down the patch/build/install myself route for libcap-ng - I don't recall it being upgraded in my last apt-get upgrade. Again, I don't mean to mither, but if others need to use this, I was gonna put a quick step-by-step together.

BTW, thanks to Mauimauer for the pointer to the patch

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA

Re: Error with bluetooth / bluez

Fri Jun 08, 2012 7:59 pm

Sorry, I didn't get a chance to take care of it and I don't think I have time before I leave town for a few days, but I'll try to get it done in the next two hours. I'll post back here as soon as it's done.

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA

Re: Error with bluetooth / bluez

Fri Jun 08, 2012 8:55 pm

OK, I applied the patch and it is inserted into our repository. It should be pushed within the next few hours to the public repository and the mirrors.

The version of the binary package is: libcap-ng0_0.6.6-1+rpi1

I verified that the packages bluetooth & bluez-utils now install without the segfault.

Thank you for tracking down this issue and finding a fix. Sorry that I didn't jump on getting the fix into the repository as fast as I should have.

User avatar
bob_binz
Posts: 441
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: Error with bluetooth / bluez

Fri Jun 08, 2012 8:57 pm

Great work Mike - thanks for this. Enjoy your days away!

ratherDashing
Posts: 39
Joined: Tue Jun 05, 2012 3:00 am

Re: Error with bluetooth / bluez

Sat Jun 09, 2012 4:03 pm

I can confirm bluetooth works fine now. I'm using ath3k.

richtoy
Posts: 14
Joined: Tue Jun 05, 2012 8:35 pm
Location: Valkenburg, Netherlands

Re: Error with bluetooth / bluez

Thu Jun 14, 2012 8:55 pm

Hi

How do I upgrade /usr/lib/libcap-ng to libcap-ng0_0.6.6-1+rpi1 ?

I tried googling it but only found the link to this site...

Thanks
Richard

User avatar
mpthompson
Posts: 620
Joined: Fri Feb 03, 2012 7:18 pm
Location: San Carlos, CA

Re: Error with bluetooth / bluez

Thu Jun 14, 2012 10:38 pm

richtoy wrote:Hi

How do I upgrade /usr/lib/libcap-ng to libcap-ng0_0.6.6-1+rpi1 ?

I tried googling it but only found the link to this site...

Thanks
Richard
With Raspbian, it should automatically upgrade with the following commands:

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade
If that doesn't work, let us know here or on the Raspbian IRC channel and we'll try to help you out.

Mike

richtoy
Posts: 14
Joined: Tue Jun 05, 2012 8:35 pm
Location: Valkenburg, Netherlands

Re: Error with bluetooth / bluez

Fri Jun 15, 2012 9:45 am

Hi, neither the update or the dist-upgrade appear to pick up the change. Here's what I get: -


pi@raspberrypi ~ $ sudo apt-get update
Ign http://asbradbury.org wheezy InRelease
Ign http://asbradbury.org wheezy Release.gpg
Ign http://archive.qmh-project.org unstable InRelease
Hit http://asbradbury.org wheezy Release
Get:1 http://http.debian.net wheezy InRelease [190 kB]
Ign http://archive.qmh-project.org unstable Release.gpg
Ign http://asbradbury.org wheezy/main armel Packages/DiffIndex
Ign http://archive.qmh-project.org unstable Release
Ign http://archive.qmh-project.org unstable/main armel Packages/DiffIndex
Get:2 http://http.debian.net wheezy/main armel Packages/DiffIndex [7,876 B]
Hit http://http.debian.net wheezy/non-free armel Packages/DiffIndex
Get:3 http://http.debian.net wheezy/main Translation-en/DiffIndex [7,876 B]
Hit http://asbradbury.org wheezy/main armel Packages
Hit http://http.debian.net wheezy/non-free Translation-en/DiffIndex
Get:4 http://http.debian.net wheezy/main armel 2012-06-15-0214.05.pdiff [46.6 kB ]
Ign http://asbradbury.org wheezy/main Translation-en_US
Get:5 http://http.debian.net wheezy/main armel 2012-06-15-0214.05.pdiff [46.6 kB ]
Ign http://asbradbury.org wheezy/main Translation-en
Get:6 http://http.debian.net wheezy/main 2012-06-15-0214.05.pdiff [9,139 B]
Hit http://archive.qmh-project.org unstable/main armel Packages
Ign http://archive.qmh-project.org unstable/main Translation-en_US
Ign http://archive.qmh-project.org unstable/main Translation-en
Get:7 http://http.debian.net wheezy/main 2012-06-15-0214.05.pdiff [9,139 B]
Fetched 262 kB in 47s (5,571 B/s)
Reading package lists... Done
pi@raspberrypi ~ $ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
libavcodec53 libavfilter2 libavformat53 libavutil51 libobrender27 libobt0 libswscale2 libusb-1.0-0 openbox
9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
5 not fully installed or removed.
Need to get 12.4 MB of archives.
After this operation, 5,120 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://http.debian.net/debian/ wheezy/main libavutil51 armel 6:0.8.3-1 [218 kB]
Get:2 http://http.debian.net/debian/ wheezy/main libavcodec53 armel 6:0.8.3-1 [9,684 kB]
Get:3 http://http.debian.net/debian/ wheezy/main libavformat53 armel 6:0.8.3-1 [1,459 kB]
Get:4 http://http.debian.net/debian/ wheezy/main libswscale2 armel 6:0.8.3-1 [260 kB]
Get:5 http://http.debian.net/debian/ wheezy/main libobrender27 armel 3.5.0-4 [75.3 kB]
Get:6 http://http.debian.net/debian/ wheezy/main openbox armel 3.5.0-4 [317 kB]
Get:7 http://http.debian.net/debian/ wheezy/main libavfilter2 armel 6:0.8.3-1 [269 kB]
Get:8 http://http.debian.net/debian/ wheezy/main libusb-1.0-0 armel 2:1.0.11-1 [36.4 kB]
Get:9 http://http.debian.net/debian/ wheezy/main libobt0 armel 3.5.0-4 [62.6 kB]
Fetched 12.4 MB in 10s (1,210 kB/s)
(Reading database ... 63680 files and directories currently installed.)
Preparing to replace libavutil51:armel 6:0.8.2-2 (using .../libavutil51_6%3a0.8.3-1_armel.deb) ...
Unpacking replacement libavutil51:armel ...
Preparing to replace libavcodec53:armel 6:0.8.2-2 (using .../libavcodec53_6%3a0.8.3-1_armel.deb) ...
Unpacking replacement libavcodec53:armel ...
Preparing to replace libavformat53:armel 6:0.8.2-2 (using .../libavformat53_6%3a0.8.3-1_armel.deb) ...
Unpacking replacement libavformat53:armel ...
Preparing to replace libswscale2:armel 6:0.8.2-2 (using .../libswscale2_6%3a0.8.3-1_armel.deb) ...
Unpacking replacement libswscale2:armel ...
Preparing to replace libavfilter2:armel 6:0.8.2-2 (using .../libavfilter2_6%3a0.8.3-1_armel.deb) ...
Unpacking replacement libavfilter2:armel ...
Preparing to replace libusb-1.0-0:armel 2:1.0.9-1 (using .../libusb-1.0-0_2%3a1.0.11-1_armel.deb) ...
Unpacking replacement libusb-1.0-0:armel ...
Preparing to replace libobt0 3.5.0-3 (using .../libobt0_3.5.0-4_armel.deb) ...
Unpacking replacement libobt0 ...
Preparing to replace libobrender27 3.5.0-3 (using .../libobrender27_3.5.0-4_armel.deb) ...
Unpacking replacement libobrender27 ...
Preparing to replace openbox 3.5.0-3 (using .../openbox_3.5.0-4_armel.deb) ...
Unpacking replacement openbox ...
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Setting up bluez (4.99-2) ...
[ ok ] Reloading system message bus config...done.
[....] Starting bluetooth:Segmentation fault
invoke-rc.d: initscript bluetooth, action "start" failed.
dpkg: error processing bluez (--configure):
subprocess installed post-installation script returned error exit status 139
dpkg: dependency problems prevent configuration of bluetooth:
bluetooth depends on bluez; however:
Package bluez is not configured yet.
dpkg: error processing bluetooth (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of bluez-alsa:armel:
bluez-alsa:armel depends on bluez; however:
Package bluez is not configured yet.
dpkg: error processing bluez-alsa:armel (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of bluez-gstreamer:
bluez-gstreamer depends on bluez; however:
Package bluez is not configured yet.
dpkg: error processing bluez-gstreamer (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of bluez-utils:
bluez-utils depends on bluetooth; however:
Package bluetooth is not configured yet.
dpkg: error processing bluez-utils (--configure):
dependency problems - leaving unconfigured
Setting up libavutil51:armel (6:0.8.3-1) ...
Setting up libavcodec53:armel (6:0.8.3-1) ...
Setting up libavformat53:armel (6:0.8.3-1) ...
Setting up libswscale2:armel (6:0.8.3-1) ...
Setting up libavfilter2:armel (6:0.8.3-1) ...
Setting up libusb-1.0-0:armel (2:1.0.11-1) ...
Setting up libobt0 (3.5.0-4) ...
Setting up libobrender27 (3.5.0-4) ...
Setting up openbox (3.5.0-4) ...
Errors were encountered while processing:
bluez
bluetooth
bluez-alsa:armel
bluez-gstreamer
bluez-utils
E: Sub-process /usr/bin/dpkg returned an error code (1)


Can someone please help further?

Thanks,
Richard

ratherDashing
Posts: 39
Joined: Tue Jun 05, 2012 3:00 am

Re: Error with bluetooth / bluez

Fri Jun 15, 2012 11:29 am

I don't believe you are using raspbian or your /etc/apt/sources.list is a tad odd. It should be :

Code: Select all

deb http://archive.raspbian.org/raspbian/ wheezy main contrib non-free rpi
deb-src http://archive.raspbian.org/raspbian/ wheezy main contrib non-free rpi
did you change your sources.list or are you using a different debian based install?

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm

Re: Error with bluetooth / bluez

Fri Jun 15, 2012 11:31 am

richtoy wrote:Hi, neither the update or the dist-upgrade appear to pick up the change. Here's what I get: -

Can someone please help further?

Thanks,
Richard
Hi, that's my wheezy image rather than Raspbian. To fix this issue, I need to rebuild the package with the suggested patch and include it in our Raspberry Pi specific repo (though you'd rather hope upstream Debian might have got round to fixing it by now...). I haven't had a chance to do it yet.

richtoy
Posts: 14
Joined: Tue Jun 05, 2012 8:35 pm
Location: Valkenburg, Netherlands

Re: Error with bluetooth / bluez

Fri Jun 15, 2012 4:20 pm

Hi,

Thanks for the quick response. It would be nice if this was in the next Debian/Wheezy image because it appears to be non trivial to get bluetooth/bluez working without it. Keep up the good work guys :)

Richard

treii28
Posts: 97
Joined: Fri May 10, 2013 4:52 pm

Re: Error with bluetooth / bluez

Wed Mar 02, 2016 5:44 pm

running into this again on a recent install/version of rpi

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

Re: Error with bluetooth / bluez

Wed Mar 02, 2016 5:49 pm

Not likely to be the same issue. More likely is the fact that bluez-utils is no longer a package. (Heck of a necro-post, however.)

treii28
Posts: 97
Joined: Fri May 10, 2013 4:52 pm

Re: Error with bluetooth / bluez

Thu Mar 10, 2016 5:11 pm

I meant I'm getting the same errors listed in this thread and bluez / bluetooth not installing with the same responses. Necro or not, I'm getting the same thing on a recent install. Related or not, I'm getting the same errors on a recent install.

opi
Posts: 7
Joined: Tue Sep 01, 2015 12:33 am

Re: Error with bluetooth / bluez

Mon May 16, 2016 2:19 am

treii28 wrote:I meant I'm getting the same errors listed in this thread and bluez / bluetooth not installing with the same responses. Necro or not, I'm getting the same thing on a recent install. Related or not, I'm getting the same errors on a recent install.
I was receiving similar errors, as you possibly were. My errors were the same as in this thread. A restart and another sudo apt-get upgrade solved the problem for me.

Return to “Raspberry Pi OS”