[libhid-discuss] [linhid-discuss] usb_control_msg
lundman
lundman at lundman.net
Sat Jun 23 02:59:40 UTC 2007
I have never managed to get it to talk on 0x81, but that has always been
due to not having exclusive access to the device (since HID has it).
That includes enumerating the endpoints. The Linux driver only uses
libusb, but since it has the usb_detach_kernel_driver_np() function they
can force exclusive access. I can do a similar thing by creating a
no-code kext, but really I'd rather try to talk to it the proper way.
Since it is a HID device, I would assume that means to use HID API. And
here we are. :)
USB Probe I know.. tried to capture the official driver talking to the
device, but it doesn't show anything HID does, just the low level USB items.
Anyway, the tree is as follows, I see 0x81 listed there, and the Linux
driver sources only talk on CONTROL 0x03 and 0x81.
Full Speed device @ 6 (0xFD410000):
............................................. Composite device: "VOIP
USB Phone "
Device Descriptor
Descriptor Version Number: 0x0200
Device Class: 0 (Composite)
Device Subclass: 0
Device Protocol: 0
Device MaxPacketSize: 64
Device VendorID/ProductID: 0x6993/0xB001 (unknown vendor)
Device Version Number: 0x0000
Number of Configurations: 1
Manufacturer String: 1 "Yealink Network Technology Ltd."
Product String: 2 "VOIP USB Phone "
Serial Number String: 0 (none)
Configuration Descriptor
Length (and contents): 221
Raw Descriptor (hex) 0000: 09 02 DD 00 04 01 00 80 FA
09 04 00 00 00 01 01
Raw Descriptor (hex) 0010: 00 03 0A 24 01 00 01 4A 00
02 01 02 0C 24 02 01
Raw Descriptor (hex) 0020: 01 02 00 01 00 00 00 00 0C
24 02 02 01 01 00 01
Raw Descriptor (hex) 0030: 00 00 00 00 09 24 03 03 01
03 00 06 00 09 24 03
Raw Descriptor (hex) 0040: 04 01 01 00 05 00 0B 24 06
05 01 02 03 00 03 00
Raw Descriptor (hex) 0050: 00 0B 24 06 06 02 02 03 00
03 00 00 09 04 01 00
Raw Descriptor (hex) 0060: 00 01 02 00 04 09 04 01 01
01 01 02 00 04 07 24
Raw Descriptor (hex) 0070: 01 04 01 01 00 0B 24 02 01
01 02 10 01 40 1F 00
Raw Descriptor (hex) 0080: 09 05 82 01 10 00 01 00 00
07 25 01 00 00 00 00
Raw Descriptor (hex) 0090: 09 04 02 00 00 01 02 00 04
09 04 02 01 01 01 02
Raw Descriptor (hex) 00a0: 00 04 07 24 01 02 01 01 00
0B 24 02 01 01 02 10
Raw Descriptor (hex) 00b0: 01 40 1F 00 09 05 04 01 10
00 01 00 00 07 25 01
Raw Descriptor (hex) 00c0: 00 00 00 00 09 04 03 00 01
03 00 00 02 09 21 00
Raw Descriptor (hex) 00d0: 01 00 01 22 27 00 07 05 81
03 10 00 14
Number of Interfaces: 4
Configuration Value: 1
Attributes: 0x80 (bus-powered)
MaxPower: 500 ma
Interface #0 - Audio/Control
Alternate Setting 0
Number of Endpoints 0
Interface Class: 1 (Audio)
Interface Subclass; 1 (Control)
Interface Protocol: 0
Audio Control Class Specific Header
Descriptor Version Number: 01.00
Class Specific Size: 74
Number of Audio Interfaces: 2
Audio Interface Number: 1
Audio Interface Number: 2
Dump Contents (hex): 0A 24 01 00 01 4A 00 02 01 02
Audio Class Specific Input Terminal
Terminal ID: 1
Input Terminal Type: 0x201 (Microphone)
OutTerminal ID: 0 [NONE]
Number of Channels: 1
Spatial config of channels: 0000000000000000
String index for first logical channel: 0
Terminal Name String Index: 0 [NONE]
Audio Class Specific Input Terminal
Terminal ID: 2
Input Terminal Type: 0x101 (USB streaming)
OutTerminal ID: 0 [NONE]
Number of Channels: 1
Spatial config of channels: 0000000000000000
String index for first logical channel: 0
Terminal Name String Index: 0 [NONE]
Audio Class Specific Ouput Terminal
Terminal ID: 3
Output Terminal Type: 0x301 (Speaker)
InTerminal ID: 0 [NONE]
Source ID: 6
Terminal Name String Index: 0 [NONE]
Audio Class Specific Ouput Terminal
Terminal ID: 4
Output Terminal Type: 0x101 (USB Isochronous Stream)
InTerminal ID: 0 [NONE]
Source ID: 5
Terminal Name String Index: 0 [NONE]
Audio Class Specific Feature
Unit ID: 5
Source ID: 1
Control Size: 2
Number of Channels (ch): 1
Master Channel:......................... ( Volume,
Mute )
Left Front:............................. ( Volume,
Mute )
Feature Unit Name String Index: 0
Dump Contents (hex): 0B 24 06 05 01 02 03 00 03 00 00
Audio Class Specific Feature
Unit ID: 6
Source ID: 2
Control Size: 2
Number of Channels (ch): 1
Master Channel:......................... ( Volume,
Mute )
Left Front:............................. ( Volume,
Mute )
Feature Unit Name String Index: 0
Dump Contents (hex): 0B 24 06 06 02 02 03 00 03 00 00
Interface #1 - Audio/Streaming
Alternate Setting 0
Number of Endpoints 0
Interface Class: 1 (Audio)
Interface Subclass; 2 (Streaming)
Interface Protocol: 0
Interface #1 - Audio/Streaming (#1)
Alternate Setting 1
Number of Endpoints 1
Interface Class: 1 (Audio)
Interface Subclass; 2 (Streaming)
Interface Protocol: 0
Audio Control Class Specific Header
Audio Stream General
Endpoint Terminal ID: 4
Delay: 1 frames
Format Tag: 0x0001 (PCM)
Audio Class Specific Audio Data Format
Audio Stream Format Type Desc.
Format Type: 1 PCM
Number Of Channels: 1 MONO
Sub Frame Size: 2
Bit Resolution: 16
Sample Frequency Type: 0x01 (Discrete)
Sample Frequency: 8000 Hz
Endpoint 0x82 - Isochronous Input
Address: 0x82 (IN)
Attributes: 0x01 (Isochronous no synchronization
data endpoint)
Max Packet Size: 16
Polling Interval: 1 ms
Class-Specific AS Audio EndPoint - Control output
Attributes: 0x00
bLockDelayUnits: 0x00 (UNDEFINED)
wLockDelay: 0
Interface #2 - Audio/Streaming
Alternate Setting 0
Number of Endpoints 0
Interface Class: 1 (Audio)
Interface Subclass; 2 (Streaming)
Interface Protocol: 0
Interface #2 - Audio/Streaming (#1)
Alternate Setting 1
Number of Endpoints 1
Interface Class: 1 (Audio)
Interface Subclass; 2 (Streaming)
Interface Protocol: 0
Audio Control Class Specific Header
Audio Stream General
Endpoint Terminal ID: 2
Delay: 1 frames
Format Tag: 0x0001 (PCM)
Audio Class Specific Audio Data Format
Audio Stream Format Type Desc.
Format Type: 1 PCM
Number Of Channels: 1 MONO
Sub Frame Size: 2
Bit Resolution: 16
Sample Frequency Type: 0x01 (Discrete)
Sample Frequency: 8000 Hz
Endpoint 0x04 - Isochronous Output
Address: 0x04 (OUT)
Attributes: 0x01 (Isochronous no synchronization
data endpoint)
Max Packet Size: 16
Polling Interval: 1 ms
Class-Specific AS Audio EndPoint - Control output
Attributes: 0x00
bLockDelayUnits: 0x00 (UNDEFINED)
wLockDelay: 0
Interface #3 - HID
Alternate Setting 0
Number of Endpoints 1
Interface Class: 3 (HID)
Interface Subclass; 0
Interface Protocol: 0
HID Descriptor
Descriptor Version Number: 0x0100
Country Code: 0
Descriptor Count: 1
Descriptor 1
Type: 0x22 (Report Descriptor)
Length (and contents): 39
Raw Descriptor (hex) 0000: 05 0B 09 01 A1 01
05 09 19 01 29 3F 15 00 25 01
Raw Descriptor (hex) 0010: 75 01 95 80 81 00
05 08 19 01 29 10 15 00 25 01
Raw Descriptor (hex) 0020: 75 01 95 80 91 00 C0
Parsed Report Descriptor:
Usage Page (Telephony Device)
Usage 1 (0x1)
Collection (Application)
Usage Page (Button)
Usage Minimum........... (1)
Usage Maximum........... (63)
Logical Minimum......... (0)
Logical Maximum......... (1)
Report Size............. (1)
Report Count............ (-128)
Input................... (Data,
Array, Absolute)
Usage Page (LED)
Usage Minimum........... (1)
Usage Maximum........... (16)
Logical Minimum......... (0)
Logical Maximum......... (1)
Report Size............. (1)
Report Count............ (-128)
Output.................. (Data,
Array, Absolute, No Wrap, Linear, Preferred State, No Null Position,
Nonvolatile, Bitfield)
End Collection
Endpoint 0x81 - Interrupt Input
Address: 0x81 (IN)
Attributes: 0x03 (Interrupt no synchronization data
endpoint)
Max Packet Size: 16
Polling Interval: 20 ms
Device Qualifier Descriptor
Descriptor Version Number: 0x0200
Device Class 0 (Composite)
Device Subclass 0
Device Protocol 0
Device MaxPacketSize: 64
Number of Configurations: 1
bReserved: 0
Other Speed Configuration Descriptor
Length (and contents): 221
Raw Descriptor (hex) 0000: 09 02 DD 00 04 01 00 80 FA
09 04 00 00 00 01 01
Raw Descriptor (hex) 0010: 00 03 0A 24 01 00 01 4A 00
02 01 02 0C 24 02 01
Raw Descriptor (hex) 0020: 01 02 00 01 00 00 00 00 0C
24 02 02 01 01 00 01
Raw Descriptor (hex) 0030: 00 00 00 00 09 24 03 03 01
03 00 06 00 09 24 03
Raw Descriptor (hex) 0040: 04 01 01 00 05 00 0B 24 06
05 01 02 03 00 03 00
Raw Descriptor (hex) 0050: 00 0B 24 06 06 02 02 03 00
03 00 00 09 04 01 00
Raw Descriptor (hex) 0060: 00 01 02 00 04 09 04 01 01
01 01 02 00 04 07 24
Raw Descriptor (hex) 0070: 01 04 01 01 00 0B 24 02 01
01 02 10 01 40 1F 00
Raw Descriptor (hex) 0080: 09 05 82 01 10 00 01 00 00
07 25 01 00 00 00 00
Raw Descriptor (hex) 0090: 09 04 02 00 00 01 02 00 04
09 04 02 01 01 01 02
Raw Descriptor (hex) 00a0: 00 04 07 24 01 02 01 01 00
0B 24 02 01 01 02 10
Raw Descriptor (hex) 00b0: 01 40 1F 00 09 05 04 01 10
00 01 00 00 07 25 01
Raw Descriptor (hex) 00c0: 00 00 00 00 09 04 03 00 01
03 00 00 02 09 21 00
Raw Descriptor (hex) 00d0: 01 00 01 22 27 00 07 05 81
03 10 00 14
Number of Interfaces: 4
Configuration Value: 1
Attributes: 0x80 (bus-powered)
MaxPower: 500 ma
Interface #0 - Audio/Control
Alternate Setting 0
Number of Endpoints 0
Interface Class: 1 (Audio)
Interface Subclass; 1 (Control)
Interface Protocol: 0
Audio Control Class Specific Header
Descriptor Version Number: 01.00
Class Specific Size: 74
Number of Audio Interfaces: 2
Audio Interface Number: 1
Audio Interface Number: 2
Dump Contents (hex): 0A 24 01 00 01 4A 00 02 01 02
Audio Class Specific Input Terminal
Terminal ID: 1
Input Terminal Type: 0x201 (Microphone)
OutTerminal ID: 0 [NONE]
Number of Channels: 1
Spatial config of channels: 0000000000000000
String index for first logical channel: 0
Terminal Name String Index: 0 [NONE]
Audio Class Specific Input Terminal
Terminal ID: 2
Input Terminal Type: 0x101 (USB streaming)
OutTerminal ID: 0 [NONE]
Number of Channels: 1
Spatial config of channels: 0000000000000000
String index for first logical channel: 0
Terminal Name String Index: 0 [NONE]
Audio Class Specific Ouput Terminal
Terminal ID: 3
Output Terminal Type: 0x301 (Speaker)
InTerminal ID: 0 [NONE]
Source ID: 6
Terminal Name String Index: 0 [NONE]
Audio Class Specific Ouput Terminal
Terminal ID: 4
Output Terminal Type: 0x101 (USB Isochronous Stream)
InTerminal ID: 0 [NONE]
Source ID: 5
Terminal Name String Index: 0 [NONE]
Audio Class Specific Feature
Unit ID: 5
Source ID: 1
Control Size: 2
Number of Channels (ch): 1
Master Channel:......................... ( Volume,
Mute )
Left Front:............................. ( Volume,
Mute )
Feature Unit Name String Index: 0
Dump Contents (hex): 0B 24 06 05 01 02 03 00 03 00 00
Audio Class Specific Feature
Unit ID: 6
Source ID: 2
Control Size: 2
Number of Channels (ch): 1
Master Channel:......................... ( Volume,
Mute )
Left Front:............................. ( Volume,
Mute )
Feature Unit Name String Index: 0
Dump Contents (hex): 0B 24 06 06 02 02 03 00 03 00 00
Interface #1 - Audio/Streaming
Alternate Setting 0
Number of Endpoints 0
Interface Class: 1 (Audio)
Interface Subclass; 2 (Streaming)
Interface Protocol: 0
Interface #1 - Audio/Streaming (#1)
Alternate Setting 1
Number of Endpoints 1
Interface Class: 1 (Audio)
Interface Subclass; 2 (Streaming)
Interface Protocol: 0
Audio Control Class Specific Header
Audio Stream General
Endpoint Terminal ID: 4
Delay: 1 frames
Format Tag: 0x0001 (PCM)
Audio Class Specific Audio Data Format
Audio Stream Format Type Desc.
Format Type: 1 PCM
Number Of Channels: 1 MONO
Sub Frame Size: 2
Bit Resolution: 16
Sample Frequency Type: 0x01 (Discrete)
Sample Frequency: 8000 Hz
Endpoint 0x82 - Isochronous Input
Address: 0x82 (IN)
Attributes: 0x01 (Isochronous no synchronization
data endpoint)
Max Packet Size: 16 (16 x 1 transactions
opportunities per microframe)
Polling Interval: 1 (1 microframe (125 microsecs) )
Class-Specific AS Audio EndPoint - Control output
Attributes: 0x00
bLockDelayUnits: 0x00 (UNDEFINED)
wLockDelay: 0
Interface #2 - Audio/Streaming
Alternate Setting 0
Number of Endpoints 0
Interface Class: 1 (Audio)
Interface Subclass; 2 (Streaming)
Interface Protocol: 0
Interface #2 - Audio/Streaming (#1)
Alternate Setting 1
Number of Endpoints 1
Interface Class: 1 (Audio)
Interface Subclass; 2 (Streaming)
Interface Protocol: 0
Audio Control Class Specific Header
Audio Stream General
Endpoint Terminal ID: 2
Delay: 1 frames
Format Tag: 0x0001 (PCM)
Audio Class Specific Audio Data Format
Audio Stream Format Type Desc.
Format Type: 1 PCM
Number Of Channels: 1 MONO
Sub Frame Size: 2
Bit Resolution: 16
Sample Frequency Type: 0x01 (Discrete)
Sample Frequency: 8000 Hz
Endpoint 0x04 - Isochronous Output
Address: 0x04 (OUT)
Attributes: 0x01 (Isochronous no synchronization
data endpoint)
Max Packet Size: 16 (16 x 1 transactions
opportunities per microframe)
Polling Interval: 1 (1 microframe (125 microsecs) )
Class-Specific AS Audio EndPoint - Control output
Attributes: 0x00
bLockDelayUnits: 0x00 (UNDEFINED)
wLockDelay: 0
Interface #3 - HID
Alternate Setting 0
Number of Endpoints 1
Interface Class: 3 (HID)
Interface Subclass; 0
Interface Protocol: 0
HID Descriptor
Descriptor Version Number: 0x0100
Country Code: 0
Descriptor Count: 1
Descriptor 1
Type: 0x22 (Report Descriptor)
Length (and contents): 39
Raw Descriptor (hex) 0000: 05 0B 09 01 A1 01
05 09 19 01 29 3F 15 00 25 01
Raw Descriptor (hex) 0010: 75 01 95 80 81 00
05 08 19 01 29 10 15 00 25 01
Raw Descriptor (hex) 0020: 75 01 95 80 91 00 C0
Parsed Report Descriptor:
Usage Page (Telephony Device)
Usage 1 (0x1)
Collection (Application)
Usage Page (Button)
Usage Minimum........... (1)
Usage Maximum........... (63)
Logical Minimum......... (0)
Logical Maximum......... (1)
Report Size............. (1)
Report Count............ (-128)
Input................... (Data,
Array, Absolute)
Usage Page (LED)
Usage Minimum........... (1)
Usage Maximum........... (16)
Logical Minimum......... (0)
Logical Maximum......... (1)
Report Size............. (1)
Report Count............ (-128)
Output.................. (Data,
Array, Absolute, No Wrap, Linear, Preferred State, No Null Position,
Nonvolatile, Bitfield)
End Collection
Endpoint 0x81 - Interrupt Input
Address: 0x81 (IN)
Attributes: 0x03 (Interrupt no synchronization data
endpoint)
Max Packet Size: 16 (16 x 1 transactions
opportunities per microframe)
Polling Interval: 20: Illegal value for bInterval for
a hi-speed Interrupt endpoint
Attaching the device:
97.145 [3] +com_vmware_kext_UsbDevice[0x415bd80]::start(0x40f9700
"VOIP USB Phone ")
97.145 [3]
+com_vmware_kext_UsbPortArbiter[0x59e3d80]::testPortClaim(port[fd410000], 0)
97.145 [3] -com_vmware_kext_UsbPortArbiter[0x59e3d80]::testPortClaim
-> 0
97.145 [3] -com_vmware_kext_UsbDevice[0x415bd80]::start -> 0
97.272 [3] +com_vmware_kext_UsbDevice[0x3934880]::start(0x3d31500
"IOUSBCompositeDevice")
97.272 [3]
+com_vmware_kext_UsbPortArbiter[0x59e3d80]::testPortClaim(port[fd420000], 0)
97.272 [3] -com_vmware_kext_UsbPortArbiter[0x59e3d80]::testPortClaim
-> 0
97.272 [3] -com_vmware_kext_UsbDevice[0x3934880]::start -> 0
97.293 [3] +com_vmware_kext_UsbDevice[0x37d8c00]::start(0x5f1e300
"USB Audio Device ")
97.293 [3]
+com_vmware_kext_UsbPortArbiter[0x59e3d80]::testPortClaim(port[fd410000], 1)
97.293 [3] -com_vmware_kext_UsbPortArbiter[0x59e3d80]::testPortClaim
-> 0
More information about the libhid-discuss
mailing list