Re: [linux-usb-devel] libusb driver question: can't write to endpoint

2007-07-09 Thread Alan Stern
On Sun, 8 Jul 2007, Phil Dibowitz wrote: With a bit of help, I've found the device has a handful of standard Vendor control commands. But when I try to send them with usb_control_msg(), I'm getting back 'Broken pipe'. The only thing I can think of is that I'm not assembling my requestType

Re: [linux-usb-devel] libusb driver question: can't write to endpoint

2007-07-08 Thread Phil Dibowitz
Alan Stern wrote: On Sun, 11 Mar 2007, Phil Dibowitz wrote: So I went back and fixed the remote by updating on my mac and noticed the software initializes it before it uploads (generic terms in the GUI), and looking back at the log from the windows box, it sends a few CONTROL_TRANSFERs

Re: [linux-usb-devel] libusb driver question: can't write to endpoint

2007-03-12 Thread Alan Stern
On Sun, 11 Mar 2007, Phil Dibowitz wrote: So I went back and fixed the remote by updating on my mac and noticed the software initializes it before it uploads (generic terms in the GUI), and looking back at the log from the windows box, it sends a few CONTROL_TRANSFERs before it starts up the

Re: [linux-usb-devel] libusb driver question: can't write to endpoint

2007-03-11 Thread Phil Dibowitz
Phil Dibowitz wrote: Alan Stern wrote: Does that error string come from usb_strerror()? My copy of libusb is rather old and doesn't seem to include that routine. It would help to see the actual error code returned by usb_interrupt_write(). BTW, the error from usb_interrupt_write() is -14.

Re: [linux-usb-devel] libusb driver question: can't write to endpoint

2007-03-11 Thread Thomas Sailer
On Sat, 2007-03-10 at 15:39 -0800, Phil Dibowitz wrote: while (bytes = read((int)fh, buf, SIZE)) { printf(writing %d bytes (%d)\n,SIZE,++i); if (usb_interrupt_write(udev, OUT_EP, buf, bytes, 2) 0) { read can return -1, at which point you stuff -1 into

Re: [linux-usb-devel] libusb driver question: can't write to endpoint

2007-03-11 Thread Phil Dibowitz
Thomas Sailer wrote: On Sat, 2007-03-10 at 15:39 -0800, Phil Dibowitz wrote: while (bytes = read((int)fh, buf, SIZE)) { printf(writing %d bytes (%d)\n,SIZE,++i); if (usb_interrupt_write(udev, OUT_EP, buf, bytes, 2) 0) { read can return -1, at which

Re: [linux-usb-devel] libusb driver question: can't write to endpoint

2007-03-11 Thread Alan Stern
On Sat, 10 Mar 2007, Phil Dibowitz wrote: Have you tried setting the usbfs_snoop=1 module parameter for usbcore? It will dump your program's I/O activity to the system log. No, I didn't, but that's a good idea. Is there a way to change this on-the-fly through, say, sysfs? I couldn't

Re: [linux-usb-devel] libusb driver question: can't write to endpoint

2007-03-11 Thread Alan Stern
On Sun, 11 Mar 2007, Phil Dibowitz wrote: Sadly, I'm only slightly further. I have two files that generally get transfered to the device: Connectivity.EZHex - this is a 'connectivity test' to transfer to the device Test.EZHex - this is a config blob for the remote. The site

Re: [linux-usb-devel] libusb driver question: can't write to endpoint

2007-03-11 Thread Phil Dibowitz
Alan Stern wrote: But when I transfer 64 bytes at a time, on Connectivity.EZHex, I get 19 successful transfers (~1.2k) and the 20th gives me an error of -110, or No error (the read was successful). 110 is ETIMEDOUT (see include/asm-generic/errno*), which means your timeout expired before

Re: [linux-usb-devel] libusb driver question: can't write to endpoint

2007-03-11 Thread Phil Dibowitz
Phil Dibowitz wrote: Alan Stern wrote: But when I transfer 64 bytes at a time, on Connectivity.EZHex, I get 19 successful transfers (~1.2k) and the 20th gives me an error of -110, or No error (the read was successful). 110 is ETIMEDOUT (see include/asm-generic/errno*), which means your

[linux-usb-devel] libusb driver question: can't write to endpoint

2007-03-10 Thread Phil Dibowitz
So I sat down to start seeing if I could write the aforementioned driver for the Logitech Harmony remote using libusb. After reading the docs, I whipped out the following test code (ok, its mostly a copy and paste of the docs, but that's OK) which binds to the interface and attempts to do an

Re: [linux-usb-devel] libusb driver question: can't write to endpoint

2007-03-10 Thread Alan Stern
On Sat, 10 Mar 2007, Phil Dibowitz wrote: So I sat down to start seeing if I could write the aforementioned driver for the Logitech Harmony remote using libusb. After reading the docs, I whipped out the following test code (ok, its mostly a copy and paste of the docs, but that's OK) which

Re: [linux-usb-devel] libusb driver question: can't write to endpoint

2007-03-10 Thread Phil Dibowitz
Alan Stern wrote: Does that error string come from usb_strerror()? My copy of libusb is rather old and doesn't seem to include that routine. It would help to see the actual error code returned by usb_interrupt_write(). Looking at lsusb, the device has one Configuration with