Details
-
Bug
-
Resolution: Done
-
P4: Low
-
5.11.3, 5.12.0
-
None
-
Linux Raspbian Stretch 2018-11-13
Linux Mint 19
-
-
1b19d7981610c2a9587544da654b4ca783e1bf6b (qt/qtconnectivity/5.12)
Description
The XML output writes signed ints in hex format but w/out the "0x" prefix. So (as I understand it) SDP tries to parse them as base-10 values. E.g. using sdptool to view the resulting service record will show the attribute is ignored entirely when a hex letter (a-f) is present, or wrong when the base 10 value doesn't correspond to the base 16 value. See the code here (qbluetoothserviceinfo_bluez.cpp::writeAttribute where it handles Char/Short/Int types).
Unsigned ints are written properly.
I'm not sure how many attributes actually use signed values... so that's probably why this was never noticed. I only noticed by accident when I didn't properly QVariant::fromValue() my signed ints.
Thanks,
-Max