Wednesday, January 10, 2007

Introducing nxtsh - the command line interface to our favorite brick

First of all happy new year to everyone here. A lot of my christmas vacation was spent on making a shell that allows for easy file manipulation on the NXT brick from linux. My other computer is a linux machine, and I want to be able to use that when my wife wants to use the mac.

So I dug up Douglas P. Laus excellent NXT_Python module that does everything you need in terms of managing files on the brick, and then I added a shell on top. You can find it here:

A couple of notes:
  • You need the NXT_Python package, and you need the packages that NXT_Python requires. You can find these at Douglas' page.
  • The pyusb link on Douglas' page seems broken - use the SourceForge page instead if you have problems
  • This can as far as I can see only run as root when using USB due to a restriction in the pyusb module used by NXT_Python.
If you find this useful or have suggestions, drop me a note. I might update this further (command completion and readline support springs to mind), but I made it so I could play with nbc, so don't hold your breath.


Steve said...

Hey, thanks for the NXT communication shell! I just got my mindstorms last week and I'm happy I won't have to install windows to use it. You should submit it (or a link) to the linux support section on I followed they're instructions for the usb and udev configuration and it worked fine with your shell. Thanks again!

Anonymous said...

thanks for this work,
is possible to have also some examples in python of sending controls to bricks(move, stop,...) and to receiving signals from them?


mchacotay said...

Excellent... I've been trying to use my NXT in my linux machine. Your shell works perfectly.

Anonymous said...

Thanks for this, it's awsome. The link is down though but I found it on For anyone else who might have trouble downloading, here is the link:

Chris King said...

Nice software, thanks! Small bug - line 44 should have a "print" at the beginning of it.

Cadee said...

Keep up the good work.