On Fri, Feb 22, 2013 at 8:42 AM, Tom Lee <thomas.j....@gmail.com> wrote: > I'm trying to port some old python code from an NSLU2 to a Raspberry Pi, and > am having some trouble that seems to originate with pyUSB. I've tried this > under Raspbian and now the Arch Linux distribution, and in both cases I get > the same error: when I try to initiate a USB connection, something > segfaults. I initially thought (thanks to some help in gdb from my sysadmin) > libcrypto might have been improperly compiled for this architecture (this > was under Raspbian), but this strikes me as unlikely to be the case in two > different ARM distros, particularly one as venerable as Arch. > > Please excuse the level at which the following occurs -- I figure it's best > to try to just show what I'm doing (using a the very simple alphasign > library -- https://github.com/msparks/alphasign -- and code that is known to > work elsewhere). > > Here's a pastebin of the libusb debug output: > > http://pastie.org/6313270 > > And here's a more verbose one that's from python -v: > > http://pastie.org/6313279 > > In both cases, the code I try to run is: > >>>> import alphasign >>>> sign = alphasign.USB(alphasign.devices.USB_BETABRITE_PRISM) >>>> sign.connect() > > The third line causes the segfault. > > Any help would be greatly appreciated!
Other than Wander's patch, could you change the code alphasign to set "reset=false" in line 82 of local.py to see if that helps. https://github.com/msparks/alphasign/blob/master/alphasign/interfaces/local.py There are many codes out there calling usb reset without carefully consider the potential side effect. Those codes may work under regular Linux but may fail under not-so-regular Linux and other platform like Windows and Mac OS X. Often the usb reset is not necessary, or can be replaced by less problematic clear halt or reset endpoint call. -- Xiaofan ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users