2011/6/3 Elab <asie...@gmail.com>:
> I only have one device set up with libusb, but to be sure I have changed
> the code to
>
> import usb.core as core
> usbDevice = core.find(idVendor=0x06C2, idProduct=0x0039)
> if usbDevice != None:
>     usbDevice .set_configuration()
>     rawRead = usbDevice .read(0x81, 8)
>     print('Raw: ' + str(rawRead))
> else:
>     print('Device not found')
>
> I tried reinstalling the driver inf, and when I ran this program I was
> able to read the block data, but when I tried to write I got an error
> message saying 0x81 was not a valid endpoint.  Also, all I have ever
> been able to get back from read is:
> array('B', (0, 0, 0, 0, 0, 0, 0, 0))
Indeed it is not, as 0x81 is a read only endpoint.

>
> Is there any way to guarantee that I am getting valid data back from the
> device?
USB protocol ensures that, except for isochronous transfers...

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to