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.
XML obtained with sdptool ========================= <?xml version="1.0" encoding="UTF-8" ?> <record> <attribute id="0x0000"> <uint32 value="0x00010005" /> </attribute> <attribute id="0x0001"> <sequence> <uuid value="0x1105" /> <---- Note here </sequence> </attribute> <attribute id="0x0002"> <uint32 value="0x00000007" /> </attribute> <attribute id="0x0004"> <sequence> <sequence> <uuid value="0x0100" /> <---- Note here </sequence> <sequence> <uuid value="0x0003" /> <---- Note here <uint8 value="0x09" /> </sequence> <sequence> <uuid value="0x0008" /> <---- Note here </sequence> </sequence> </attribute> <attribute id="0x0005"> <sequence> <uuid value="0x1002" /> <---- Note here </sequence> </attribute> <attribute id="0x0006"> <sequence> <uint16 value="0x454e" /> <uint16 value="0x006a" /> <uint16 value="0x0100" /> </sequence> </attribute> <attribute id="0x0009"> <sequence> <sequence> <uuid value="0x1105" /> <---- Note here <uint16 value="0x0100" /> </sequence> </sequence> </attribute> <attribute id="0x0100"> <text value="OBEX Object Push" /> </attribute> <attribute id="0x0303"> <sequence> <uint8 value="0xff" /> </sequence> </attribute> </record> -------------------------------------------------------------- Same XML obtained with DBus DiscoverServices call ================================================= <?xml version="1.0" encoding="UTF-8" ?> <record> <attribute id="0x0000"> <uint32 value="0x00010005" /> </attribute> <attribute id="0x0001"> <sequence> <uuid value="0x0019" /> <---- Note here </sequence> </attribute> <attribute id="0x0002"> <uint32 value="0x00000007" /> </attribute> <attribute id="0x0004"> <sequence> <sequence> <uuid value="0x0019" /> <---- Note here </sequence> <sequence> <uuid value="0x0019" /> <---- Note here <uint8 value="0x09" /> </sequence> <sequence> <uuid value="0x0019" /> <---- Note here </sequence> </sequence> </attribute> <attribute id="0x0005"> <sequence> <uuid value="0x0019" /> <---- Note here </sequence> </attribute> <attribute id="0x0006"> <sequence> <uint16 value="0x454e" /> <uint16 value="0x006a" /> <uint16 value="0x0100" /> </sequence> </attribute> <attribute id="0x0009"> <sequence> <sequence> <uuid value="0x0019" /> <---- Note here <uint16 value="0x0100" /> </sequence> </sequence> </attribute> <attribute id="0x0100"> <text value="OBEX Object Push" /> </attribute> <attribute id="0x0303"> <sequence> <uint8 value="0xff" /> </sequence> </attribute> </record>
XML obtained with sdptool ========================= <?xml version="1.0" encoding="UTF-8" ?> <record> <attribute id="0x0000"> <uint32 value="0x00010003" /> </attribute> <attribute id="0x0001"> <sequence> <uuid value="00000002-0000-1000-8000-0002ee000002" /> <---- Note here </sequence> </attribute> <attribute id="0x0002"> <uint32 value="0x00000006" /> </attribute> <attribute id="0x0004"> <sequence> <sequence> <uuid value="0x0100" /> <---- Note here </sequence> <sequence> <uuid value="0x0003" /> <---- Note here <uint8 value="0x0b" /> </sequence> <sequence> <uuid value="0x0008" /> <---- Note here </sequence> </sequence> </attribute> <attribute id="0x0005"> <sequence> <uuid value="0x1002" /> <---- Note here </sequence> </attribute> <attribute id="0x0006"> <sequence> <uint16 value="0x454e" /> <uint16 value="0x006a" /> <uint16 value="0x0100" /> </sequence> </attribute> <attribute id="0x0009"> <sequence> <sequence> <uuid value="00000002-0000-1000-8000-0002ee000002" /> <---- Note here <uint16 value="0x0100" /> </sequence> </sequence> </attribute> <attribute id="0x0100"> <text value="SyncMLClient" /> </attribute> </record> -------------------------------------------------------------- Same XML obtained with DBus DiscoverServices call ================================================= <?xml version="1.0" encoding="UTF-8" ?> <record> <attribute id="0x0000"> <uint32 value="0x00010003" /> </attribute> <attribute id="0x0001"> <sequence> <uuid value="1c000000-0000-0002-0000-100080000002" /> <---- Note here </sequence> </attribute> <attribute id="0x0002"> <uint32 value="0x00000006" /> </attribute> <attribute id="0x0004"> <sequence> <sequence> <uuid value="0x0019" /> <---- Note here </sequence> <sequence> <uuid value="0x0019" /> <---- Note here <uint8 value="0x0b" /> </sequence> <sequence> <uuid value="0x0019" /> <---- Note here </sequence> </sequence> </attribute> <attribute id="0x0005"> <sequence> <uuid value="0x0019" /> <---- Note here </sequence> </attribute> <attribute id="0x0006"> <sequence> <uint16 value="0x454e" /> <uint16 value="0x006a" /> <uint16 value="0x0100" /> </sequence> </attribute> <attribute id="0x0009"> <sequence> <sequence> <uuid value="1c000000-0000-0002-0000-100080000002" /> <---- Note here <uint16 value="0x0100" /> </sequence> </sequence> </attribute> <attribute id="0x0100"> <text value="SyncMLClient" /> </attribute> </record>