Closed crlane closed 9 years ago
Wich version of PyUSB are you using?
Date: Thu, 1 Jan 2015 11:07:40 -0800 From: notifications@github.com To: WeDoMore@noreply.github.com Subject: [WeDoMore] Problems on Rasbpian (#5)
I'm using Raspbian and python and trying to connect to wedo. The device is detected just fine, but there appears to be a problem with the interface between pyusb and the os version of libusb (I'm guessing at this, but it seems reasonable).
when I run the command >>> wd = WeDo(), it fails during the init and gives the following traceback:
NotImplementedError Traceback (most recent call last)
@lfaraone thanks for the link. Looked through that and tried using libopenusb0
, but that didn't seem to work
@AlanJAS here's my version info of pyusb.
In [2]: usb.version_info
Out[2]: (1, 0, 0, 'b2')
That seems the libusb is the old..A workarround: If you comment the two lines of the "if" and try again? Date: Thu, 1 Jan 2015 13:13:13 -0800 From: notifications@github.com To: WeDoMore@noreply.github.com CC: alanjas@hotmail.com Subject: Re: [WeDoMore] Problems on Rasbpian (#5)
@lfaraone thanks for the link. Looked through that and tried using libopenusb0, but that didn't seem to work
@AlanJAS here's my version info of pyusb.
In [2]: usb.version_info Out[2]: (1, 0, 0, 'b2')
— Reply to this email directly or view it on GitHub.
=
@AlanJAS Tried commenting out the offending lines. Now I end up with problems accessing the logger? Very strange. I'll keep looking for a solution that works, as I'd really like to be able to use python with the WeDo. Thanks for all your help.
I'm using a bit new PyUsb version (directly with the git).Can you test this code: http://www.fing.edu.uy/~aaguiar/files/test.tar.gz It have his own pyusb, only run: python test.pyIf works, must turn motor on.If fails, must appears the problem.
Date: Sat, 3 Jan 2015 07:32:46 -0800 From: notifications@github.com To: WeDoMore@noreply.github.com CC: alanjas@hotmail.com Subject: Re: [WeDoMore] Problems on Rasbpian (#5)
@AlanJAS Tried commenting out the offending lines. Now I end up with problems accessing the logger? Very strange. I'll keep looking for a solution that works, as I'd really like to be able to use python with the WeDo. Thanks for all your help.
— Reply to this email directly or view it on GitHub.
=
Again, looks like it got the device okay, but pyusb was unable to configure the device. Unexpectedly, it gives a resource busy error from pyusb.
Traceback (most recent call last):
File "test.py", line 59, in <module>
w.init_device()
File "test.py", line 35, in init_device
self.dev.set_configuration(WEDO_CONFIGURATION)
File "/home/cameron/test/usb/core.py", line 799, in set_configuration
self._ctx.managed_set_configuration(self, configuration)
File "/home/cameron/test/usb/core.py", line 128, in managed_set_configuration
self.backend.set_configuration(self.handle, cfg.bConfigurationValue)
File "/home/cameron/test/usb/backend/libusb1.py", line 738, in set_configuration
_check(self.lib.libusb_set_configuration(dev_handle.handle, config_value))
File "/home/cameron/test/usb/backend/libusb1.py", line 560, in _check
raise USBError(_str_error[ret], ret, _libusb_errno[ret])
usb.core.USBError: [Errno 16] Resource busy
Didn't really mean to close; however, it appears this is not a problem with WeDoMore, but rather an issue between libusb and pyusb. Perhaps I'll open a bug report there. Thanks again for all the help.
I'm using Raspbian and python and trying to connect to wedo. The device is detected just fine, but there appears to be a problem with the interface between pyusb and the os version of libusb (I'm guessing at this, but it seems reasonable).
when I run the command
>>> wd = WeDo()
, it fails during the__init__
and gives the following traceback:Upon further inspection (manually collecting the device, then trying to configure it), I also see this error:
Has anyone else encountered this problem? is there something that I am doing wrong? I'm willing to help hack on this if I can get some guidance as to how I can proceed. Thanks.
distro information
libusb information