|
From: Peter S. <pe...@st...> - 2013-02-27 19:00:22
|
Hi Klaus, Klaus Reimer wrote: > #include <stdio.h> > #include <libusb-1.0/libusb.h> Note that you should always #include <libusb.h> without any path and always use pkg-config --cflags libusb-1.0 within your build process in order to get the correct compiler flags. For the linker step, use: pkg-config --ldflags --libs libusb-1.0 > libusb: 0.551550 warning [darwin_transfer_status] transfer error: pipe > is stalled > > I'm confused. If I'm doing something wrong here or when the USB > device is doing something wrong then why does it work on Linux? Probably there is some difference in what the operating system USB stack does, leading to the device seeing different things from a Linux host than from an OS X host. I'd look into what will make the device firmware stall it's endpoint. > Is there anything wrong in my code which can cause this error only > on OSX? Your minimal example code looks fine, the only thing I'd change is to remove the libusb_set_configuration() call unless your device indeed does have multiple configurations and is expected to change between them so frequently that you are indeed sometimes required to set it. > On OSX I'm using libusb-1.0.9 If you want, you could try libusb.git for the newest changes, or even libusb-darwin.git for changes that still aren't in libusb.git yet. > I also tried using the old libusb-0.1.12. Same problem: Works on > Linux, fails on OSX. (You rewrote the example to use the 0.1 API I assume.) You haven't showed your descriptors nor the full debug log. Both could contain details causing the problem which you have overlooked. By not showing that information you make it impossible for anyone else to find the problem there. Beyond that, all I can really say is that it should work. Provide more information and/or test git code and/or look into your firmware is pretty much the only advice I can give based on what you've sent so far. //Peter |