Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Xiaofan Chen
On Mon, Oct 29, 2012 at 3:27 PM, Stefano Di Martino wrote: > Sorry, this was the wrong attachment. > Here you find the right attachment... > Thanks. So this is a Logitech USB Headset, a USB composite device with Interface 3 to be the HID interface. Maybe there is a problem with libusbx HID backen

Re: [Libusbx-devel] Help needed with deployment issues on Windows

2012-10-29 Thread Xiaofan Chen
On Mon, Oct 29, 2012 at 9:17 AM, therau2000 wrote: > On Mon, 2012-10-29 at 01:15 +0100, Peter Stuge wrote: > > Find out exactly how those commands get sent, and find a method to > send them which is outside the USB domain if possible, since that > will be both simpler for you to implement *and* wi

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Stefano Di Martino
Thanks for your reply! I have at work windows only. I have attached the descriptor which I get by usbview. I could test my code at home under Linux when I get home today... Best Regards Stefano Original-Nachricht > Datum: Mon, 29 Oct 2012 21:32:20 +0800 > Von: Xiaofan Chen > A

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Stefano Di Martino
Okay, I tested it now at home with Linux and the same usb device. It seems, that fetching the string descriptor is a Windows problem. First, I get the error "LIBUSB_ERROR_ACCESS", but then I run the example with root privilege and everything run fine. Just, for the record: On Windows I get an LI

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Pete Batard
Can you please run 'xusb -d vid:pid' where vid:pid are the ones of your device and send the log you get? Regards, /Pete On 2012.10.29 17:51, Stefano Di Martino wrote: > Okay, I tested it now at home with Linux and the same usb device. It > seems, that fetching the string descriptor is a Window

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Stefano Di Martino
You mean under Windows? I just did this today, but I'll attach it again. Regards Stefano On 29.10.2012 18:57, Pete Batard wrote: Can you please run 'xusb -d vid:pid' where vid:pid are the ones of your device and send the log you get? Regards, /Pete On 2012.10.29 17:51, Stefano Di Martino wr

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Peter Stuge
Stefano Di Martino wrote: > What now? My program has to run under windows. If you want to communicate with the HID class interface then I suggest to try out HIDAPI. HIDAPI was created specifically to abstract OS-native HID class APIs on Linux, Windows, and Mac OS X. While the Windows-specific HI

Re: [Libusbx-devel] Help needed with deployment issues on Windows

2012-10-29 Thread Tim Roberts
therau2000 wrote: > On Mon, 2012-10-29 at 01:15 +0100, Peter Stuge wrote: >> Find out exactly how those commands get sent, and find a method to >> send them which is outside the USB domain if possible, since that >> will be both simpler for you to implement *and* will provide a >> significantly bet

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Pete Batard
On 2012.10.29 18:47, Peter Stuge wrote: > While the Windows-specific HID class code for emulating USB transfers > over HID in libusbx does use the same OS-native API as HIDAPI (maybe > even some code from HIDAPI?) From the copyright notice: "HID Reports IOCTLs inspired from HIDAPI by Alan Ott".

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Pete Batard
On 2012.10.29 18:32, Stefano Di Martino wrote: > You mean under Windows? I just did this today, but I'll attach it again. Sorry, missed the first one (catching up on e-mail). Apart from the assertion warnings, I don't see much of anything wrong, and I'm not even sure that the assertion is an iss

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Peter Stuge
Pete Batard wrote: > > I don't believe there were suggestions in any direction so far, but > > I think using more of HIDAPI in libusbx would be a logical extension. > > Considering that libusbx is the lower level library here, theoretically, > the most logical thing would be for HIDAPI to rely on

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Pete Batard
On 2012.10.29 19:30, Peter Stuge wrote: > Since libusbx > replicates what HIDAPI (and libusb-win32) does, and then adds > onto that, libusbx is indeed higher level than HIDAPI. You can reverse the above. HIDAPI replicates what libusbx (and libusb-win32) does and then adds onto that. Only in your

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Pete Batard
On 2012.10.29 19:25, Pete Batard wrote: > I can't see the NO_MEM yet (still looking at it) OK, I think I have reproduced the NO_MEM issue on my end. This seems to be generated from: https://github.com/libusbx/libusbx/blob/master/libusb/os/windows_usb.c#L3888 Regards, /Pete

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Stefano Di Martino
Yes, actually I get this error in listdev.c (I modified it). I'll attach the source and the debug file. Best regards Stefano On 29.10.2012 20:25, Pete Batard wrote: On 2012.10.29 18:32, Stefano Di Martino wrote: You mean under Windows? I just did this today, but I'll attach it again. Sorry,

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Stefano Di Martino
My modified listdevs.c works under Linux, by the way. Best regards Stefano On 29.10.2012 21:17, Stefano Di Martino wrote: Yes, actually I get this error in listdev.c (I modified it). I'll attach the source and the debug file. Best regards Stefano On 29.10.2012 20:25, Pete Batard wrote: On 2

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Pete Batard
On 2012.10.29 20:27, Stefano Di Martino wrote: > My modified listdevs.c works under Linux, by the way. Yes, I've seen that. And I think I have identified the issue at hand: the code for composite devices does not issue a request to open the underlying HID interfaces when they are available, and

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Stefano Di Martino
That would be great. A big THANKS! :-) Best regards Stefano On 29.10.2012 21:39, Pete Batard wrote: > On 2012.10.29 20:27, Stefano Di Martino wrote: >> My modified listdevs.c works under Linux, by the way. > Yes, I've seen that. And I think I have identified the issue at hand: > the code for comp

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Pete Batard
The latest commit [1] should fix access to composite HID interfaces. If you need help recompiling from latest git, please see https://github.com/libusbx/libusbx/wiki#wiki-Accessing_the_Source Alternatively, you can just download the github zipball from https://github.com/libusbx/libusbx/zipball/

Re: [Libusbx-devel] Building git code on Mac; CMake support?

2012-10-29 Thread Pete Batard
On 2012.10.26 09:18, Ludovic Rousseau wrote: > Regarding build using Xcode I added a config.h for Xcode. So it is now > possible to build using Xcode without using ./configure first. > Use my xcode branch at https://github.com/LudovicRousseau/libusbx/tree/xcode I haven't had a chance to follow clo

Re: [Libusbx-devel] Building git code on Mac; CMake support?

2012-10-29 Thread Sean McBride
On Mon, 29 Oct 2012 23:57:26 +, Pete Batard said: >> Regarding build using Xcode I added a config.h for Xcode. So it is now >> possible to build using Xcode without using ./configure first. >> Use my xcode branch at https://github.com/LudovicRousseau/libusbx/tree/xcode > >I haven't had a chanc

Re: [Libusbx-devel] Building git code on Mac; CMake support?

2012-10-29 Thread Xiaofan Chen
On Tue, Oct 30, 2012 at 8:03 AM, Sean McBride wrote: > On Mon, 29 Oct 2012 23:57:26 +, Pete Batard said: > >>> Regarding build using Xcode I added a config.h for Xcode. So it is now >>> possible to build using Xcode without using ./configure first. >>> Use my xcode branch at https://github.com

Re: [Libusbx-devel] Bug in get_string_descriptor?

2012-10-29 Thread Xiaofan Chen
On Tue, Oct 30, 2012 at 3:30 AM, Peter Stuge wrote: > That is confusing. HIDAPI doesn't depend on libusb. > > HIDAPI can optionally use libusb, but that's only useful on old > Linux systems where the OS-native HID API was insufficient. That is true for Linux. HIDAPI also uses native HID API under