Hello everyone, I'm experimenting with the Kinect v2 on Linux (using libusbx-1.0.17).
I've noticed that when trying to replicate the ISO transfers observed on Windows (8 packets of 0x8400 bytes each), I'm getting back -EINVAL from the usbfs IOCTL. For background info, I'm attaching a Wireshark dissection of the packet in question (as observed on Windows) and the lsusb -v output for the Kinect v2 itself. When I use a lower packet size, e.g. 0x4000, everything seems to work (although some data is obviously missing due to the reduced transfer size). A packet size of 0x6000 still seems to work spuriously, although I'm now getting a lot of -ENOMEM errors. This happens on 3.8 as well as on 3.11 (Ubuntu LTS kernels). usbfs_snoop doesn't help much here; I'm just seeing the USBDEVFS_SUBMITURB IOCTL being acknowledged in my syslog. Does somebody have any suggestions as to what the EINVAL actually means here, and how to fix this? Thanks & best regards, Florian -- SENT FROM MY DEC VT50 TERMINAL
Bus 004 Device 005: ID 045e:02c4 Microsoft Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 9
idVendor 0x045e Microsoft Corp.
idProduct 0x02c4
bcdDevice 1.00
iManufacturer 1 Microsoft
iProduct 2 Xbox NUI Sensor
iSerial 4 016592534347
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 214
bNumInterfaces 4
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 36mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 255 Vendor Specific Class
bFunctionSubClass 255 Vendor Specific Subclass
bFunctionProtocol 0
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 4
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 7
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 7
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 0
bMaxBurst 7
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 19
Transfer Type Interrupt
Synch Type None
Usage Type Feedback
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 14
bMaxBurst 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
bMaxBurst 10
Mult 2
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 2
bInterfaceCount 2
bFunctionClass 1 Audio
bFunctionSubClass 2 Streaming
bFunctionProtocol 0
iFunction 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 1 Control Device
bInterfaceProtocol 0
iInterface 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdADC 1.00
wTotalLength 30
bInCollection 1
baInterfaceNr( 0) 3
AudioControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0205 Microphone Array
bAssocTerminal 0
bNrChannels 4
wChannelConfig 0x0000
iChannelNames 0
iTerminal 0
AudioControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 3
wTerminalType 0x0101 USB Streaming
bAssocTerminal 1
bSourceID 1
iTerminal 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 1 Audio
bInterfaceSubClass 2 Streaming
bInterfaceProtocol 0
iInterface 0
AudioStreaming Interface Descriptor:
bLength 7
bDescriptorType 36
bDescriptorSubtype 1 (AS_GENERAL)
bTerminalLink 3
bDelay 1 frames
wFormatTag 1 PCM
AudioStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 2 (FORMAT_TYPE)
bFormatType 1 (FORMAT_TYPE_I)
bNrChannels 4
bSubframeSize 4
bBitResolution 32
bSamFreqType 1 Discrete
tSamFreq[ 0] 16000
Endpoint Descriptor:
bLength 9
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0100 1x 256 bytes
bInterval 4
bRefresh 0
bSynchAddress 0
bMaxBurst 0
AudioControl Endpoint Descriptor:
bLength 7
bDescriptorType 37
bDescriptorSubtype 1 (EP_GENERAL)
bmAttributes 0x00
bLockDelayUnits 0 Undefined
wLockDelay 0 Undefined
Binary Object Store Descriptor:
bLength 5
bDescriptorType 15
wTotalLength 22
bNumDeviceCaps 2
SuperSpeed USB Device Capability:
bLength 10
bDescriptorType 16
bDevCapabilityType 3
bmAttributes 0x00
Latency Tolerance Messages (LTM) Supported
wSpeedsSupported 0x000c
Device can operate at High Speed (480Mbps)
Device can operate at SuperSpeed (5Gbps)
bFunctionalitySupport 2
Lowest fully-functional device speed is High Speed (480Mbps)
bU1DevExitLat 10 micro seconds
bU2DevExitLat 2047 micro seconds
USB 2.0 Extension Device Capability:
bLength 7
bDescriptorType 16
bDevCapabilityType 2
bmAttributes 0x00000002
Link Power Management (LPM) Supported
Device Status: 0x0001
Self Powered
USB URB
USBPcap pseudoheader length: 135
IRP ID: 0xffffe00001b28010
IRP USBD_STATUS: USBD_STATUS_SUCCESS (0x00000000)
URB Function: URB_FUNCTION_ISOCH_TRANSFER (0x000a)
IRP information: 0x00, Direction: FDO -> PDO
0000 000. = Reserved: 0x00
.... ...0 = Direction: FDO -> PDO (0x00)
URB bus id: 3
Device address: 1
Endpoint: 0x84, Direction: IN
1... .... = Direction: IN (1)
.000 0100 = Endpoint value: 4
URB transfer type: URB_ISOCHRONOUS (0x00)
Packet Data Length: 0
Isochronous transfer start frame: 0
Isochronous transfer number of packets: 8
Isochronous transfer error count: 0
USB isochronous packet
ISO Data offset: 0x00000000
ISO Data length: 0x00000000 (irrelevant)
ISO USBD status: USBD_STATUS_SUCCESS (0x00000000) (irrelevant)
USB isochronous packet
ISO Data offset: 0x00008400
ISO Data length: 0x00000000 (irrelevant)
ISO USBD status: USBD_STATUS_SUCCESS (0x00000000) (irrelevant)
USB isochronous packet
ISO Data offset: 0x00010800
ISO Data length: 0x00000000 (irrelevant)
ISO USBD status: USBD_STATUS_SUCCESS (0x00000000) (irrelevant)
USB isochronous packet
ISO Data offset: 0x00018c00
ISO Data length: 0x00000000 (irrelevant)
ISO USBD status: USBD_STATUS_SUCCESS (0x00000000) (irrelevant)
USB isochronous packet
ISO Data offset: 0x00021000
ISO Data length: 0x00000000 (irrelevant)
ISO USBD status: USBD_STATUS_SUCCESS (0x00000000) (irrelevant)
USB isochronous packet
ISO Data offset: 0x00029400
ISO Data length: 0x00000000 (irrelevant)
ISO USBD status: USBD_STATUS_SUCCESS (0x00000000) (irrelevant)
USB isochronous packet
ISO Data offset: 0x00031800
ISO Data length: 0x00000000 (irrelevant)
ISO USBD status: USBD_STATUS_SUCCESS (0x00000000) (irrelevant)
USB isochronous packet
ISO Data offset: 0x00039c00
ISO Data length: 0x00000000 (irrelevant)
ISO USBD status: USBD_STATUS_SUCCESS (0x00000000) (irrelevant)
signature.asc
Description: OpenPGP digital signature
