public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] How to properly set up Bluetooth
@ 2014-02-18 14:34 Ralf
  2014-02-18 14:42 ` covici
  2014-02-18 15:05 ` Canek Peláez Valdés
  0 siblings, 2 replies; 11+ messages in thread
From: Ralf @ 2014-02-18 14:34 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1566 bytes --]

Hi,

i'm trying to set up a simple bluetooth keyboard, but somehow it won't
work :-)

This is my setup:
Systemd + GDM + Fluxbox (this is the easiest way for me to use
gnome-stuff like gnome-keyring-daemon, ... In the background my fluxbox
is also running a gnome-settings-daemon)

hcitool dev successfully detects my bluetooth device.

According to [1] I tried to set up my keyboard using the command line.
But actually simple-agent doesn't seem to be available in bluez 5.x.
So I tried to use blueman-applet. This is a snippet of the output of
blueman-applet:

    Function on_manager_state_changed on RecentConns Failed
    Traceback (most recent call last):
      File
    "/usr/lib64/python2.7/site-packages/blueman/main/PluginManager.py",
    line 220, in Run
        ret = getattr(inst, function)(*args, **kwargs)
      File
    "/usr/lib64/python2.7/site-packages/blueman/plugins/applet/RecentConns.py",
    line 195, in on_manager_state_changed
        adapters = self.Applet.Manager.ListAdapters()
      File "/usr/lib64/python2.7/site-packages/blueman/bluez/utils.py",
    line 28, in warp
        raise errors.parse_dbus_error(exception)
    DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method
    "ListAdapters" with signature "" on interface "org.bluez.Manager"
    doesn't exist


It seems to me that this is a dbus problem or something like that, but I
don't know what I am doing wrong.
I started "systemctl start bluetooth" and my user is in the group plugdev.

Any suggestions?

[1] http://wiki.gentoo.org/wiki/Bluetooth

Regards
  Ralf

[-- Attachment #2: Type: text/html, Size: 2175 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] How to properly set up Bluetooth
  2014-02-18 14:34 [gentoo-user] How to properly set up Bluetooth Ralf
@ 2014-02-18 14:42 ` covici
  2014-02-18 15:05 ` Canek Peláez Valdés
  1 sibling, 0 replies; 11+ messages in thread
From: covici @ 2014-02-18 14:42 UTC (permalink / raw
  To: gentoo-user

Ralf <ralf+gentoo@ramses-pyramidenbau.de> wrote:

> Hi,
> 
> i'm trying to set up a simple bluetooth keyboard, but somehow it won't
> work :-)
> 
> This is my setup:
> Systemd + GDM + Fluxbox (this is the easiest way for me to use
> gnome-stuff like gnome-keyring-daemon, ... In the background my fluxbox
> is also running a gnome-settings-daemon)
> 
> hcitool dev successfully detects my bluetooth device.
> 
> According to [1] I tried to set up my keyboard using the command line.
> But actually simple-agent doesn't seem to be available in bluez 5.x.
> So I tried to use blueman-applet. This is a snippet of the output of
> blueman-applet:
> 
>     Function on_manager_state_changed on RecentConns Failed
>     Traceback (most recent call last):
>       File
>     "/usr/lib64/python2.7/site-packages/blueman/main/PluginManager.py",
>     line 220, in Run
>         ret = getattr(inst, function)(*args, **kwargs)
>       File
>     "/usr/lib64/python2.7/site-packages/blueman/plugins/applet/RecentConns.py",
>     line 195, in on_manager_state_changed
>         adapters = self.Applet.Manager.ListAdapters()
>       File "/usr/lib64/python2.7/site-packages/blueman/bluez/utils.py",
>     line 28, in warp
>         raise errors.parse_dbus_error(exception)
>     DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method
>     "ListAdapters" with signature "" on interface "org.bluez.Manager"
>     doesn't exist
> 
> 
> It seems to me that this is a dbus problem or something like that, but I
> don't know what I am doing wrong.
> I started "systemctl start bluetooth" and my user is in the group plugdev.
> 
> Any suggestions?
> 
> [1] http://wiki.gentoo.org/wiki/Bluetooth

I would like to have simple-agent back as well, at least the script part
-- I  think the other bits are still there, why they would take away
something so ssimple I have no idea.


-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici
         covici@ccs.covici.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] How to properly set up Bluetooth
  2014-02-18 14:34 [gentoo-user] How to properly set up Bluetooth Ralf
  2014-02-18 14:42 ` covici
@ 2014-02-18 15:05 ` Canek Peláez Valdés
  2014-02-18 15:49   ` Ralf
  1 sibling, 1 reply; 11+ messages in thread
From: Canek Peláez Valdés @ 2014-02-18 15:05 UTC (permalink / raw
  To: gentoo-user

On Tue, Feb 18, 2014 at 8:34 AM, Ralf
<ralf+gentoo@ramses-pyramidenbau.de> wrote:
> Hi,
>
> i'm trying to set up a simple bluetooth keyboard, but somehow it won't work
> :-)
>
> This is my setup:
> Systemd + GDM + Fluxbox (this is the easiest way for me to use gnome-stuff
> like gnome-keyring-daemon, ... In the background my fluxbox is also running
> a gnome-settings-daemon)
>
> hcitool dev successfully detects my bluetooth device.
>
> According to [1] I tried to set up my keyboard using the command line. But
> actually simple-agent doesn't seem to be available in bluez 5.x.
> So I tried to use blueman-applet. This is a snippet of the output of
> blueman-applet:
>
> Function on_manager_state_changed on RecentConns Failed
> Traceback (most recent call last):
>   File "/usr/lib64/python2.7/site-packages/blueman/main/PluginManager.py",
> line 220, in Run
>     ret = getattr(inst, function)(*args, **kwargs)
>   File
> "/usr/lib64/python2.7/site-packages/blueman/plugins/applet/RecentConns.py",
> line 195, in on_manager_state_changed
>     adapters = self.Applet.Manager.ListAdapters()
>   File "/usr/lib64/python2.7/site-packages/blueman/bluez/utils.py", line 28,
> in warp
>     raise errors.parse_dbus_error(exception)
> DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method
> "ListAdapters" with signature "" on interface "org.bluez.Manager" doesn't
> exist
>
>
> It seems to me that this is a dbus problem or something like that, but I
> don't know what I am doing wrong.
> I started "systemctl start bluetooth" and my user is in the group plugdev.
>
> Any suggestions?

Can you install gnome-bluetooth and run bluetooth-wizard?

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] How to properly set up Bluetooth
  2014-02-18 15:05 ` Canek Peláez Valdés
@ 2014-02-18 15:49   ` Ralf
  2014-02-18 16:10     ` Canek Peláez Valdés
  0 siblings, 1 reply; 11+ messages in thread
From: Ralf @ 2014-02-18 15:49 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 372 bytes --]

On 02/18/14 16:05, Canek Peláez Valdés wrote:
> install gnome-bluetooth and run blue
This is what I get:

    (bluetooth-wizard:3156): Bluetooth-WARNING **: Pair() failed:
    Timeout was reached

    ** (bluetooth-wizard:3156): WARNING **: Setting up 'KC1280 BT
    Keyboard' failed: Timeout was reached

The keyboard works fine with my android phone.

Regards
  Ralf


[-- Attachment #2: Type: text/html, Size: 871 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] How to properly set up Bluetooth
  2014-02-18 15:49   ` Ralf
@ 2014-02-18 16:10     ` Canek Peláez Valdés
  2014-02-18 16:14       ` Ralf
  0 siblings, 1 reply; 11+ messages in thread
From: Canek Peláez Valdés @ 2014-02-18 16:10 UTC (permalink / raw
  To: gentoo-user

On Tue, Feb 18, 2014 at 9:49 AM, Ralf
<ralf+gentoo@ramses-pyramidenbau.de> wrote:
> On 02/18/14 16:05, Canek Peláez Valdés wrote:
>
> install gnome-bluetooth and run blue
>
> This is what I get:
>
> (bluetooth-wizard:3156): Bluetooth-WARNING **: Pair() failed: Timeout was
> reached
>
> ** (bluetooth-wizard:3156): WARNING **: Setting up 'KC1280 BT Keyboard'
> failed: Timeout was reached
>
> The keyboard works fine with my android phone.

OK, I think I see the problem. Do you have the bluetooth service
running? What's the output for:

systemctl status bluetooth.service

Supposedly it should autostart by dbus activation.

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] How to properly set up Bluetooth
  2014-02-18 16:10     ` Canek Peláez Valdés
@ 2014-02-18 16:14       ` Ralf
  2014-02-18 16:20         ` Canek Peláez Valdés
  0 siblings, 1 reply; 11+ messages in thread
From: Ralf @ 2014-02-18 16:14 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

On 02/18/14 17:10, Canek Peláez Valdés wrote:
> systemctl status bluetooth.service

Yes, sure, as I wrote above.

       Active: active (running) since Tue 2014-02-18 16:57:05 CET; 15min ago

    ps auxw|grep bluetoot
        root      3571 27.6  0.0  21200  2112 ?        Rs   16:57   4:29
    /usr/libexec/bluetooth/bluetoothd

As you see everything is actually running fine... I even tried to
restart it several times

[-- Attachment #2: Type: text/html, Size: 929 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] How to properly set up Bluetooth
  2014-02-18 16:14       ` Ralf
@ 2014-02-18 16:20         ` Canek Peláez Valdés
  2014-02-18 16:49           ` Ralf
  0 siblings, 1 reply; 11+ messages in thread
From: Canek Peláez Valdés @ 2014-02-18 16:20 UTC (permalink / raw
  To: gentoo-user

On Tue, Feb 18, 2014 at 10:14 AM, Ralf
<ralf+gentoo@ramses-pyramidenbau.de> wrote:
> On 02/18/14 17:10, Canek Peláez Valdés wrote:
>
> systemctl status bluetooth.service
>
>
> Yes, sure, as I wrote above.
>
>    Active: active (running) since Tue 2014-02-18 16:57:05 CET; 15min ago
>
> ps auxw|grep bluetoot
>     root      3571 27.6  0.0  21200  2112 ?        Rs   16:57   4:29
> /usr/libexec/bluetooth/bluetoothd
>
> As you see everything is actually running fine... I even tried to restart it
> several times

OK, sorry, I hadn't read carefully your first post. blueman-applet
fails because it uses the 4.x dbus API from bluez. gnome-bluetooth
uses the 5.x dbus API, and AFAIK, right now it's the only tool using
it.

So, with gnome-bluetooth you can detect your keyboard but the pairing
fails? You say you paired the keyboard correctly with your android
phone; you don't need to do something in the keyboard to pair it to a
different hosts? Something like keep pressing the power button?

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] How to properly set up Bluetooth
  2014-02-18 16:20         ` Canek Peláez Valdés
@ 2014-02-18 16:49           ` Ralf
  2014-02-18 16:57             ` Ralf
  0 siblings, 1 reply; 11+ messages in thread
From: Ralf @ 2014-02-18 16:49 UTC (permalink / raw
  To: gentoo-user

I got it working!

But I can't reproduce what i did..

I played around with "bluetoothctl"  which seems to be a interactive
replacement for simple-agent.
After powering my bluetooth device on and off, trusting and untrusting,
pairing and unpairing for several times it now *seems* to work.
It even connects automatically after turning it on :-)

Bluetooth stuff is really weird....

Thanks!

On 02/18/14 17:20, Canek Peláez Valdés wrote:
> On Tue, Feb 18, 2014 at 10:14 AM, Ralf
> <ralf+gentoo@ramses-pyramidenbau.de> wrote:
>> On 02/18/14 17:10, Canek Peláez Valdés wrote:
>>
>> systemctl status bluetooth.service
>>
>>
>> Yes, sure, as I wrote above.
>>
>>    Active: active (running) since Tue 2014-02-18 16:57:05 CET; 15min ago
>>
>> ps auxw|grep bluetoot
>>     root      3571 27.6  0.0  21200  2112 ?        Rs   16:57   4:29
>> /usr/libexec/bluetooth/bluetoothd
>>
>> As you see everything is actually running fine... I even tried to restart it
>> several times
> OK, sorry, I hadn't read carefully your first post. blueman-applet
> fails because it uses the 4.x dbus API from bluez. gnome-bluetooth
> uses the 5.x dbus API, and AFAIK, right now it's the only tool using
> it.
>
> So, with gnome-bluetooth you can detect your keyboard but the pairing
> fails? You say you paired the keyboard correctly with your android
> phone; you don't need to do something in the keyboard to pair it to a
> different hosts? Something like keep pressing the power button?
>
> Regards.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] How to properly set up Bluetooth
  2014-02-18 16:49           ` Ralf
@ 2014-02-18 16:57             ` Ralf
  2014-02-18 17:24               ` Canek Peláez Valdés
  2014-02-18 17:27               ` covici
  0 siblings, 2 replies; 11+ messages in thread
From: Ralf @ 2014-02-18 16:57 UTC (permalink / raw
  To: gentoo-user

Oh no... After turning of the keyboard, bluetoothd start to consume 100%
CPU...

I have to run systemctl restart bluetooth after unconnecting my device.

Come on...

On 02/18/14 17:49, Ralf wrote:
> I got it working!
>
> But I can't reproduce what i did..
>
> I played around with "bluetoothctl"  which seems to be a interactive
> replacement for simple-agent.
> After powering my bluetooth device on and off, trusting and untrusting,
> pairing and unpairing for several times it now *seems* to work.
> It even connects automatically after turning it on :-)
>
> Bluetooth stuff is really weird....
>
> Thanks!
>
> On 02/18/14 17:20, Canek Peláez Valdés wrote:
>> On Tue, Feb 18, 2014 at 10:14 AM, Ralf
>> <ralf+gentoo@ramses-pyramidenbau.de> wrote:
>>> On 02/18/14 17:10, Canek Peláez Valdés wrote:
>>>
>>> systemctl status bluetooth.service
>>>
>>>
>>> Yes, sure, as I wrote above.
>>>
>>>    Active: active (running) since Tue 2014-02-18 16:57:05 CET; 15min ago
>>>
>>> ps auxw|grep bluetoot
>>>     root      3571 27.6  0.0  21200  2112 ?        Rs   16:57   4:29
>>> /usr/libexec/bluetooth/bluetoothd
>>>
>>> As you see everything is actually running fine... I even tried to restart it
>>> several times
>> OK, sorry, I hadn't read carefully your first post. blueman-applet
>> fails because it uses the 4.x dbus API from bluez. gnome-bluetooth
>> uses the 5.x dbus API, and AFAIK, right now it's the only tool using
>> it.
>>
>> So, with gnome-bluetooth you can detect your keyboard but the pairing
>> fails? You say you paired the keyboard correctly with your android
>> phone; you don't need to do something in the keyboard to pair it to a
>> different hosts? Something like keep pressing the power button?
>>
>> Regards.
>



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] How to properly set up Bluetooth
  2014-02-18 16:57             ` Ralf
@ 2014-02-18 17:24               ` Canek Peláez Valdés
  2014-02-18 17:27               ` covici
  1 sibling, 0 replies; 11+ messages in thread
From: Canek Peláez Valdés @ 2014-02-18 17:24 UTC (permalink / raw
  To: gentoo-user

On Tue, Feb 18, 2014 at 10:57 AM, Ralf
<ralf+gentoo@ramses-pyramidenbau.de> wrote:
> Oh no... After turning of the keyboard, bluetoothd start to consume 100%
> CPU...
>
> I have to run systemctl restart bluetooth after unconnecting my device.

Please don't top-post.

That seems like a bug. What does the logs say?

journalctl -b -u bluetooth.service

Regards.
-- 
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [gentoo-user] How to properly set up Bluetooth
  2014-02-18 16:57             ` Ralf
  2014-02-18 17:24               ` Canek Peláez Valdés
@ 2014-02-18 17:27               ` covici
  1 sibling, 0 replies; 11+ messages in thread
From: covici @ 2014-02-18 17:27 UTC (permalink / raw
  To: gentoo-user

Ralf <ralf+gentoo@ramses-pyramidenbau.de> wrote:

> Oh no... After turning of the keyboard, bluetoothd start to consume 100%
> CPU...
> 
> I have to run systemctl restart bluetooth after unconnecting my device.
> 
> Come on...
> 
> On 02/18/14 17:49, Ralf wrote:
> > I got it working!
> >
> > But I can't reproduce what i did..
> >
> > I played around with "bluetoothctl"  which seems to be a interactive
> > replacement for simple-agent.
> > After powering my bluetooth device on and off, trusting and untrusting,
> > pairing and unpairing for several times it now *seems* to work.
> > It even connects automatically after turning it on :-)
> >
> > Bluetooth stuff is really weird....
> >
> > Thanks!
> >
> > On 02/18/14 17:20, Canek Peláez Valdés wrote:
> >> On Tue, Feb 18, 2014 at 10:14 AM, Ralf
> >> <ralf+gentoo@ramses-pyramidenbau.de> wrote:
> >>> On 02/18/14 17:10, Canek Peláez Valdés wrote:
> >>>
> >>> systemctl status bluetooth.service
> >>>
> >>>
> >>> Yes, sure, as I wrote above.
> >>>
> >>>    Active: active (running) since Tue 2014-02-18 16:57:05 CET; 15min ago
> >>>
> >>> ps auxw|grep bluetoot
> >>>     root      3571 27.6  0.0  21200  2112 ?        Rs   16:57   4:29
> >>> /usr/libexec/bluetooth/bluetoothd
> >>>
> >>> As you see everything is actually running fine... I even tried to restart it
> >>> several times
> >> OK, sorry, I hadn't read carefully your first post. blueman-applet
> >> fails because it uses the 4.x dbus API from bluez. gnome-bluetooth
> >> uses the 5.x dbus API, and AFAIK, right now it's the only tool using
> >> it.
> >>
> >> So, with gnome-bluetooth you can detect your keyboard but the pairing
> >> fails? You say you paired the keyboard correctly with your android
> >> phone; you don't need to do something in the keyboard to pair it to a
> >> different hosts? Something like keep pressing the power button?

Any documentation on bluetoothctl?  There is no man page at all.


-- 
Your life is like a penny.  You're going to lose it.  The question is:
How do
you spend it?

         John Covici
         covici@ccs.covici.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-02-18 17:28 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-18 14:34 [gentoo-user] How to properly set up Bluetooth Ralf
2014-02-18 14:42 ` covici
2014-02-18 15:05 ` Canek Peláez Valdés
2014-02-18 15:49   ` Ralf
2014-02-18 16:10     ` Canek Peláez Valdés
2014-02-18 16:14       ` Ralf
2014-02-18 16:20         ` Canek Peláez Valdés
2014-02-18 16:49           ` Ralf
2014-02-18 16:57             ` Ralf
2014-02-18 17:24               ` Canek Peláez Valdés
2014-02-18 17:27               ` covici

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox