On Tue, 23 Feb 2016 09:35:48 +0800
Xiaofan Chen <xiaof...@gmail.com> wrote:
> On Tue, Feb 23, 2016 at 1:29 AM, John Coppens <j...@jcoppens.com> wrote:
> >> You can set LIBUSB_DEBUG=4 before running your pyusb program
> >> and then post the verbose libusb debug info.
> >
> > Here's the full debug output. Note that there is a 5 second wait before the
> > set_configuration
> > times out (is this the default value?).
> > [ 0.004829] [000003da] libusb: debug [libusb_kernel_driver_active]
> > interface 1
> > [ 0.004853] [000003da] libusb: debug [libusb_get_config_descriptor] index 0
> > [ 0.004911] [000003da] libusb: debug [libusb_set_configuration]
> > configuration 1
> > [ 5.004752] [000003da] libusb: error [op_set_configuration] failed, error
> > -1 errno 110
>
> Errono is ETIMEDOUT. This is a bit strange. It might be that your
> FW is faulty.
>
> > When tested with a minimalistic C program, also with libusb 1.0.20,
> > the transfer actually starts, but stops after a couple of 512
> > data blocks.
>
> What is your minimalist C program? Does it call libusb_set_configuration()?
> If not, please add it to see if that cause problem or not.
>
> In reality libusb_set_configuration() is in generally not needed in libusb
> (other than those special device with two or more configurations), the
> only exception is for libusb-win32 (may need to call usb_set_configuration)
> which pyusb supports.
Xiafan, after much tinkering with the C program, I was too impatient to get
things working, so I restarted from zero (again from the original usb_dev_bulk
demo, and a host program with pyUSB in the PC. I appreciate your input though,
and it was very helpful in avoiding the same problem this time.
I was able to get these results (all at 'Full' speed):
1 external hub No external hub
Transfer size Throughput (B/s) Throughput (B/s)
512 433120 128000
768 519300 145699
1024 433120 204811
2048 619329 341322
4096 658343 455133
8192 668429 585411
Both seem to flatten out too early. Though the speed at 8192 is enough for
me, any idea why the speed does not go nearer 1.2MB/s? And why the speed
at small transfer sizes is so different without hub?
I attached a graph of the above - I don't know if the list allows
attachments.
Cheers,
John
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users