On Fri, Feb 22, 2013 at 8:42 AM, Tom Lee <thomas.j.lee@...> 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:
> And here's a more verbose one that's from python -v:
> In both cases, the code I try to run is:
>>>> import alphasign
>>>> sign = alphasign.USB(alphasign.devices.USB_BETABRITE_PRISM)
> 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.
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.