Cannot connect over usb (Device Busy)

63 views
Skip to first unread message

Alex Rodrigues

unread,
Nov 20, 2013, 10:19:28 AM11/20/13
to nxt-p...@googlegroups.com
I have been unable to connect to my NXT using NXT-python and USB. I have pasted the output from console below and then described how I got here after that.

>>> import nxt
>>> b = nxt.find_one_brick(debug=True)
Warning: Config file (should be at /home/lemiant/.nxt-python) was not read. Use nxt.locator.make_config() to create a config file.
Host: None Name: None Strict: True
USB: True BT: True Fantom: False FUSB: False FBT: False
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nxt/locator.py", line 119, in find_one_brick
    info = b.get_device_info()
  File "/usr/local/lib/python2.7/dist-packages/nxt/brick.py", line 29, in poll
    igram = Telegram(opcode=opcode, pkt=self.sock.recv())
  File "/usr/local/lib/python2.7/dist-packages/nxt/usbsock.py", line 73, in recv
    data = self.handle.bulkRead(self.blk_in.address, 64)
USBError: Connection timed out
Failed to connect to possible brick
Bluetooth module unavailable, not searching there
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/nxt/locator.py", line 137, in find_one_brick
    raise BrickNotFoundError
nxt.locator.BrickNotFoundError

I started out trying on my windows 7 (x64) machine. I installed libusb and pyusb and was eventually able to see the device and verify that it was an NXT by:

>>>for bus in usb.busses():
...        for device in bus.devices:
...               print deice.idVendor
1624

Since 1624 is the Lego vendor code, I know that I was seeing the NXT. Beyond that, though I was never able to connect with nxt-python I kept getting errors like "connection timed out" or "connection busy".
As a final attempt I tried connecting to the NXT from an Ubuntu VM since the installation page mentions USB being buggy on windows.
On Ubuntu I installed nxt-python, and pyusb and created the rules doc as described on the install page. I still cannot connect, instead I'm getting the output above.

Can anybody help?

- Alex

Reply all
Reply to author
Forward
0 new messages