pombreda / nxt-python

Automatically exported from code.google.com/p/nxt-python
GNU General Public License v3.0
0 stars 0 forks source link

Wrong ID_VENDOR_LEGO #55

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. NXT 1.0 brick is connected.
2. Run a python program with the following code:
    import nxt.locator
    b = nxt.locator.find_one_brick()

What is the expected output? What do you see instead?
It should return the brick. It throws an nxt.locator.BrickNotFoundError 
exception.

What version of nxt-python are you using? On what operating system?
2.2.2, OS X 10.8.4

Please provide any additional information below.

I think the variable ID_VENDOR_LEGO in sockusb.py is wrong . I modified line 86 
on file sockusb.py
from:
    if device.idVendor == ID_VENDOR_LEGO and device.idProduct == ID_PRODUCT_NXT:
to:
    if device.idProduct == ID_PRODUCT_NXT:
and now it works.

Original issue reported on code.google.com by miguel.f...@gmail.com on 7 Jun 2013 at 9:18

GoogleCodeExporter commented 9 years ago
The product ID works fine with NxT 2.0, maybe for NxT 1.0 is different. In 
Linux we have "lsusb" command that shows all USB devices and their respective 
vendor:product device ID. In OSX I don't know, but searching, appears this 
command:
system_profiler SPUSBDataType
Try it to know wich product ID have..

Original comment by alan...@gmail.com on 8 Jun 2013 at 3:26

GoogleCodeExporter commented 9 years ago
As a noob and no less, don't you mean usbsock.py, rather than sockusb.py?

Original comment by bbles...@gmail.com on 3 Sep 2013 at 7:47