|
From: Xiaofan C. <xia...@gm...> - 2006-09-12 01:14:20
|
On 9/11/06, Ray Schumacher <ra...@bl...> wrote: > I've been trying pyusb, but getting some errors in the bulkreads, > so I'm trying to work around it. > I did just get codegenerator to wrap libusb0.dll, but have not > written code for it yet. > > >1) BITPIM libusb Python wrapper > >http://www.bitpim.org/pyxr/c/projects/bitpim/src/native/usb/usb.py.html > > What/which did you use? > I just downloaded from > http://svn.sourceforge.net/viewvc/bitpim/releases/0.9.07/src/native/usb/ > and got "ImportError: libusb not supported on win32" under Python You need to build the wrapper dll by yourself. I've posted the binary packages in Microchip Forum. http://forum.microchip.com/tm.aspx?m=110205 Check out the pyk-0.4 binary. I have put the batch file (mybuild.bat) and the compiled wrapper dll (_libusb.dll) inside the zip archive. I am using Python 2.4/SWIG-1.3.24/libusb-win32 0.1.10.1 as well as MinGW. You probably need to build your own wrapper depending on your tools. > >2) PyUSB > >http://pyusb.berlios.de/ > > It mostly works for me, but for some odd bulkread data drop/error. The author (Wander Lairson) is very helpful, you can always contact him about the error. Lat time I found a minor bug and he helped to solve it. You can also use DebugView with and turn on debug option for libusb-win32. Last time Stephan Meyer helped me to find out one issue with bulkread. Checkout the libusb-win32 mailing list archive. It is a pity that I do not know much about host programming so that I do not really explore a bit deeper with PyUSB. Still I think using DebugView with libusb-win32 can be a nice tool for libusb-win32 application debugging (including pyusb and bitpim libusb wrapper). http://sourceforge.net/mailarchive/message.php?msg_id=13464331 Regards, Xiaofan |