After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 700891 - bluetooth: port to bluez 5
bluetooth: port to bluez 5
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on: 685717
Blocks:
 
 
Reported: 2013-05-23 14:15 UTC by Emilio Pozuelo Monfort
Modified: 2013-06-14 09:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Port to BlueZ 5 (4.21 KB, patch)
2013-05-23 14:17 UTC, Emilio Pozuelo Monfort
committed Details | Review
Bump gnome-bluetooth requirement (993 bytes, patch)
2013-06-03 13:39 UTC, Emilio Pozuelo Monfort
committed Details | Review

Description Emilio Pozuelo Monfort 2013-05-23 14:15:41 UTC
As part of the port to BlueZ 5, gnome-bluetooth is going to have a few changes to which gnome-shell needs to adapt. The necessary changes in the shell are minimal, patch to follow.
Comment 1 Emilio Pozuelo Monfort 2013-05-23 14:17:19 UTC
Created attachment 245135 [details] [review]
Port to BlueZ 5

In BlueZ 4, Authorize() was used to authorize both service
and JustWorks authorization requests. In BlueZ 5 these two
have been split into AuthorizeService() for services and
RequestAuthorization for JustWorks devices. Adapt the
Bluetooth code accordingly.
Comment 2 Emilio Pozuelo Monfort 2013-05-23 14:20:13 UTC
I need to test this further (need to find a way to trigger AuthorizeService and RequestAuthorization to test the changed callbacks) but in general the bluetooth applet works fine with BlueZ 5 & patched gnome-bluetooth.
Comment 3 Giovanni Campagna 2013-05-25 12:48:07 UTC
Review of attachment 245135 [details] [review]:

This looks good in general.
If I wanted to test this, what would I need, ie, what patches/branch of gnome-bluetooth? Is there a package of bluez 5 already available?
Comment 4 Emilio Pozuelo Monfort 2013-05-25 14:28:52 UTC
You need bluez 5. There are packages for Fedora in http://koji.fedoraproject.org/koji/taskinfo?taskID=5333985, for Debian in experimental.

You also need the bluez 5 port of gnome-bluetooth. You can use my branch from http://cgit.collabora.com/git/user/pochu/gnome-bluetooth.git/log/?h=bluez5 or the patches from bug #685717.

I should note that the killswitch doesn't currently work very well. Disabling the adapter works fine, but enabling it will bring it back with "Powered: no", which means it's not very usable. This is probably a bug in bluez, but I'm still investigating it.

The rest of the functionality (sending files to a device, toggling the visibility, opening the bluetooth settings, accepting/rejecting incoming pairing requests from remote devices) works fine for me. I still need to test the new callback and the modified one, but I need to get some hardware to be able to generate those.
Comment 5 Emilio Pozuelo Monfort 2013-05-30 14:20:30 UTC
The gnome-bluetooth changes are upstream now.
Comment 6 Emilio Pozuelo Monfort 2013-05-30 14:32:47 UTC
We should also bump the gnome-bluetooth dependency for this.
Comment 7 Emilio Pozuelo Monfort 2013-06-03 13:39:57 UTC
Created attachment 245923 [details] [review]
Bump gnome-bluetooth requirement

Needed for the changes in the agent.
Comment 8 Emilio Pozuelo Monfort 2013-06-07 18:16:59 UTC
ping
Comment 9 Bastien Nocera 2013-06-11 15:58:06 UTC
Updated bluez5 packages for Fedora 19. They might need to be forced in to get installed.
http://koji.fedoraproject.org/koji/taskinfo?taskID=5492302
Comment 10 Giovanni Campagna 2013-06-11 22:14:40 UTC
(In reply to comment #9)
> Updated bluez5 packages for Fedora 19. They might need to be forced in to get
> installed.
> http://koji.fedoraproject.org/koji/taskinfo?taskID=5492302

A regular yum installation of these packages tries to remove gdm (rdep of gnome-shell, rdep of gnome-bluetooth, rdep of bluez, obsoleted by bluez5). But even rpm -U --nodeps complains because the soname is the same (libbluetooth.so.3) which causes a file conflict.
I don't know how to proceed forward.

Anyway, looking at this again, the patch is safe enough that we can land it, provided bluez 5 is working in unstable distributions soon enough (koji tells me there is no F20 package yet).
After all, bluetooth is optional, so people can just disable it.
Comment 11 Bastien Nocera 2013-06-13 14:20:42 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Updated bluez5 packages for Fedora 19. They might need to be forced in to get
> > installed.
> > http://koji.fedoraproject.org/koji/taskinfo?taskID=5492302
> 
> A regular yum installation of these packages tries to remove gdm (rdep of
> gnome-shell, rdep of gnome-bluetooth, rdep of bluez, obsoleted by bluez5).

That'd be one of the reasons why it's not yet in Fedora.

> But
> even rpm -U --nodeps complains because the soname is the same
> (libbluetooth.so.3) which causes a file conflict.
> I don't know how to proceed forward.

rpm -e --nodeps bluez
rpm -Uvh bluez5*rpm

And use a jhbuilt gnome-shell (or disable bluetooth in the code for your installed gnome-shell)

> Anyway, looking at this again, the patch is safe enough that we can land it,
> provided bluez 5 is working in unstable distributions soon enough (koji tells
> me there is no F20 package yet).

It will be submitted for review shortly.

> After all, bluetooth is optional, so people can just disable it.

Cool. Does this mean I can commit it?
Comment 12 Giovanni Campagna 2013-06-13 16:00:43 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> [...]
>
> > After all, bluetooth is optional, so people can just disable it.
> 
> Cool. Does this mean I can commit it?

Yes, please go ahead.