From: <min...@gm...> - 2007-02-24 00:24:30
|
Hi, I am currently trying to get a specific type of USB data cable I own to work in Linux. Starting from a trace obtained on Windows using USBTrace, I began writing an implementation using libusb. Opening and claiming the device works fine, but after that I am somewhat stuck. The actual data transfers should work with usb_bulk_write/usb_bulk_read, but reading currently gives me a timeout, so I suspect I have to perform some of the control requests first. That, however, doesn't seem to work. Starting with the first request in my trace: --------- Request # 1 ----[OUT]---- URB_FUNCTION_VENDOR_INTERFACE IRP: 0x81C13D30 Status: STATUS_SUCCESS (0x0) Device Object: 0x81CB6AA0 Length: 0x50 USBD Status: USBD_STATUS_PENDING (0x40000000) TransferFlags: 0x0 ( USBD_TRANSFER_DIRECTION_OUT ) TransferBufferLength: 0x0 TransferBuffer: 0x0 TransferBufferMDL: 0x0 UrbLink: 0x0 RequestType: 0x0 (Direction: Host-to-device, Type: Standard, Recipient: Device) Request: 0x11 Value: 0x0 Index: 0x0 ----------------------------------- I expected to be able to write this as usb_control_msg(handle, USB_ENDPOINT_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE, 0x11, 0x0, 0x0, 0, 0, 10); This (and any attempts to reproduce other traced URB_FUNCTION_VENDOR_INTERFACE calls) fails with a Broken Pipe error. I am (as you can probably tell) new to USB-related programming, so maybe I'm already interpreting this trace wrong. I could not think of any other way to implement it though. Do you have any ideas of what I am doing wrong or what I am missing? Thanks in advance for your help, Jan |