On Thu, Feb 25, 2016 at 12:32 AM, John Coppens <j...@jcoppens.com> wrote:
> 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 am not so sure if pyusb will allow you to reach the full potential. In order to have better speed, increase the transfer size, use async I/O and then use an external HUB. libusb async I/O: http://libusb.sourceforge.net/api-1.0/group__asyncio.html I think you will have a good idea by reading the answers from Tsuneo here. +++++++++++++++++++++++ http://www.microchip.com/forums/tm.aspx?m=417509 Example: Tsuneo's explanations on the usage of hub The performance will be achieved under these conditions. a) Single device on the bus Connect the device to the PC USB port directly, as you did. b) Over single TT (Transaction Translator) hub, without any other Full-/Low-speed device You can use a hub between the device and the PC. Rather, it speeds up the bulk transfer of the device. Hi-speed devices on the same hub doesn't disturb the Full-/Low-speed device. c) Over multiple TT hub In this case, you can use other Full-/Low-speed devices on the hub. The hub assigns full Full-/Low-speed bandwidth to each device on its ports. Most of Hi-Speed hubs on the market (usually, called as USB2.0 hub) are single-TT. Multi-TT hubs Belkin F5U234v1 http://catalog.belkin.com/IWCatProductPage.process?Product_Id=159070 IOGEAR GUH274 http://www.iogear.com/product/GUH274/ Tsuneo ++++++++++++++++++++++ -- Xiaofan ------------------------------------------------------------------------------ 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