All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem Running Bluez Tests
@ 2013-03-25 15:41 Brendan West
  2013-03-25 16:23 ` Johan Hedberg
  0 siblings, 1 reply; 6+ messages in thread
From: Brendan West @ 2013-03-25 15:41 UTC (permalink / raw)
  To: linux-bluetooth

Hello,

I am attempting to run the tests (such as "test-discovery" and
"test-heartrate") located in the Bluez 5.2 tar package, and am running
into some problems. Whenver I try to run one of these tests, I am
getting the following error:
root@interndebian:/home/user/Downloads/bluez-5.2/test# ls
bluezutils.py sap_client.py service-spp.xml test-adapter test-health
test-nap test-thermometer
bluezutils.pyc service-did.xml simple-agent test-alert
test-health-sink test-network
dbusdef.py service-ftp.xml simple-endpoint test-cyclingspeed
test-heartrate test-profile
list-devices service-opp.xml simple-player test-device test-hfp test-proximity
monitor-bluetooth service-record.dtd simple-service test-discovery
test-manager test-sap-server
root@interndebian:/home/user/Downloads/bluez-5.2/test#
./test-heartrate -i hci1 -b FC:4E:09:DC:68:44
Traceback (most recent call last):
File "./test-heartrate", line 62, in <module>
managed_objects = bluezutils.get_managed_objects()
File "/home/user/Downloads/bluez-5.2/test/bluezutils.py", line 11, in
get_managed_objects
return manager.GetManagedObjects()
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
**keywords)
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651,
in call_blocking
message, timeout)
dbus.exceptions.DBusException:
org.freedesktop.DBus.Error.UnknownMethod: Method "GetManagedObjects"
with signature "" on interface "org.freedesktop.DBus.ObjectManager"
doesn't exist
root@interndebian:/home/user/Downloads/bluez-5.2/test#

I have tried searching the internet for solutions to this problem, but
I haven't been able to find anything. I am running Debian Wheezy on a
Raspberry Pi, my end goal being to connect to a Bluetooth Smart heart
rate monitor.
This may be an easy fix, but my knowledge of Linux (especially the
finer points) is limited, so hopefully someone else will know an
answer. Any help would be greatly appreciated. Thanks.

Brendan West

P.S.
I did follow the instructions to make and install the package, but I'm
still attempting to run the tests out of the package folder because I
couldn't find them anywhere else (I'm assuming they aren't installed
with the rest of the package since they are just tests, but I could be
wrong). I'm not sure if that is relevant, but I thought I would
mention it.

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

* Re: Problem Running Bluez Tests
  2013-03-25 15:41 Problem Running Bluez Tests Brendan West
@ 2013-03-25 16:23 ` Johan Hedberg
  2013-03-25 16:36   ` Brendan West
  0 siblings, 1 reply; 6+ messages in thread
From: Johan Hedberg @ 2013-03-25 16:23 UTC (permalink / raw)
  To: Brendan West; +Cc: linux-bluetooth

Hi Brendan,

On Mon, Mar 25, 2013, Brendan West wrote:
 ./test-heartrate -i hci1 -b FC:4E:09:DC:68:44
> Traceback (most recent call last):
> File "./test-heartrate", line 62, in <module>
> managed_objects = bluezutils.get_managed_objects()
> File "/home/user/Downloads/bluez-5.2/test/bluezutils.py", line 11, in
> get_managed_objects
> return manager.GetManagedObjects()
> File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
> return self._proxy_method(*args, **keywords)
> File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
> **keywords)
> File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651,
> in call_blocking
> message, timeout)
> dbus.exceptions.DBusException:
> org.freedesktop.DBus.Error.UnknownMethod: Method "GetManagedObjects"
> with signature "" on interface "org.freedesktop.DBus.ObjectManager"
> doesn't exist

This sounds like you still have an old (4.x) bluetoothd running. You'll
need to stop it and start the one you compiled from the 5.x tree. Also
be sure to install a new D-Bus policy (src/bluetooth.conf to
/etc/dbus-1.system.d/) since a lot of interface names have changed since
4.x.

Johan

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

* Re: Problem Running Bluez Tests
  2013-03-25 16:23 ` Johan Hedberg
@ 2013-03-25 16:36   ` Brendan West
  2013-03-26  7:25     ` Johan Hedberg
  0 siblings, 1 reply; 6+ messages in thread
From: Brendan West @ 2013-03-25 16:36 UTC (permalink / raw)
  To: Brendan West, linux-bluetooth

Johan,

On Mon, Mar 25, 2013 at 12:23 PM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> Hi Brendan,
>
> On Mon, Mar 25, 2013, Brendan West wrote:
>  ./test-heartrate -i hci1 -b FC:4E:09:DC:68:44
>> Traceback (most recent call last):
>> File "./test-heartrate", line 62, in <module>
>> managed_objects = bluezutils.get_managed_objects()
>> File "/home/user/Downloads/bluez-5.2/test/bluezutils.py", line 11, in
>> get_managed_objects
>> return manager.GetManagedObjects()
>> File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
>> return self._proxy_method(*args, **keywords)
>> File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
>> **keywords)
>> File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651,
>> in call_blocking
>> message, timeout)
>> dbus.exceptions.DBusException:
>> org.freedesktop.DBus.Error.UnknownMethod: Method "GetManagedObjects"
>> with signature "" on interface "org.freedesktop.DBus.ObjectManager"
>> doesn't exist
>
> This sounds like you still have an old (4.x) bluetoothd running. You'll
> need to stop it and start the one you compiled from the 5.x tree. Also
> be sure to install a new D-Bus policy (src/bluetooth.conf to
> /etc/dbus-1.system.d/) since a lot of interface names have changed since
> 4.x.
>
> Johan

That sounds like it could be the problem.  However, shouldn't the old
bluetoothd stop and the new one start when I reboot the Raspberry Pi?
Or do I actually have to do it manually?  If the latter, can you
explain how to do so (I am not sure how two different versions can be
installed at the same time..I was under the impression that a normal
install of the new would overwrite the old).

As for the D-Bus policy, I'm afraid that I am still not sure how to do
that one either..  I have updated D-Bus using apt-get, but you seem to
be referring to something else..  Would you mind explaining further?

Thanks for your help, and I apologize for being  completely clueless
to what you are talking about..I've only been using Linux for a short
time haha.  Thanks again.

Brendan West

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

* Re: Problem Running Bluez Tests
  2013-03-25 16:36   ` Brendan West
@ 2013-03-26  7:25     ` Johan Hedberg
  2013-03-26 13:54       ` Brendan West
  0 siblings, 1 reply; 6+ messages in thread
From: Johan Hedberg @ 2013-03-26  7:25 UTC (permalink / raw)
  To: Brendan West; +Cc: linux-bluetooth

Hi Brendan,

On Mon, Mar 25, 2013, Brendan West wrote:
> That sounds like it could be the problem.  However, shouldn't the old
> bluetoothd stop and the new one start when I reboot the Raspberry Pi?
> Or do I actually have to do it manually?  If the latter, can you
> explain how to do so (I am not sure how two different versions can be
> installed at the same time..I was under the impression that a normal
> install of the new would overwrite the old).

BlueZ 5.x installs bluetoothd by default into /usr/libexec/bluetooth/
whereas 4.x installs it to /usr/sbin/, so it wouldn't get overwritten.

> As for the D-Bus policy, I'm afraid that I am still not sure how to do
> that one either..  I have updated D-Bus using apt-get, but you seem to
> be referring to something else..  Would you mind explaining further?

D-Bus policy files are provided by each service that needs them. You
won't get the new BlueZ policy with some centralized D-Bus package. I
tried to tell you that you'll find the policy file in the BlueZ source
tree and you just need to copy it to the right place (also explained in
my email).

Johan

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

* Re: Problem Running Bluez Tests
  2013-03-26  7:25     ` Johan Hedberg
@ 2013-03-26 13:54       ` Brendan West
  2013-03-26 14:22         ` Anderson Lizardo
  0 siblings, 1 reply; 6+ messages in thread
From: Brendan West @ 2013-03-26 13:54 UTC (permalink / raw)
  To: Brendan West, linux-bluetooth

Johan,

On Tue, Mar 26, 2013 at 3:25 AM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> BlueZ 5.x installs bluetoothd by default into /usr/libexec/bluetooth/
> whereas 4.x installs it to /usr/sbin/, so it wouldn't get overwritten.

Ah, that makes sense.  I hate to keep asking questions that I probably
should already know the answer to, but how do I start the 5.x
bluetoothd?  I have tried editing the "bluetooth" file in the
"/etc/init.d/" directory and pointing the "daemon" path to the
"/usr/libexec/bluetooth/" directory (the one specified in the first
few lines of the file; the file does say that it is for Bluez 4.x, but
I couldn't find one for 5.x), but when I use the
"/etc/init.d/bluetooth start" command, it just hangs and doesn't do
anything.  Is there a different command/location that I need to
utilize for 5.x?

> D-Bus policy files are provided by each service that needs them. You
> won't get the new BlueZ policy with some centralized D-Bus package. I
> tried to tell you that you'll find the policy file in the BlueZ source
> tree and you just need to copy it to the right place (also explained in
> my email).

Sorry about that; I had misunderstood what you said in your email.  I
did figure out what you meant a while after I responded, so thank you
for pointing that out.  I did replace the file, but I'm still having
the problem that I mentioned above.

Thanks for all of your help.

Brendan West

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

* Re: Problem Running Bluez Tests
  2013-03-26 13:54       ` Brendan West
@ 2013-03-26 14:22         ` Anderson Lizardo
  0 siblings, 0 replies; 6+ messages in thread
From: Anderson Lizardo @ 2013-03-26 14:22 UTC (permalink / raw)
  To: Brendan West; +Cc: linux-bluetooth

Hi Brendan,

On Tue, Mar 26, 2013 at 9:54 AM, Brendan West
<extremeskateboarding@gmail.com> wrote:
> Johan,
>
> On Tue, Mar 26, 2013 at 3:25 AM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
>> BlueZ 5.x installs bluetoothd by default into /usr/libexec/bluetooth/
>> whereas 4.x installs it to /usr/sbin/, so it wouldn't get overwritten.
>
> Ah, that makes sense.  I hate to keep asking questions that I probably
> should already know the answer to, but how do I start the 5.x
> bluetoothd?  I have tried editing the "bluetooth" file in the
> "/etc/init.d/" directory and pointing the "daemon" path to the
> "/usr/libexec/bluetooth/" directory (the one specified in the first
> few lines of the file; the file does say that it is for Bluez 4.x, but
> I couldn't find one for 5.x), but when I use the
> "/etc/init.d/bluetooth start" command, it just hangs and doesn't do
> anything.  Is there a different command/location that I need to
> utilize for 5.x?

If you are just hacking around, you can try these steps (first restore
your /etc/init.d/bluetooth to the original content):

/etc/init.d/bluetooth stop
# do a backup of the original executable
mv /usr/sbin/bluetoothd  /usr/sbin/bluetoothd.orig
ln -s /usr/libexec/bluetooth/bluetoothd /usr/sbin/bluetoothd
/etc/init.d/bluetooth start

Note though that this is just a quick&dirty hack. The correct approach
is for you to do the proper packaging for the distro you are running
(e.g. .deb packaging for Debian based distros).

Unfortunately, I did not find any Debian based distro already
packaging BlueZ 5.x, so you will need to do your own packaging.

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil

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

end of thread, other threads:[~2013-03-26 14:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-25 15:41 Problem Running Bluez Tests Brendan West
2013-03-25 16:23 ` Johan Hedberg
2013-03-25 16:36   ` Brendan West
2013-03-26  7:25     ` Johan Hedberg
2013-03-26 13:54       ` Brendan West
2013-03-26 14:22         ` Anderson Lizardo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.