Linux bluetooth development
 help / color / mirror / Atom feed
* bluez: lowercase hex digits in BDADDRs
@ 2010-05-05 13:12 Antonio Ospite
  2010-05-20  9:57 ` Antonio Ospite
  0 siblings, 1 reply; 2+ messages in thread
From: Antonio Ospite @ 2010-05-05 13:12 UTC (permalink / raw)
  To: linux-bluetooth


[-- Attachment #1.1: Type: text/plain, Size: 1021 bytes --]

Hi,

when working on Sixaxis pairing plugin I found out a weird behavior, if
I use a BDADDR with lowercase hex digits the association can fail.

The interesting bits in bluetoothd logs are reported in the attached
diff, maybe adapter_create_device() is not robust enough?

You can reproduce this behavior using a lowercase _device_ bdaddr
into these files:
    /var/lib/bluetooth/00:03:C9:XX:XX:XX/did
    /var/lib/bluetooth/00:03:C9:XX:XX:XX/lastused
    /var/lib/bluetooth/00:03:C9:XX:XX:XX/sdp
    /var/lib/bluetooth/00:03:C9:XX:XX:XX/trusts
where 00:03:C9:XX:XX:XX is the _adapter_ bdaddr.

Can anyone else confirm that? bluez-4.64

Not a big deal, but worth reporting IMHO.

Thanks,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: bluetoothd-log-lowercase-hex-bdaddr.diff --]
[-- Type: text/x-diff; name="bluetoothd-log-lowercase-hex-bdaddr.diff", Size: 1955 bytes --]

--- bluetoothd.log.bad	2010-05-05 14:02:10.000000000 +0200
+++ bluetoothd.log.good	2010-05-05 14:12:46.000000000 +0200
@@ -134,13 +134,14 @@ bluetoothd[XXXX]: Computer is classified
 bluetoothd[XXXX]: Setting 0x000104 for major/minor device class
 bluetoothd[XXXX]: Agent registered for hci0 at :1.50:/org/bluez/agent/hci0
 bluetoothd[XXXX]: Found Sixaxis device
-bluetoothd[XXXX]: Device Bluetooth address: 00:1b:fb:xx:xx:xx
-bluetoothd[XXXX]: adapter_create_device(00:1b:fb:xx:xx:xx)
+bluetoothd[XXXX]: Device Bluetooth address: 00:1B:FB:XX:XX:XX
+bluetoothd[XXXX]: adapter_create_device(00:1B:FB:XX:XX:XX)
 bluetoothd[XXXX]: Creating device /org/bluez/XXXX/hci0/dev_00_1B_FB_XX_XX_XX
 bluetoothd[XXXX]: btd_device_ref(0x7fdd46a2bb10): ref=1
 bluetoothd[XXXX]: Probe drivers for /org/bluez/XXXX/hci0/dev_00_1B_FB_XX_XX_XX
 bluetoothd[XXXX]: hid_device_probe: path /org/bluez/XXXX/hci0/dev_00_1B_FB_XX_XX_XX
-bluetoothd[XXXX]: probe failed with driver input-hid for device /org/bluez/XXXX/hci0/dev_00_1B_FB_XX_XX_XX
+bluetoothd[XXXX]: btd_device_ref(0x7fdd46a2bb10): ref=2
+bluetoothd[XXXX]: Registered interface org.bluez.Input on path /org/bluez/XXXX/hci0/dev_00_1B_FB_XX_XX_XX
 bluetoothd[XXXX]: Adapter bdaddr 00:03:C9:XX:XX:XX
 bluetoothd[XXXX]: Master Bluetooth address: 00:03:C9:XX:XX:XX
 bluetoothd[XXXX]: New Master Bluetooth address: 00:03:C9:XX:XX:XX
@@ -148,9 +149,3 @@ bluetoothd[XXXX]: adapter_get_device(00:
 bluetoothd[XXXX]: Incoming connection on PSM 17
 bluetoothd[XXXX]: authorize request was sent for /org/bluez/XXXX/hci0/dev_00_1B_FB_XX_XX_XX
 bluetoothd[XXXX]: Incoming connection on PSM 19
-bluetoothd[XXXX]: adapter_get_device(00:1B:FB:XX:XX:XX)
-bluetoothd[XXXX]: Incoming connection on PSM 17
-bluetoothd[XXXX]: Incoming connection on PSM 19
-bluetoothd[XXXX]: adapter_get_device(00:1B:FB:XX:XX:XX)
-bluetoothd[XXXX]: Incoming connection on PSM 17
-bluetoothd[XXXX]: Incoming connection on PSM 19

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

end of thread, other threads:[~2010-05-20  9:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-05 13:12 bluez: lowercase hex digits in BDADDRs Antonio Ospite
2010-05-20  9:57 ` Antonio Ospite

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