Now it is my turn. First of all thank you Xiaofan for all support you have
given here in the mailing list!
Now Diego, I can see two things on your PyUSB code:
1) Don't trust on get_active_configuration and get_interface_altsetting,
they are not doing what they are supposed to yet.. Menawhile, they are
returning the values set or the first one found if you haven't set. But I
think this is not the issue.
2) What seems to be the problem is how you are using directly constants from
usb.util to build the Request Type field. Some constants may require bit
shift, so try to use the usb.util.build_request_type function (I must add
this to the tutorial..). Test it and report us the results...
Wander
2010/6/28 Xiaofan Chen <xiaof...@gmail.com>
> On Mon, Jun 28, 2010 at 10:29 AM, Diego Jacobi <jacobidi...@gmail.com>
> wrote:
> > Ok. This is for the working example.
> > I can do some modifications to it where i get error like:
> > -9 LIBUSB_ERROR_PIPE
> > or
> > -7 LIBUSB_ERROR_TIMEOUT
> > or
> > -4 LIBUSB_ERROR_NO_DEVICE
> > but never
> > -1 LIBUSB_ERROR_IO
> > in the C example as i get always in the pyusb code which in theory send
> > the same transfers.
> >
>
> Hopefully Wander or other Python experts can help you now that
> you have a detailed log.
>
> > ======================================================================
> > ======================================================================
> > ./mylibusb_example
> > with #define LIBUSB_DEBUG 3
> > which doesnt gives too much info
> > ======================================================================
> > ======================================================================
> > Buscando: VID=451, PID=3410
> > --> VID=451, PID=3410
> > --> vendor=UTICOM Diego
> > --> product=USB2Serial +4GPIO
> > Encontrado.
> > Kernel driver detached.
> > Lectura realizada REQUEST_LINE correctamente. Transferido 7 bytes:
> > 0x60 0x00 0x83 0x20 0x00 0x60 0x40 0x00
> > Lectura realizada USB_REQ_GPIO correctamente. Transferido 1 bytes: 0x33
> > Escritura realizada USB_REQ_GPIO correctamente. Estado: 0xff
> >
>
> In order to have more log message from libusb-1.0, you
> may want to rebuild libusb-1.0.
>
> Download libusb-1.08 and then rebuild it with the following
> option "./configure --enable-debug-log" and then install it.
> Rebuild your C example and then you should be able to
> see more debug logs for both of your pyusb and C
> examples. Then you can check if they really send out
> the same thing on the wire.
>
>
> --
> Xiaofan http://sourceforge.net/projects/libusb-win32/
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users