It's very strange that when I use a loop to read the data, it will said
"Operation timeout" sometimes.
For example, the loop I used is as follows,
ret = dev.read(0, 4096, 0, 5)
for i in range(74):
ret += dev.read(0,4096, 0, 5)
It can read the data successfully, though sometimes "Operation timeout".
But I don't know if it is the best way in Pyusb to read the data.
Best Regards,
Yunong
On Fri, Mar 2, 2012 at 6:45 PM, Wander Lairson Costa <
wander.lair...@gmail.com> wrote:
> 2012/3/2 Yunong Pang <029...@gmail.com>:
> > Hi all,
> >
> > I use PyUSB to read data from EZ-USB FX2LP(68013).
> >
> > What I want is to read data from the Endpoint continually, so that I can
> > avoid the loss of data in FX2LP's FIFO.
> > That is to say, I'd like to read the data in Endpoint as soon as it is
> full.
> > How can I achieve that? How can I monitor the status of Endpoint in
> pyusb?
> >
>
> I can't see no other way but using a busy loop. USB standard does not
> offer any way to the device notify the host it has data to send, all
> transactions must be started from the host. Probably you will want to
> setup this loop in a separate thread, but pyusb has not yet been
> tested in multithreaded apps.
>
> --
> Best Regards,
> Wander Lairson Costa
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users