Hey guys,
I am coming here from nxt-python mailing list. I am trying to run an
example file from nxt-python which uses pyusb and libusb libraries. The
idea is to send a command to a Lego NXT-brick device, connected through a
USB. I am getting identical errors on Mac, OSX 10.6.7 and Acer Aspire One
(AOA150) running Ubuntu 10.10 netbook remix, so it does not look like a
system-specific error. I ran a few test examples through Komodo IDE in a
debug mode and located the point where program execution breaks.
I am using python 2.6.6(Linux) and 2.7.1(OSX), libusb1.0.8 and pyusb1.0.
I wonder if you can give me some feedback on how I should proceed with
solving the issue. Below is the abbreviated output of an example program
execution with a pyusb in debug mode (export PYUSB_DEBUG_LEVEL=debug) and
later is the debug results:
vlads-macbook-pro:examples madjestic$ python message_test.py
2011-04-11 23:22:24,902 INFO:usb.core:find(): using
backend "usb.backend.libusb10"
2011-04-11
23:22:24,902 DEBUG:usb.backend.libusb10:_LibUSB.enumerate_devices()
2011-04-11
23:22:25,491
DEBUG:usb.backend.libusb10:_LibUSB.get_device_descriptor(<usb.backend.libus
b10._Device object at 0x1007386d0>)
...
2011-04-11
23:22:28,215
DEBUG:usb.backend.libusb10:_LibUSB.get_configuration_descriptor(<usb.backen
d.libusb10._Device object at 0x100738d50>, 0)
2011-04-11
23:22:28,268 DEBUG:usb.backend.libusb10:_LibUSB.get_interface_descriptor(<
usb.backend.li busb10._Device object at 0x100738d50>, 0, 1, 0)
2011-04-11
23:22:28,268
DEBUG:usb.backend.libusb10:_LibUSB.get_configuration_descriptor(<usb.backen
d.libusb10._Device object at 0x100738d50>, 0)
found brick!
2011-04-11
23:22:28,320
DEBUG:usb.backend.libusb10:_LibUSB.get_configuration_descriptor(<usb.backen
d.libusb10._Device object at 0x100738990>, 0)
2011-04-11
23:22:28,348
DEBUG:usb.backend.libusb10:_LibUSB.open_device(<usb.backend.libusb10._Device
object
at 0x100738990>)
2011-04-11
23:22:28,361
DEBUG:usb.backend.libusb10:_LibUSB.set_configuration(c_void_p(4304333824),
1)
2011-04-11
23:22:28,404
DEBUG:usb.backend.libusb10:_LibUSB.claim_interface(c_void_p(4304333824),
0)
2011-04-11
23:22:28,405
DEBUG:usb.backend.libusb10:_LibUSB.release_interface(c_void_p(4304333824),
0)
2011-04-11
23:22:28,411
DEBUG:usb.backend.libusb10:_LibUSB.reset_device(c_void_p(4304333824))
2011-04-11
23:22:28,470
DEBUG:usb.backend.libusb10:_LibUSB.close_device(c_void_p(4304333824))
2011-04-11
23:22:28,473 DEBUG:usb.backend.libusb10:_LibUSB.get_configuration(None)
Segmentation fault
###########################
I get an identical error message, when running the same on Ubuntu
10.10 Acer Aspire One system, just different numbers in
(c_void_p(XXXXXX)).
I ran a debugger on a few test scripts and found the point
where it breaks:
it's libusb10.py. line 460:
@methodtrace(_logger)
def get_configuration(self, dev_handle):
config = c_int()
_check(_lib.libusb_get_configuration(dev_handle,
byref(config))) #Line 460
return config.value
The stack at the break point looks like:
config : c_int
value int 0
dev_handle NoneType None
self _LibUSB <usb.backend.libusb10._LibUSB object at 0x1012c41d0>
I hope some of this data means something to you.
Thanks,
Vlad
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users