From: Yaniv A. <ya...@ak...> - 2007-10-22 06:14:43
|
Hi Sarah, Many thanks for your reply, which seems right on the money other than the platform -- it's my understanding that your patch (and bug) occur only in linux.c, while I'm running OSX and I believe my libusb uses darwin.c. From a rather cursory examination it appears to me that the code in darwin.c is substantially different (of course, different USB APIs in Linux and OSX), and in particular the set-error-but-not-description bug doesn't appear to be there. Makes sense? Am I missing something? Anyone else has comments? Thanks again, - Yaniv On 10/21/07, Sarah Messer <iku...@ya...> wrote: > > This is due to a particular line in the source that sets an error-occurred > flag but not the numerical error code itself. I've tried posting analysis > and solution here<http://forums.ni.com/ni/board/message?board.id=140&message.id=21028&view=by_date_ascending&page=2> > (as user SMesser) and here<http://sourceforge.net/tracker/index.php?func=detail&aid=1633542&group_id=1674&atid=101674>(as user spinmess). Look for the > libusb.c patch I've posted. > > *Yaniv Aknin <ya...@ak...>* wrote: > > Hi, > > I'm trying to use PyUSB on OSX (10.4.10) to enumerate USB devices. I'm not > entirely certain why, but upon calling getString on a device (almost any > device on my system at least, and I have a few), I'm getting a USBError, > with usb_control_msg: unknown error. > > My (slightly modified) lsusb.py source is: > > osx:pyusb yaniv$ cat lsusb.py > #!/usr/bin/env python > > import usb > import sys > > for bus in usb.busses(): > for dev in bus.devices: > try: > print "Bus %s Device %s: ID %04x:%04x %s" % ( > bus.dirname,dev.filename,dev.idVendor,dev.idProduct,dev.open > ().getString(1,30)) > except: > print 'caught ', sys.exc_info()[1] > continue > osx:pyusb yaniv$ ./lsusb.py > caught usb_control_msg(DeviceRequestTO): unknown error > caught usb_control_msg(DeviceRequestTO): unknown error > caught usb_control_msg(DeviceRequestTO): unknown error > caught usb_control_msg(DeviceRequestTO): unknown error > caught usb_control_msg(DeviceRequestTO): unknown error > caught usb_control_msg(DeviceRequestTO): unknown error > caught usb_control_msg(DeviceRequestTO): pipe is stalled > caught usb_control_msg(DeviceRequestTO): pipe is stalled > Bus 005 Device 002-05ac-8501-ff-ff: ID 05ac:8501 Micron > caught usb_control_msg(DeviceRequestTO): pipe is stalled > osx:pyusb yaniv$ > > The exception is caught on the getString(), not on the open(). > > I don't know what's special about this Micron device which works. > > I've tried running as UID 0 as well. > > Any further ideas? > > Many thanks, > - Yaniv > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> > http://get.splunk.com/_______________________________________________ > Pyusb-users mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > > > > -Sarah > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > |