Java on the NXT: leJOS NXJ is here!



I know many people have been awaiting this big step forwards from iCommand. (Which runs a Java program on your PC to remotely control the NXT.)

Details from the leJOS home page:
leJOS NXJ is ready for download. leJOS NXJ is a full firmware replacement and works for Windows and Linux. This is a technology preview of things to come. At the moment there is no Bluetooth, I2C (Ultrasonic sensor), or sound support and we do not have a basic menu system. You can write Java programs and upload them to the NXT brick via USB. (see readme for more information)

Congratulations to Brian Bagnall and everyone who has been working on this, and thanks for letting us know about the release.

Please leave a comment if you try it. (I have not installed it yet, and I probably will not have the time before the weekend.)

- Tony N

Comments

David Levy said…
It looks very similar to the RCX version. I wonder how they got it to port to the NXT.
Do you know if they are using the Bluetooth protocol internally to accomplish this or was there an attempt to reverse engineer the NXT similar to the work of
Keloa Proudfoot
?
Anonymous said…
I'm the guy that did the low level stuff to get NXJ working. This effort started before Lego made their fw source available and uses all original code.

You can't just use the BT protocol internally. That does not make sense.

The NXT low-level firmware was written from the ground up using the schematics and documentation as reference. When the Lego fw source became available, I looked at that once or twice for clarification of some missing info in the documents.

The firmware development was done using gcc for ARM and jtag debugging etc. See http://users.actrix.co.nz/manningc/lejos_nxt.jpg

There's still quite a bit to go to get a full system, but various people have been using pre-release Lejos NXJ for a few weeks now.

This effort was similar in ways to Proudfoot's work. This effort did not require as much hardware reverse engineering because Lego released the schematics. On the flip side though, the NXT is far more complex and there are a lot more complex issues to sort out. For example, the link between the ARM and the AVR was a lot more complex to debug.
Anonymous said…
Is NXJ windows and linux only? Or just not tested on OSX?
Anonymous said…
While I don't know if anyone has tries OSX I can't see why it would not work.

You need java and you need to build USB loader which is built on libusb. If you want to rebuild the VM from scratch you will need gcc etc for ARM too. So long as libusb supports OSX (which a quick Google search suggests is good), then I can't see any problems with using NXJ on OSX.

Of course you could then post on the Lejos mailing list any special steps you needed to take :-)
Anonymous said…
I have build the loader (not the VM) under OSX.
You need:
Developer Tools (obviously)
libUSB ( configure / make / make install)

I haven't build the VM cause i did want to build a GCC tool chain for ARM for a simple quick look on a alpha release.

- Spirou
Anonymous said…
Good to hear it. Please post your results on the lejos mailing list
Anonymous said…
Once this is ironed out, it will be quite a step forward for beginning programming/robotics courses considering they had to wade into the waters of c or c++ before this. Did you leave the garbage collection routines in place? Can't wait to try it out.
Anonymous said…
Does anyone know how to uninstall lejos again. I cannot connect from within the nxt software to download the factory firmware
Anonymous said…
The NXT has a reset button ( I forget exactly where). If you use that it should reset the NXT back to it's factory settings.

Popular Posts