Bug 10631 (Bluetooth_ACL_SCO)

Summary: Bluetooth ACL and SCO Links
Product: hal Reporter: Luiz Augusto von Dentz <luiz.dentz>
Component: haldAssignee: Luiz Augusto von Dentz <luiz.dentz>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: marcel
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch 1 of 1
Patch 1 of 1

Description Luiz Augusto von Dentz 2007-04-12 14:55:58 UTC
hald detects Bluetooth ACL (Asynchronous Connectionless Link) as Bluetooth Host Controller
Comment 1 Danny Kukawka 2007-04-13 05:23:13 UTC
Please provide lshal output and ls -lhaR from the device in sysfs. 
Comment 2 Luiz Augusto von Dentz 2007-04-13 10:25:44 UTC
It happens to SCO links too:

Hald output:

14:14:10.919 [I] osspec.c:226: SEQNUM=3118, ACTION=add, SUBSYSTEM=bluetooth, DEVPATH=/sys/class/bluetooth/hci0/sco001317E86857, DEVNAME=, IFINDEX=0
14:14:10.919 [I] hotplug.c:134: /sys/class/bluetooth/hci0/sco001317E86857 is a device (subsystem)
14:14:10.919 [I] osspec.c:781: hal_util_find_known_parent: '/sys/class/bluetooth/hci0/sco001317E86857'->'/sys/class/bluetooth/hci0'
14:14:10.919 [I] device.c:3395: add_dev: subsys=bluetooth sysfs_path=/sys/class/bluetooth/hci0/sco001317E86857 dev= parent_dev=0x080ab610
14:14:10.922 [I] device.c:3257: Add callouts completed udi=/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0_bluetooth_hci_bluetooth_hci
14:14:10.923 [I] hald.c:103: Added device to GDL; udi=/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0_bluetooth_hci_bluetooth_hci
Comment 3 Luiz Augusto von Dentz 2007-04-13 11:46:24 UTC
Created attachment 9597 [details] [review]
Patch 1 of 1

Prevent ACL and SCO Links to be announced as Bluetooth HCI.
Comment 4 David Zeuthen (not reading bugmail) 2007-04-16 10:54:53 UTC
The patch looks pretty good; three items

 - will need a patch for the docs as well; also, you don't need to set .physical_device - that's just some backwards stuff we're keeping for existing code since we decided to use the term "originating_device" instead of "physical_device" going forward.

 - what version of the kernel exports this?

 - also, can you attach lshal output of what this looks like?

Thanks!
Comment 5 Marcel Holtmann 2007-04-16 11:28:52 UTC
Starting with kernel 2.6.19 the bnepX devices are integrated with sysfs and the links to the ACL connections and the HCI devices are provided.
Comment 6 Luiz Augusto von Dentz 2007-04-16 14:12:46 UTC
lshal:

udi = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0_bluetooth_hci'
  bluetooth_hci.originating_device = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0'  (string)
  bluetooth_hci.physical_device = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0'  (string)
  info.capabilities = {'bluetooth_hci'} (string list)
  info.category = 'bluetooth_hci'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0'  (string)
  info.product = 'Bluetooth Host Controller Interface'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0_bluetooth_hci'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'bluetooth'  (string)
  linux.sysfs_path = '/sys/class/bluetooth/hci0'  (string)

udi = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0_bluetooth_hci_bluetooth_sco'
  bluetooth_sco.originating_device = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0_bluetooth_hci'  (string)
  bluetooth_sco.physical_device = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0_bluetooth_hci'  (string)
  info.capabilities = {'bluetooth_sco'} (string list)
  info.category = 'bluetooth_sco'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0_bluetooth_hci'  (string)
  info.product = 'Bluetooth Synchronous Connection-oriented Link'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0_bluetooth_hci_bluetooth_sco'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'bluetooth'  (string)
  linux.sysfs_path = '/sys/class/bluetooth/hci0/sco001317E86857'  (string)

udi = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0_bluetooth_hci_bluetooth_acl'
  bluetooth_acl.originating_device = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0_bluetooth_hci'  (string)
  bluetooth_acl.physical_device = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0_bluetooth_hci'  (string)
  info.capabilities = {'bluetooth_acl'} (string list)
  info.category = 'bluetooth_acl'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0_bluetooth_hci'  (string)
  info.product = 'Bluetooth Asynchronous Connection-oriented Link'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_a12_1_noserial_if0_bluetooth_hci_bluetooth_acl'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'bluetooth'  (string)
  linux.sysfs_path = '/sys/class/bluetooth/hci0/acl001317E86857'  (string)
Comment 7 Luiz Augusto von Dentz 2007-04-17 13:40:45 UTC
Created attachment 9642 [details] [review]
Patch 1 of 1

Remove deprecated physical_device for bluetooth_acl and bluetooth_sco.
Comment 8 David Zeuthen (not reading bugmail) 2007-04-22 19:29:28 UTC
I committed that patch with this one on top
 http://gitweb.freedesktop.org/?p=hal.git;a=commitdiff;h=f849652ff11b22b8685c9bd4728e8eb2299a4c96

Here's a snippet of lshal to sho the new properties

udi = '/org/freedesktop/Hal/devices/usb_device_5ac_8205_noserial_if0_bluetooth_hci_16cb0c24e6'
  bluetooth_hci.address = 97895851238  (0x16cb0c24e6)  (uint64)
  bluetooth_hci.originating_device = '/org/freedesktop/Hal/devices/usb_device_5ac_8205_noserial_if0'  (string)
  info.capabilities = {'bluetooth_hci'} (string list)
  info.category = 'bluetooth_hci'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_5ac_8205_noserial_if0'  (string)
  info.product = 'Bluetooth Host Controller Interface'  (string)
  info.udi = '/org/freedesktop/Hal/devices/usb_device_5ac_8205_noserial_if0_bluetooth_hci_16cb0c24e6'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'bluetooth'  (string)
  linux.sysfs_path = '/sys/class/bluetooth/hci0'  (string)

udi = '/org/freedesktop/Hal/devices/bluetooth_acl_50f2e9011e'
  bluetooth_acl.address = 347672740126  (0x50f2e9011e)  (uint64)
  bluetooth_acl.originating_device = '/org/freedesktop/Hal/devices/usb_device_5ac_8205_noserial_if0_bluetooth_hci_16cb0c24e6'  (string)
  info.capabilities = {'bluetooth_acl'} (string list)
  info.category = 'bluetooth_acl'  (string)
  info.parent = '/org/freedesktop/Hal/devices/usb_device_5ac_8205_noserial_if0_bluetooth_hci_16cb0c24e6'  (string)
  info.product = 'Bluetooth Asynchronous Connection-oriented Link'  (string)
  info.udi = '/org/freedesktop/Hal/devices/bluetooth_acl_50f2e9011e'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'bluetooth'  (string)
  linux.sysfs_path = '/sys/class/bluetooth/hci0/acl0050F2E9011E'  (string)

udi = '/org/freedesktop/Hal/devices/bluetooth_acl_50f2e9011e_logicaldev_input'
  info.capabilities = {'input', 'input.mouse'} (string list)
  info.category = 'input'  (string)
  info.parent = '/org/freedesktop/Hal/devices/bluetooth_acl_50f2e9011e'  (string)
  info.product = 'Microsoft Five Button Mouse'  (string)
  info.udi = '/org/freedesktop/Hal/devices/bluetooth_acl_50f2e9011e_logicaldev_input'  (string)
  input.device = '/dev/input/event9'  (string)
  input.originating_device = '/org/freedesktop/Hal/devices/bluetooth_acl_50f2e9011e'  (string)
  input.physical_device = '/org/freedesktop/Hal/devices/bluetooth_acl_50f2e9011e'  (string)
  input.product = 'Microsoft Five Button Mouse'  (string)
  linux.device_file = '/dev/input/event9'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'input'  (string)
  linux.sysfs_path = '/sys/class/input/input15/event9'  (string)

Thanks.
Comment 9 David Zeuthen (not reading bugmail) 2007-04-22 20:32:37 UTC
Btw, for device object of bluetooth_acl and bluetooth_sco we should probably show some more information a'la

# hcitool info 00:50:F2:E9:01:1E
Requesting information ...
        BD Address:  00:50:F2:E9:01:1E
        Device Name: Microsoft Mouse
        LMP Version: 1.2 (0x2) LMP Subversion: 0x100
        Manufacturer: Broadcom Corporation (15)
        Features: 0xbc 0x02 0x04 0x28 0x08 0x08 0x00 0x00
                <encryption> <slot offset> <timing accuracy> <role switch> 
                <sniff mode> <RSSI> <power control> <enhanced iscan> 
                <interlaced pscan> <AFH cap. slave> <AFH cap. master> 


What's the best way to do this? Is it going to cause lots of network traffic to retrieve this or is it already cache by the kernel/Bluez? Thanks. I'll look at the other patch (bug 10577 tomorrow).
Comment 10 Marcel Holtmann 2007-04-22 21:21:45 UTC
Information like this are possible and can be retrieved via D-Bus. However I plan to make them available through sysfs, too. Currently the kernel retrieves only the information it really needs. In the future this will change.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.