[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: KDE Bluedevil

On Wed 22 Aug 2018 at 22:58:00 (-0400), Timothy M Butterworth wrote:
> On 8/21/18, David Wright <deblis@lionunicorn.co.uk> wrote:
> > On Mon 20 Aug 2018 at 20:12:57 (-0400), Timothy M Butterworth wrote:
> >> In Debian 9.5 KDE Bluedevil is unable to add devices. Is their any fix
> >> for this other then using GNOME Blueman tool.
> >
> > In the absence of other replies, can you explain what you mean by
> > "add devices".
> >
> > I use bluetooth, bluez, bluez-tools and bluez-obexd for what I do,
> > but that might not be all you and others do.

> When I try to pair a new device it fails with Bluedevil. I tried to
> pair multiple devices. I installed GNOME Blueman and was able to pair
> the devices. Now that the devices have been paired I can connect to
> and disconnect from them with Bluedevil.

I don't use GUIs to pair, but run bluetoothctl to pair a new device
in an xterm. Here's a typical conversation:

$ bluetoothctl
[NEW] Controller 0C:xx:xx:xx:xx:xx wren [default]
[NEW] Device 50:xx:xx:xx:xx:xx already
[NEW] Device 0B:xx:xx:xx:xx:xx paired
[NEW] Device 00:xx:xx:xx:xx:xx devices
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller 0C:xx:xx:xx:xx:xx Discoverable: yes ← pair after this line received
[NEW] Device F8:xx:xx:xx:xx:xx F8-xx-xx-xx-xx-xx
[CHG] Device F8:xx:xx:xx:xx:xx <several lines of gobbledegook>
[CHG] Device F8:xx:xx:xx:xx:xx ServicesResolved: yes
[CHG] Device F8:xx:xx:xx:xx:xx Paired: yes
[CHG] Device F8:xx:xx:xx:xx:xx ServicesResolved: no
[CHG] Device F8:xx:xx:xx:xx:xx Connected: no
[bluetooth]# quit
Agent unregistered
[DEL] Controller 0C:xx:xx:xx:xx:xx wren [default]

The main use I have is transfer of files (photos, music, etc) back and
forth. I always have a command running (started in ~/.xsession):
$ yes | bt-obex -s /tmp/
The idea is that I don't have to intervene on the PC to transfer a
file to it (or even be in the same room necessarily).
I should point out that the /tmp/ argument is ignored in stretch;
files arrive in ~/.cache/obexd/ regardless.

To send files from the PC, I use the command
$ bt-obex -p galaxy path/to/file
where galaxy is the bluetooth name of the device. In this case, I
obviously have to remember to turn bluetooth on in the device.
(Leaving bluetooth on will discharge the battery more quickly.)

I haven't had much success with  bt-obex -f  (ie the FTP service)
so I don't bother with that.

One wrinkle when pairing: to get the bluetooth name of the device sent
to the PC, the device should be paired while it is visible to other
devices (rather than hidden). Otherwise it will still pair, but
without setting a name, so to send files to the device you have to
use its MAC (long and unmemorable) rather than its name (memorable
and short).

And finally, this method does not work (on an older laptop) in jessie:
it refuses to make itself discoverable. It still works with wheezy,
which runs using the older method, bluetooth-agent.


Reply to: