LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Bluez 5 (https://www.linuxquestions.org/questions/slackware-14/bluez-5-a-4175524456/)

dugan 11-05-2014 01:02 PM

Bluez 5
 
Does anyone have a Bluez 5 (currently at 5.24) Slackware package or SlackBuild?

I'd attempt to make one myself, but first I want to make sure I'm not reinventing the wheel.

moesasji 11-05-2014 01:31 PM

A quick search shows the one below, which has 5.24 as the version number.

https://github.com/PhantomX/slackbui...uez.SlackBuild

Richard Cranium 11-06-2014 12:29 AM

There are other changes that you might need. I wonder about a slackbuild that doesn't have "--disable-systemd" as a configuration option, myself.

If you want gatttool, you'll have to patch Makefile.tools....
Code:

--- Makefile.tools        2014-06-20 13:33:13.000000000 -0500
+++ Makefile.tools.new        2014-07-07 01:56:30.471090099 -0500
@@ -348,7 +348,9 @@
 endif
 
 if READLINE
-noinst_PROGRAMS += attrib/gatttool \
+bin_PROGRAMS += attrib/gatttool
+
+noinst_PROGRAMS += \
                        tools/obex-client-tool tools/obex-server-tool \
                        tools/bluetooth-player tools/obexctl

There are other changes that involve some of the helper scripts. The entire mess isn't trivial (which I'd guess is why the upgraded version isn't part of -current).


As an aside: I was looking for decent BLE support for my heart rate monitor. Bluez doesn't provide that. bstack did, but I cannot recommend it for a bluez replacement. (bstack isn't designed to be a bluez replacement.)

rworkman 11-08-2014 01:52 AM

If you (or anyone else) gets a working bluez5 stack going in such a way that bluez4 is not missed, please include us in the loop. Last I looked (granted, this was long ago - just after bluez5's early releases), it was not in a usable state.

Richard Cranium 11-08-2014 09:07 AM

What I ended up with appeared to be usable, but I don't use Bluetooth for anything other than my BLE heart monitor. (My complaint was that there is no dbus interface for heart rate notifications; in fact, the dbus support for BLE was in flux the last time I looked [bluez-5.22].) The configuration's changed between 4.x and 5.x; I didn't spend a lot of effort trying to untangle it.

Most of the effort appears to be on the Android side.

yars 11-19-2014 12:10 PM

I have built BlueZ-5.25 and it is working, but without an applet (blueman, bluedevil or so) for managing this is not usable by end-users. I'm trying to build blueman-1.99 (which is alpha), but it does not works for me. Here is output from blueman-applet when it's launched in command line:
Code:

$ blueman-applet                                                                                       
Loading configuration plugins
blueman-applet version 1.99.alpha1 starting
Using GConf config backend
_________
Load (/usr/lib64/python2.7/site-packages/blueman/main/PluginManager.py:54)
['RecentConns', 'NMDUNSupport', 'AuthAgent', 'PPPSupport', 'Menu', 'StatusIcon', 'ExitItem', 'StandardItems', 'SerialManager', 'ShowConnected', 'KillSwitch', 'TransferService', 'DhcpClient', 'PowerManager', 'DiscvManager', 'NMPANSupport', 'DBusService', 'Networking', 'Headset', 'AppIndicator', 'NetUsage']
Using GConf config backend
_________
get_interface_version (/usr/lib64/python2.7/site-packages/blueman/bluez/BlueZInterface.py:8)
Detected BlueZ 5
Traceback (most recent call last):
  File "/usr/bin/blueman-applet", line 110, in <module>
    BluemanApplet()
  File "/usr/bin/blueman-applet", line 53, in __init__
    self.Plugins.Load()
  File "/usr/lib64/python2.7/site-packages/blueman/main/PluginManager.py", line 84, in Load
    __import__(self.module_path.__name__ + ".%s" % plugin, None, None, [])
  File "/usr/lib64/python2.7/site-packages/blueman/plugins/applet/AuthAgent.py", line 3, in <module>
    import blueman.main.applet.BluezAgent as BluezAgent
  File "/usr/lib64/python2.7/site-packages/blueman/main/applet/BluezAgent.py", line 32, in <module>
    class CommonAgent(GObject.GObject, Agent):
  File "/usr/lib64/python2.7/site-packages/dbus/service.py", line 323, in __init__
    super(InterfaceType, cls).__init__(name, bases, dct)
  File "/usr/lib64/python2.7/site-packages/gi/types.py", line 214, in __init__
    if cls.__module__ == 'gi.repository.' + cls.__info__.get_namespace():
AttributeError: type object 'CommonAgent' has no attribute '__info__'

What I need to do? I'm is not a guru of Python, sorry. Currently, I'm running Slackware64 14.1 with alien's multilib, and have built (and rebuilt) those packages:
Code:

python-2.7.5-x86_64-1 rebuilt
pygobject-3.0.4-x86_64-1  built
gobject-introspection-1.42.0-x86_64-1 built
Cython-0.21.1-x86_64-1 built
bluez-5.25-x86_64-1 built

I've noticed that blueman-1.99 needs pulseaudio to get BT-headsets working, but I use apulse to get sound in skype. Not sure that apulse can help me to get sound via bluetooth. I've also tried to build blueman from git, but can't build it. If need, I can share the edited slackbuilds and other files.

dugan 11-19-2014 12:43 PM

My guess is that it needs a different version of PyGobject. The latest version is 3.10.2, and there might have been changes between 3.0 and 3.10.

yars 11-19-2014 01:06 PM

Quote:

Originally Posted by dugan (Post 5272007)
My guess is that it needs a different version of PyGobject. The latest version is 3.10.2, and there might have been changes between 3.0 and 3.10.

Good! Thanks you, blueman is working, but needs some tests. I use the version 3.10.2.

rworkman 11-26-2014 12:01 AM

Blueman is under development by new folks here: https://github.com/blueman-project/blueman
bluez-5 support is in progress but not yet there. If you know python and gtk, please take a look at some of the Issues and see if you can address them - I'm trying to do my part (what little I can).

dugan 02-21-2015 08:24 PM

Well that wasn't bad. I cloned PhantomX's SlackBuild repository, edited the Bluez SlackBuild to build Bluez without systemd support (--disable-systemd), launched the Bluetooth daemon (/usr/libexec/bluetooth/bluetoothd), then went through the Gentoo wiki's Bluez-5 quickstart.

http://wiki.gentoo.org/wiki/Bluetooth#BlueZ_5

Before long I had my Dualshock 4 controller paired, and I could see its input in the /dev/input/js0 device node.

I'm fine with doing stuff from a bluetoothctl shell instead of a GUI. Also, my desktop is OpenBox+Tint2, not having desktop integration isn't an issue for me.

ReaperX7 02-21-2015 08:28 PM

BLFS is using BlueZ-5.28 without systemd here:

http://linuxfromscratch.org/blfs/vie...ral/bluez.html

Maybe this can be of some insight?

WhiteWolf1776 02-21-2015 09:32 PM

Something I hit with this upgrade, and you'll likely hit as well... they changed the 'trusted' devices bit in bluez... so while a device will pair and work, it won't pair again automatically as other bits need upgraded as well for this to work..

Eventually i got into a scenario of upgrading too much and backed out to the -current bluez.

Just a heads up.

dugan 02-22-2015 10:01 AM

How long ago was that? This blog entry from 2013, combined with the Gentoo wiki, are implying to me that that was fixed:

http://patkoscsaba.blogspot.ca/2013/...bluetooth.html

I haven't yet tested it myself.

WhiteWolf1776 02-22-2015 11:14 AM

couple of months ago... it isn't a bug, but rather the newer bluez 5 needs an updated d-bus as the trusted device has changed in the newer kernels and bluez has updated to reflect this.

Looks like from my notes it was kernel 3.17 and forward, bluez 5.24 and forward. I didn't work out the d-bus completely as i ran out of time.

The devices paired fine, but wouldn't reconnect as a trusted device should.

dugan 02-22-2015 12:23 PM

Thanks. I didn't know about that. Could you please post a link or two for me to read?

Anyway, it looks like it reconnecting my Dualshock 4 consisted just holding down the PS button. I had bluetoothctl running at the time. The light on the controller flashed for about a second, and then I saw the "connected" message in bluetoothctl.. That's fine, but I'm still interested in learning more about what you found out about the DBUS issues.

The machine I'm tested on is using kernel 3.10.


All times are GMT -5. The time now is 10:26 PM.