Since transitioning to Ubuntu Linux, I’ve continued working on my Lego NXT projects. I spent several hours figuring out how to configure my machine to write, debug, and upload code to the NXT brick. I found several sites and message board posts, each detailing a specific step in the process. I thought it would be a good idea to bring all of this information together and hopefully make it easy for anyone else who wishes to follow in my footsteps.
The entire process consists of setting up a Windows emulator (WINE), installing an IDE (BricxCC), and installing and running a communications tool between linux and the brick (Talk2NXT).
- install WINE
- install bricxCC
a. download from sourceforge: http://sourceforge.net/projects/bricxcc/files/bricxcc/
[UPDATE]At some point, Ubuntu required that all software not coming from a trusted repository be blocked unless the permissions were changed to “executable”. Explanation here. The only change is that the bricxccinstall.exe file will need to be chmod777’ed.[/UPDATE]
b. right click and select “Open with ‘Wine Windows Loader Program’ ”
c. complete the Windows-like installer
At this point, in the BricxCC GUI, try to compile some code and save it as a .NXT. If this works then you’re ready talk to the Brick.
- get Talk2NXT
tar -xzvf t2n-0.2.src.tgz
mv obj/t2n /usr/local/bin/
- physically connect the NXT Brick via USB, and turn on the Brick
#### NXT INFOS ###############
protocol version=1.124 firmware version=1.1
NXT Name: NXT
Blutooth address: 16:53:00:23:74:00
Blutooth signal: 0
Free user flash: 115536
- not necessary, but list the files on the NXT Brick
- Generate .rxe files.
If you have any files uploaded from before (maybe under a Windows usage) you’ll see that the program files are .rxe even though BricxCC saves files as .nxc. We now need to generate .rxe files from the code, so that the Brick will know what to do. When you upload through BricxCC in Windows, it autmatically generates a .rxe file from the .nxc. We can do this easily during compiling. In BricxCC GUI
- Upload a .rxe file, in terminal
- List files on the brick to confirm that the upload was completed
I certainly can not claim any credit for this except for bringing it all together. Credit goes to: