In the midst of post-release bug fixing, we've also added a fair number of new features to our stack. As usual, new features span a number of different components, so integrators will have to be careful picking up all the components when, well, integrating.
PS3 clones joypads support
Do you have a PlayStation 3 joypad that feels just a little bit "off"? You can't find the Sony logo anywhere on it? The figures on the face buttons look like barbed wire? And if it were a YouTube video, it would say "No copyright intended"?
Bingo. When plugged in via USB, those devices advertise themselves as SHANWAN or Gasia, and implement the bare minimum to work when plugged into a PlayStation 3 console. But as a Linux computer would behave slightly differently, we need to fix a couple of things.
The first fix was simple, but necessary to be able to do any work: disable the rumble motor that starts as soon as you plug the pad through USB.
Once that's done, we could work around the fact that the device isn't Bluetooth compliant, and hard-code the HID service it's supposed to offer.
Bluetooth LE Battery reporting
Bluetooth Low Energy is the new-fangled (7-year old) protocol for low throughput devices, from a single coin-cell powered sensor, to input devices. What's great is that there's finally a standardised way for devices to export their battery statuses. I've added support for this in BlueZ, which UPower then picks up for desktop integration goodness.
There are a number of Bluetooth LE joypads available for pickup, including a few that should be firmware upgradeable. Look for "Bluetooth 4" as well as "Bluetooth LE" when doing your holiday shopping.
gnome-bluetooth work
Finally, this is the boring part. Benjamin and I reworked code that's internal to gnome-bluetooth, as used in the Settings panel as well as the Shell, to make it use modern facilities like GDBusObjectManager. The overall effect of this is, less code, less brittle and more reactive when Bluetooth adapters come and go, such as when using airplane mode.
Apart from the kernel patch mentioned above (you'll know if you need it :), those features have been integrated in UPower 0.99.7 and in the upcoming BlueZ 5.48. And they will of course be available in Fedora, both in rawhide and as updates to Fedora 27 as soon as the releases have been done and built.
GG!
Showing posts with label bluez. Show all posts
Showing posts with label bluez. Show all posts
Friday, 15 December 2017
Friday, 13 May 2016
Blutella, a Bluetooth speaker receiver
Quite some time ago, I was asked for a way to use the AV amplifier (which has a fair bunch of speakers connected to it) in our living-room that didn't require turning on the TV to choose a source.
I decided to try and solve this problem myself, as an exercise rather than a cost saving measure (there are good-quality Bluetooth receivers available for between 15 and 20€).
Introducing Blutella
I found this pot of Nutella in my travels (in Europe, smaller quantities are usually in a jar that looks like a mustard glass, with straight sides) and thought it would be a perfect receptacle for a CHIP, to allow streaming via Bluetooth to the amp. I wanted to make a nice how-to for you, dear reader, but best laid plans...
First, the materials:
That's around 10€ in parts (cables always seem to be expensive), not including our salvaged Nutella jar, and the CHIP itself (9$ + shipping).
You'll start by painting the whole of the jar, on the inside, with the acrylic paint. Allow a couple of days to dry, it'll be quite thick.
So, the plan that went awry. Turns out that the CHIP, with the cables plugged in, doesn't fit inside this 140g jar of Nutella. I also didn't make the holes exactly in the right place. The CHIP is tiny, but not small enough to rotate inside the jar without hitting the side, and the groove to screw the cap also have only one position.
Anyway, I pierced two holes in the lid for the audio jack and the USB charging cable, stuffed the CHIP inside, and forced the lid on so it clipped on the jar's groove.
I had nice photos with foam I cut to hold the CHIP in place, but the finish isn't quite up to my standards. I guess that means I can attempt this again with a bigger jar ;)
The software
After flashing the CHIP with Debian, I logged in, and launched a script which I put together to avoid either long how-tos, or errors when I tried to reproduce the setup after a firmware update and reset.
The script for setting things up is in the CHIP-bluetooth-speaker repository. There are a few bugs due to drivers, and lack of integration, but this blog is the wrong place to track them, so check out the issues list.
Apart from those driver problems, I found the integration between PulseAudio and BlueZ pretty impressive, though I wish there was a way for the speaker to reconnect to the phone I streamed from when turned on again, as Bluetooth speakers and headsets do, removing one step from playing back audio.
I decided to try and solve this problem myself, as an exercise rather than a cost saving measure (there are good-quality Bluetooth receivers available for between 15 and 20€).
Introducing Blutella
I found this pot of Nutella in my travels (in Europe, smaller quantities are usually in a jar that looks like a mustard glass, with straight sides) and thought it would be a perfect receptacle for a CHIP, to allow streaming via Bluetooth to the amp. I wanted to make a nice how-to for you, dear reader, but best laid plans...
First, the materials:
- a CHIP
- jar of Nutella, and "Burnt umber" acrylic paint
- micro-USB to USB-A and jack 3.5mm to RCA cables
- Some white Sugru, for a nice finish around the cables
- bit of foam, a Stanley knife, a CD marker
That's around 10€ in parts (cables always seem to be expensive), not including our salvaged Nutella jar, and the CHIP itself (9$ + shipping).
You'll start by painting the whole of the jar, on the inside, with the acrylic paint. Allow a couple of days to dry, it'll be quite thick.
So, the plan that went awry. Turns out that the CHIP, with the cables plugged in, doesn't fit inside this 140g jar of Nutella. I also didn't make the holes exactly in the right place. The CHIP is tiny, but not small enough to rotate inside the jar without hitting the side, and the groove to screw the cap also have only one position.
Anyway, I pierced two holes in the lid for the audio jack and the USB charging cable, stuffed the CHIP inside, and forced the lid on so it clipped on the jar's groove.
I had nice photos with foam I cut to hold the CHIP in place, but the finish isn't quite up to my standards. I guess that means I can attempt this again with a bigger jar ;)
The software
After flashing the CHIP with Debian, I logged in, and launched a script which I put together to avoid either long how-tos, or errors when I tried to reproduce the setup after a firmware update and reset.
The script for setting things up is in the CHIP-bluetooth-speaker repository. There are a few bugs due to drivers, and lack of integration, but this blog is the wrong place to track them, so check out the issues list.
Apart from those driver problems, I found the integration between PulseAudio and BlueZ pretty impressive, though I wish there was a way for the speaker to reconnect to the phone I streamed from when turned on again, as Bluetooth speakers and headsets do, removing one step from playing back audio.
Monday, 9 December 2013
Bluetooth panel redesign
Another week, another panel refresh.
Rather than the 2-pane approach, and a separate setup interface we used to have, we've gone for a single pane device list, as you've probably seen on your smartphone.
We also do away with the "Discoverable" switch (your computer will be visible when this panel is opened, invisible if not), and nearby devices will show up at the bottom of the list. Simply click on one to set it up.
Clicking on an already setup device will bring up the properties, allowing you to connect to the device if necessary, or link to related preferences.
Rather than the 2-pane approach, and a separate setup interface we used to have, we've gone for a single pane device list, as you've probably seen on your smartphone.
We also do away with the "Discoverable" switch (your computer will be visible when this panel is opened, invisible if not), and nearby devices will show up at the bottom of the list. Simply click on one to set it up.
Clicking on an already setup device will bring up the properties, allowing you to connect to the device if necessary, or link to related preferences.
Finally, the biggest part of the work was making sure that the new setup mechanism worked at least as well as the stand-alone wizard. This means that I got 17 of my most representative devices out, and set up every single one of them. Edge case.
There's a good chance that we'll make some additional, minor, adjustments to the wording, spacing and behaviour of this panel before the GNOME 3.12 release. I'd particularly like to make clicking on a device connect to it if already setup and offer some other way of accessing properties.
Tuesday, 12 November 2013
Bluetooth file sharing (ObexPush) in GNOME 3.10
As you might remember, GNOME 3.10 switched to using BlueZ 5.x as its Bluetooth backend.
Switching to BlueZ 5.x meant that the old obex-data-server (which was used in both the gvfs ObexFTP backend, and gnome-user-share) couldn't be used anymore. The previously stand-alone obexd was to be used.
Its API is quite different, and it obviously didn't get much testing apart from its target use case, the single-user phone case.
I fixed a number of bugs this week-end, which should make Obex Push server-side (sending files from your phone to your computer) work as expected.
Distributors' homework
First, distributors will need to do a bit of work for you:
- Ship and apply this (not yet upstreamed) patch if you don't have a systemd-based session, so that obexd can be started via D-Bus.
- And ship this patch to have obexd write to the user's cache dir by default.
With both of those patches to BlueZ and gnome-user-share 3.10.1, you should be golden.
Note that the first patch is also required if you want to send files using bluetooth-sendto.
ObexFTP
You'll notice that we didn't mention ObexFTP yet, but we'll do, one last time. ObexFTP support client side hasn't seen any updates for a couple of years, and the server side support for it in obexd didn't match our expectations (such as the inability to kill existing, already made connections).
So ObexFTP support was never finished porting and re-enabled in gnome-user-share. And given that apart from computers and very few phones, the client side support was lacking, we decided to kill the support for it in gnome-user-share.
TL;DR
ObexPush server support is fixed in gnome-user-share 3.10.1, and ObexFTP server support is gone.
Switching to BlueZ 5.x meant that the old obex-data-server (which was used in both the gvfs ObexFTP backend, and gnome-user-share) couldn't be used anymore. The previously stand-alone obexd was to be used.
Its API is quite different, and it obviously didn't get much testing apart from its target use case, the single-user phone case.
I fixed a number of bugs this week-end, which should make Obex Push server-side (sending files from your phone to your computer) work as expected.
Distributors' homework
First, distributors will need to do a bit of work for you:
- Ship and apply this (not yet upstreamed) patch if you don't have a systemd-based session, so that obexd can be started via D-Bus.
- And ship this patch to have obexd write to the user's cache dir by default.
With both of those patches to BlueZ and gnome-user-share 3.10.1, you should be golden.
Note that the first patch is also required if you want to send files using bluetooth-sendto.
ObexFTP
You'll notice that we didn't mention ObexFTP yet, but we'll do, one last time. ObexFTP support client side hasn't seen any updates for a couple of years, and the server side support for it in obexd didn't match our expectations (such as the inability to kill existing, already made connections).
So ObexFTP support was never finished porting and re-enabled in gnome-user-share. And given that apart from computers and very few phones, the client side support was lacking, we decided to kill the support for it in gnome-user-share.
TL;DR
ObexPush server support is fixed in gnome-user-share 3.10.1, and ObexFTP server support is gone.
Labels:
bluetooth,
bluetooth-sendto,
bluez,
gnome-bluetooth,
obex,
settings
Monday, 23 September 2013
GNOME 3.10 is coming!
The new release is coming! As has been the case for the past couple of releases, I've mostly been shepherding great work by other contributors, and I'll detail my limited contributions beyond mere bug fixing.
Wayland support
I've done some work on enabling clutter-gtk applications to be able to run on Wayland though the harder work of implementing sub-surfaces is still pending.
Giovanni has done incredible work on mutter to start moving some of the X11 dependent code inside the compositor, which should allow you to run a (cut down) Wayland session using gnome-shell.
This also means that Thomas Wood's redesigned Displays panel has Wayland support. A perfect storm of changes for one of the only panels that received little attention since the GNOME 2.x days.
Date & Time redesign
Zeeshan, through his work on Geoclue2, and Kalev, through his Summer of Code project, have completely redesigned the Date & Time panel. Aside from being easier to setup, it means that we can finally implement the automatic timezone switching depending on your location.
BlueZ 5 support
GNOME is the first major desktop to ship with BlueZ 5 support, thanks to work by Gustavo Padovan and Emilio Pozuelo Monfort.
The older version was not supported anymore, and the new version allows us to support things like "Just Works" pairing, better support of audio devices (though the PulseAudio 5.x release to support this is only coming shortly after GNOME 3.10) and a much better architecture for a more stable operation.
GNOME 3.12 should see a redesigned Bluetooth panel, to match current best practices on other platforms (such as merging the management and pairing wizard UIs into one).
Miscellaneous
OLED support for Wacom Intuos 4 tablets (as seen above, thanks Przemo), media keys support for MPRIS applications such as Spotify (thanks to Michael Wood and Lars Uebernickel), updated UI for the Universal Access panel (the ever present Matthias Clasen), support for many more fingerprint readers in libfprint (thanks Vasily Khoruzhick).
And to my contributions
More work on Videos. Totem 3.10 is still based on the same interface as in GNOME 3.8, but some work has been on the master branch towards the new UI, with some of the features getting backported. We have:
I also spent quite a bit of time on a side project that didn't come to fruition at this time, but I hope to be able to post some details soon.
Wayland support
I've done some work on enabling clutter-gtk applications to be able to run on Wayland though the harder work of implementing sub-surfaces is still pending.
Giovanni has done incredible work on mutter to start moving some of the X11 dependent code inside the compositor, which should allow you to run a (cut down) Wayland session using gnome-shell.
This also means that Thomas Wood's redesigned Displays panel has Wayland support. A perfect storm of changes for one of the only panels that received little attention since the GNOME 2.x days.
The new displays panel with a TV that claims to be oh so small
Date & Time redesign
Zeeshan, through his work on Geoclue2, and Kalev, through his Summer of Code project, have completely redesigned the Date & Time panel. Aside from being easier to setup, it means that we can finally implement the automatic timezone switching depending on your location.
The new Date & Time panel
BlueZ 5 support
GNOME is the first major desktop to ship with BlueZ 5 support, thanks to work by Gustavo Padovan and Emilio Pozuelo Monfort.
The older version was not supported anymore, and the new version allows us to support things like "Just Works" pairing, better support of audio devices (though the PulseAudio 5.x release to support this is only coming shortly after GNOME 3.10) and a much better architecture for a more stable operation.
GNOME 3.12 should see a redesigned Bluetooth panel, to match current best practices on other platforms (such as merging the management and pairing wizard UIs into one).
Bluetooth devices in use
Miscellaneous
Intuos 4 OLEDs
OLED support for Wacom Intuos 4 tablets (as seen above, thanks Przemo), media keys support for MPRIS applications such as Spotify (thanks to Michael Wood and Lars Uebernickel), updated UI for the Universal Access panel (the ever present Matthias Clasen), support for many more fingerprint readers in libfprint (thanks Vasily Khoruzhick).
Redesigned Universal Access panel
And to my contributions
More work on Videos. Totem 3.10 is still based on the same interface as in GNOME 3.8, but some work has been on the master branch towards the new UI, with some of the features getting backported. We have:
- new session management for when Totem crashes
- support for chapters within files (such as Matroska videos)
- Wayland bug fixes in GTK+, clutter and the combined clutter-gtk
- a completed GDBus port
- Working overlaid controls (though their behaviour isn't quite up to scratch)
- Remote files support in Grilo, including support for Recent files
- Started work on merging the various sidebars within the main view (which included landing GtkSearchBar in GTK+)
- libquvi 0.9 support
I also spent quite a bit of time on a side project that didn't come to fruition at this time, but I hope to be able to post some details soon.
Thursday, 1 April 2010
Code for cash: Summer of Code ideas
As you might know, the time as come to put in your applications for Google's Summer of Code project ideas.
There's a good bunch of ideas available on the GNOME side of things, but if you fancy helping out GNOME without working on GNOME, you might also like the ideas from FFMpeg, GStreamer, or BlueZ (some of it directly related to gnome-bluetooth).
And if you're into web development, we have 2 good ideas in the GNOME Wiki (See the Front-end for common web services and Collaboration server/client ideas).
There's a good bunch of ideas available on the GNOME side of things, but if you fancy helping out GNOME without working on GNOME, you might also like the ideas from FFMpeg, GStreamer, or BlueZ (some of it directly related to gnome-bluetooth).
And if you're into web development, we have 2 good ideas in the GNOME Wiki (See the Front-end for common web services and Collaboration server/client ideas).
Labels:
bluez,
ffmpeg,
gnome,
gnome-bluetooth,
google,
gstreamer,
summer of code
Thursday, 18 June 2009
I'm upstream!
Or at least, my Wacom Bluetooth tablet driver is. I was wondering in which tree it was lost. You'll still need a patch to bluetoothd though.
Friday, 22 May 2009
Sixaxis support in BlueZ
Getting the Sixaxis PlayStation 3 joypad to work with Linux (in Bluetooth mode) is a bit of a pain. There were my various attempts at cleaning up the code lying around on the Internet, and hacks involving hidd.
The way to set the pad up in Bluetooth mode is fairly straight forward:
First up, detecting the device being plugged in. I wanted to use DeviceKit's GObject helper library, but it uses the D-Bus DeviceKit daemon which will be going away (note, this is just the DeviceKit daemon itself, not the -power, or -disks "sub"-daemons), in favour of libudev usage.
So I ported devkit-gobject to use libudev directly. Patch is currently being reviewed (it's in DavidZ's inbox), and it should show up soon in udev-extras under a different namespace.
After a bit of work, I had a bluetoothd plugin that detected PS3 pads being plugged in, and did the necessary work to make bluetoothd recognise it on plug.

Next, finishing up the libudev GObject helper library, and getting the bluetoothd plugin reviewed. And it would be nice to finally get the extra functionality merged into a hid driver in the kernel.
PS: Any info on the PS3 Headset or the keypad?
The way to set the pad up in Bluetooth mode is fairly straight forward:
- Open the USB device
- Get the device's Bluetooth address through magic USB commands
- Write your Bluetooth adapter's address in the pad (magic USB commands again), and then give the device back to the USB HID driver, so that it works as a pad through USB.
- Set up the internals of bluetoothd so it recognises the device, and allows it to connect to your computer
- When the device connects through Bluetooth, poke at it with magic commands again to enable its HID mode (code is already in bluetoothd's input plugin)
First up, detecting the device being plugged in. I wanted to use DeviceKit's GObject helper library, but it uses the D-Bus DeviceKit daemon which will be going away (note, this is just the DeviceKit daemon itself, not the -power, or -disks "sub"-daemons), in favour of libudev usage.
So I ported devkit-gobject to use libudev directly. Patch is currently being reviewed (it's in DavidZ's inbox), and it should show up soon in udev-extras under a different namespace.
After a bit of work, I had a bluetoothd plugin that detected PS3 pads being plugged in, and did the necessary work to make bluetoothd recognise it on plug.

Next, finishing up the libudev GObject helper library, and getting the bluetoothd plugin reviewed. And it would be nice to finally get the extra functionality merged into a hid driver in the kernel.
PS: Any info on the PS3 Headset or the keypad?
Monday, 15 September 2008
Living on the edge
If you want to try out the new BlueZ 4 code, and D-Bus API, come to try the upcoming Fedora 10 Beta (coming Tuesday a week). We have BlueZ 4.x and updated obex-data-server, and gvfs working with the new APIs.
gnome-user-share and nautilus-sendto are upcoming as well.
It also allows you to test the PulseAudio Bluetooth integration, if you're feeling particularly adventurous.
gnome-user-share and nautilus-sendto are upcoming as well.
It also allows you to test the PulseAudio Bluetooth integration, if you're feeling particularly adventurous.
Subscribe to:
Posts (Atom)










