3 Dec 2004 05:17
usb_control_msg results in broken pipe error
Alexander Baldeck <alexander <at> mindfield.de>
2004-12-03 04:17:11 GMT
2004-12-03 04:17:11 GMT
Hello, unfortunately the documentation on libusb isn't explaining things very well and my time is too limited to go through the whole usb specs etc. i've already done 2 hours of googleing with no relevant results. i will now try to explain my scenario and hope somebody is kind enough to help me out a bit. :) i'm working on a driver for a very simple device. basicly it's only glasses with leds on each side which i am to turn on and off plus regulate the brightness of them. so the driver only needs 2 functionalities: 1) turn LEDs on 2) set brightness it is supposed to make the device work in at least GNU/Linux and MacOS X. in order to do that i have been given the control codes & vendor commands. now i need to find my way to send them to the device. i do only need 1 byte userdata per request. here's what i got so far: ############################################################################ #include <usb.h> #include <stdio.h> #define MM_VID 0x152A(Continue reading)
I tried a different piece of hardware, and it appears that the problem is not my
code, but rather the hardware. That's the problem with custom-built hardware.
Sooo, I guess I to back to the design engineer and get that issue sorted out
first. Thanks for all the feedback!
Ciao,
Corey
Quoting "C.J. Steele" <csteele <at> forwardsteptech.com>:
> Peter;
>
> I added the following to the head of your code:
>
> #include <usb.h>
> #include <stdio.h>
>
> #define VID 0x0C70
> #define PID 0x0750
> #define DEBUG 100
>
> int main()
> {
> usb_set_debug( DEBUG );
>
> struct usb_bus *busses;
> struct usb_bus *bus;
> struct usb_device *dev;
RSS Feed