2009-01-09 16:52:22

by Daniele Benucci

[permalink] [raw]
Subject: Fwd: Inconsistencies with UUIDs in XML service descriptors

I've noticed a strange behaviour in the last versions of Bluez (at
least >= 4.19) when retrieving services via the DBus method in
org.bluez.Device.DiscoverServices:
the XMLs returned by this DBus call have the "value" attribute of
_every_ "uuid" element set to "0x0019", for the records with 16-bit
uuids.
128-bit uuids are not correctly represented too, seeming to be 4-bytes
right-shifted.
When performing service discovery via sdptool with the --xml parameter
the output is correct.

I'm attaching two examples for the two cases

I experienced this in Bluez 4.19 shipped with OpenSuse 11.1, and in
Bluez 4.25 packaged for Ubuntu 8.10 (unofficial) at
http://ppa.launchpad.net/blueman/. This does not happen in Bluez 4.12
shipped with Ubuntu 8.10

I'm posting here this report as I didn't find a Bluez bug tracker and
the bug seems to be distribution-independant

Thanks for your attention

Daniele Benucci

--
Grabel's Law:
2 is not equal to 3 -- not even for large values of 2.


Attachments:
(No filename) (981.00 B)
BluezBug - UUID16.txt (2.61 kB)
BluezBug - UUID128.txt (2.56 kB)
Download all attachments

2009-01-12 20:47:17

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: Inconsistencies with UUIDs in XML service descriptors

Hi,

I fix has been pushed upstream, thanks for reporting it.

--
Luiz Augusto von Dentz
Engenheiro de Computa??o

2009-01-12 14:32:33

by Johan Hedberg

[permalink] [raw]
Subject: Re: Inconsistencies with UUIDs in XML service descriptors

Hi Daniele,

On Jan 12, 2009, at 15:18, Daniele Benucci wrote:
> 2009/1/10 Johan Hedberg <[email protected]>:
>> Could you perhaps try to use git bisect
>> to determine the exact patch that causes the bug?
>
> According to git-bisect commit introducing the bug is
>
> 204180c7dc2e20b9b701275a3fefb52707720f54
>
> (Make use of sdp_copy_record.)

Thanks a lot! This will really help in investigating and fixing the
issue. We'll most likely have it fixed for the next BlueZ release
(Luiz, who authored the sdp_copy_record function, is now looking into
it).

Johan

2009-01-12 14:18:55

by Daniele Benucci

[permalink] [raw]
Subject: Re: Inconsistencies with UUIDs in XML service descriptors

2009/1/10 Johan Hedberg <[email protected]>:
> Could you perhaps try to use git bisect
> to determine the exact patch that causes the bug?

According to git-bisect commit introducing the bug is

204180c7dc2e20b9b701275a3fefb52707720f54

(Make use of sdp_copy_record.)

Regards

Daniele.

--
Grabel's Law:
2 is not equal to 3 -- not even for large values of 2.

2009-01-10 12:41:19

by Johan Hedberg

[permalink] [raw]
Subject: Re: Inconsistencies with UUIDs in XML service descriptors

Hi Daniele,

On Sat, Jan 10, 2009, Daniele Benucci wrote:
> 2009/1/9 Daniele Benucci <[email protected]>
> > I've noticed a strange behaviour in the last versions of Bluez (at
> > least >= 4.19) when retrieving services via the DBus method in
> > org.bluez.Device.DiscoverServices:
>
> I compiled 4.18 from source and the result of DiscoverServices reports
> the correct UUIDs both for 16-bit and 128-bit

Looking at the difference between 4.18 and 4.19 (git diff 4.18..4.19) at
least the new sdp_copy_record implementation seems like a potential
candidate for the cause of this. Could you perhaps try to use git bisect
to determine the exact patch that causes the bug?

Johan

2009-01-10 12:02:46

by Daniele Benucci

[permalink] [raw]
Subject: Re: Inconsistencies with UUIDs in XML service descriptors

2009/1/9 Daniele Benucci <[email protected]>
> I've noticed a strange behaviour in the last versions of Bluez (at
> least >= 4.19) when retrieving services via the DBus method in
> org.bluez.Device.DiscoverServices:

I compiled 4.18 from source and the result of DiscoverServices reports
the correct UUIDs both for 16-bit and 128-bit

Daniele Benucci

--
Grabel's Law:
2 is not equal to 3 -- not even for large values of 2.