Sorry, I miss the forest for the trees. I'm new to USB programming, python and 
the pyUSB lib.
I think, my problem was, that I was testing with my kindle and I didn't get it 
so far, that every device has its own vendor requests.
Does anyone know, where I get the custom kindle vendor requests? Because I read 
the device information and the transfer type is "control", so I have to 
communicate with this protocol.

Thanks in adavance
Stefano
-------- Original-Nachricht --------
> Datum: Mon, 1 Oct 2012 08:33:11 -0300
> Von: Wander Lairson Costa <wander.lair...@gmail.com>
> An: pyusb-users@lists.sourceforge.net
> Betreff: Re: [pyusb-users] ctrl_transfer: Example is not working

> 2012/10/1 Stefano Di Martino <stefan...@gmx.net>:
> > Hi Tormod,
> > ok thanks for your reply!
> > Can I assume, that the address 0x40 is custom, too?
> >
> > If I use following code,
> >
> > assert dev.ctrl_transfer(0x40, usb.util.CTRL_OUT, 0, 0, msg) == len(msg)
> > ret = dev.ctrl_transfer(0x40, usb.util.CTRL_IN, 0, 0, len(msg))
> >
> > I get the error message:
> > "usb.core.USBError: [Errno None] libusb0-dll:err [control_msg] sending
> control message failed, win error: A device attached to the system is not
> functioning."
> >
> > I programmed an example that shows me the Endpoints and its directions.
> The output is:
> > EP 0x81 Direction: IN
> > EP 0x1 Direction: OUT
> >
> > So, if I change the address like this:
> >
> > assert dev.ctrl_transfer(0x1, usb.util.CTRL_OUT, 0, 0, msg) == len(msg)
> > ret = dev.ctrl_transfer(0x81, usb.util.CTRL_IN, 0, 0, len(msg))
> >
> > I get following error message:
> > "usb.core.USBError: [Errno None] libusb0-dll:err [control_msg] sending
> control message failed, win error: The parameter is incorrect."
> >
> > Do you know what's wrong?
> >
> 
> ctrl_transfer only deals with endpoint 0, for endpoints 0x01 and 0x81,
> you should use "write" and "read" methods.
> 
> -- 
> Best Regards,
> Wander Lairson Costa
> 
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users

------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to