2013/1/14 Alan Jhonn Aguiar Schwyn <alan...@hotmail.com>: > > I found the problem: I try to read 2 bytes, and the device was sending 3.. > > And I test that: if you request 3 (and the device gives 2) no generates any > problem.. the size of returned package is 2.. > > Why in the other case yes? >
The device USB controller has already built a packet with 3 bytes, if you request less than that, the device cannot breaks the package down, so it fails. If you are not sure about how many bytes you should receive, it is often better to try to read "a packet size" bytes. -- Best Regards, Wander Lairson Costa ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users