Bug 9215

Summary: HAL should provide USB interface and configuration descriptions
Product: hal Reporter: Alex Kanavin <ak>
Component: haldAssignee: David Zeuthen (not reading bugmail) <zeuthen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: bugzilla
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Add support for interface and configuration descriptions provided by USB hardware

Description Alex Kanavin 2006-11-30 17:48:26 UTC
Many USB devices provide textual descriptions for their interfaces and
configurations. Currently HAL ignores them. For example, I have a Nokia 6680
phone which has two OBEX interfaces that provide different services, but the
only way to tell that is to read interface descriptions:

    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         2 Communications
      bInterfaceSubClass     11 OBEX
      bInterfaceProtocol      0 
      iInterface              5 SYNCML-SYNC
      CDC Header:
        bcdCDC               1.10
      CDC OBEX:
        bcdVersion           1.00
      CDC Union:
        bMasterInterface        4
        bSlaveInterface         5 
....
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        6
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         2 Communications
      bInterfaceSubClass     11 OBEX
      bInterfaceProtocol      0 
      iInterface              6 PC Suite Services
      CDC Header:
        bcdCDC               1.10
      CDC OBEX:
        bcdVersion           1.00
      CDC Union:
        bMasterInterface        6
        bSlaveInterface         7 

From reading the source code, it seems like an easy to fix thing to me. At least
on Linux these descriptions are available as 'interface' and 'configuration'
files in sysfs directories for the USB interfaces and devices respectively. The
specification should be corrected also of course. If you want, I can write the
patch.
Comment 1 Bastien Nocera 2007-02-15 14:57:58 UTC
That looks like what's needed to support nautilus-sendto on more than just Bluetooth...
Comment 2 Bastien Nocera 2007-02-15 15:20:54 UTC
See discussions at http://thread.gmane.org/gmane.comp.freedesktop.hal/6679
Comment 3 Alex Kanavin 2007-02-15 15:41:52 UTC
Actually my idea was to make it possible to do a full phone mount with gnome-volume-manager if it's plugged over USB. This is just the first step towards that :)
Comment 4 Alex Kanavin 2007-03-24 09:41:39 UTC
Created attachment 9273 [details] [review]
Add support for interface and configuration descriptions provided by USB hardware

So here is the patch that adds support for USB descriptions. I have also modified hal specification to reflect this. I have tested it on Linux and it works fine, but BSD support is untested - it should work though, because was copied from other BSD-specific USB code. Please review and commit.

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.