NB: this guide is part of the information about the balancing robot information. Please refer to that for the other components.
To install the program on the robot, you need to do three things:
Note that we have only tested this with Ubuntu 8.10. For other distributions, you may need to do some slight modifications.
Note also that some people warn that updating the firmware may brick your NXT. We have never experienced this, but if you're worried about bricking your NXT you may want to check closer with Lego about this.
You don't need any particular drivers for Linux to connect the robot using the USB cable, but you need a small configuration file that tells Linux how to handle the robot.
To do this, put 70-lego.rules in /etc/udev/rules.d (you need to be root or use "sudo cp") and make sure it's not executable (chmod -x). After that, you may need to restart the computer, or it may be enough to run the following:
sudo /etc/init.d/udev restart
To flash firmware, you can install fwflash from libnxt. We have used libnxt-0.3. A precompiled binary for 32-bit Ubuntu 8.10 is available here: fwflash.
To upload a new firmware, you need to put your Mindstorm into firmware flash mode. To do this, you need to press the tiny button that is in a hole at the back of the computer (in the same corner that you plug in the USB cable). We usually use a paperclip or a tiny screwdriver to do this.
The button needs to be held for at least 5 seconds. When you release it, the robot should make some fairly silent "clicking" sounds, which tells you that the robot is in firmware update mode.
To install the firmware, you need to plug in the USB cables and run fwflash:
sudo ./fwflash nxt_bios_rom.rfw
A precompiled firmware is available as nxt_bios_rom.rfw if you don't want to compile your own.
It should also be possible to install this firmware using Legos own software.
The robot should now be ready to receive a program (if not, you may need to reset it).
To install a program, you can use appflash from LEJOS OSEK. With some minor tweaks to the makefile, you can get it to compile on Linux. A precompiled binary is available as appflash.
Now you can run the following to install the application:
sudo ./appflash NXTway_GS_OSEK_rom-reset-ver.bin
A precompiled application binary is available here: NXTway_GS_OSEK_rom-reset-ver.bin