Download Version 1.00

Toolbox download

Download the full toolbox below, including all functions with sourcecodes, documentation, examples and demos. For installation see the included README.txt file or the installation guide below in this site. (0.5 MB)

System Requirements

  • Operating system: Windows or Linux
  • MATLAB Version 7.3 (R2006b) or better
  • LEGO® Mindstorms NXT building kit (e.g. Education Kit)
  • LEGO® Mindstorms NXT firmware v1.05 (recommended) or compatible
  • Bluetooth 2.0 adapter recommended model by LEGO® (e.g. AVM BlueFRITZ! USB) supporting the serial port profile (SPP)
    • An incomplete list of some tested adapters is available here

What's new & release notes

Browse the complete Release History (also available in section "Release Notes" inside MATLAB on the Toolbox help page).
The correct changelog for just this version 1.00 is availabe here (text format).

Utilities & drivers

Linux Scripts (3 KB) Download scripts for Linux that help you to establish a Bluetooth connection
and prepare the NXT to be used as USB device
LEGO® MINDSTORMS ® NXT Software Updates Firmware NXT Firmware (v1.05 recommended)

Browse this release

Browse files of the current release in our SVN repository:

Frequently answered questions

If you have problems the documentation and readme-file cannot solve, you might want to consider our FAQ-Page.


The RWTH - Mindstorms NXT Toolbox is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The RWTH - Mindstorms NXT Toolbox is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the RWTH - Mindstorms NXT Toolbox. If not, see <>.

Installation Guide

Quick Start

  • Extract the archive anywhere you want, KEEPING DIRECTORY STRUCTURE
  • The destination folder should contain a directory called RWTHMindstormsNXT
  • In MATLAB, go to "File", "Set Path…", "Add Folder…"
  • Browse to the location you extracted to, and add the folder RWTHMindstormsNXT
  • Also add the folder demos (it is a sub-directory of RWTHMindstormsNXT)
  • Press Save to remember settings for future MATLAB sessions
  • Run the command BT_MakeConfigFile from the MATLAB command window or:
  • edit a bluetooth-example ini-file from the toolbox folder to suit your configuration
  • Establish a Bluetooth connection to your NXT using your adapter's driver software
  • Authenticate with the NXT (a passkey request should appear)
  • You can now open Bluetooth connections using the toolbox command BT_OpenHandle

Full Installation Guide

The RWTH - Mindstorms NXT Toolbox is a collection of MATLAB-functions (so called m-files) and documentation / help files (mostly HTML). You have received these files in a compressed archive, that just needs to be extracted to a directory of your choice. This folder can even be on an external hard disk, USB stick or network drive. However it is recommended to use a folder on a normal hard disk drive for performance reasons. So just uncompress the archive and remember the folder you extracted it to. Make sure that the internal sub-directory structure is kept! Also it is important that all files are located in a sub-folder called RWTHMindstormsNXT for identification purposes.

Now inside MATLAB, go to the menu "File" and choose "Set Path…". Inside the new window, press "Add Folder…", and browse to the location where you extracted the files from the archive to in the previous step. Now select the folder RWTHMindstormsNXT and confirm. Repeat this step, and add the folder called demos, which is a sub-folder of the previously added RWTHMindstormsNXT-directory. When done, press "Save" to remember these settings for future MATLAB sessions.
Open the "Set Path" window Add the RWTHMindstormsNXT folder and its subfolder demos

After adding these 2 folders to the MATLAB search path, the installation is complete. To verify the installation, you can type the following line
info = ver('RWTHMindstormsNXT')
inside the MATLAB command window. Also the command BT_CloseAllHandles should work and complete without an error.

The First Bluetooth Connection

Before you can begin working with Bluetooth connections, you have to create a settings file that contains information about your Bluetooth adapter and serial port. Either you can use the toolbox-command BT_MakeConfigFile inside the command window. A dialog window lets you enter the required parameters. The other way is to edit the example-files called bluetooth-example-windows.ini or bluetooth-example-linux.ini, that are provided in the toolbox root folder.

You can leave the default values for the beginning, the only thing you will have to enter is the COM-Port. The Bluetooth SPP (serial port profile) maps a virtual COM-Port to your adapter. Find out which port this is (under Windows you can use the Device Manager) and enter it in the dialog window (example: COM4). The other parameters are explained in the documentation. Advanced users should refer to the first chapter Bluetooth connections and serial handles of the section Functions - Overview.

If there is more than one additional Bluetooth COM-Port, this is most likely caused by the adapter's driver software. Most of the time it is the lowest available COM-Port (above the classic "real ports"). The only way to be sure is to try which ports are working. (Sometimes there are certain ports that only work for sending OR receiving. The toolbox however needs a bidirectional port.)
Device manager with correct Bluetooth serial port Dialog window of BT_MakeConfigFile command

Linux users should use the bluez Bluetooth stack. The serial port will then be called /dev/rfcomm0 or similar. This is the parameter that has to be added instead of COM3 for example. The sample ini-file for Linux does not contain all settings as they are not needed here.

Once the correct ini-file is created, it can be put inside the toolbox root path or anywhere inside the MATLAB search path for better convenience.
You can now try the demos (which require a correct configuration file called bluetooth.ini) or start opening connections using the toolbox command BT_OpenHandle. Note that before this works, you have to establish a physical connection to your NXT. Depending on your Bluetooth adapter's driver software, this can be different. Once successful, the NXT and driver software will prompt you for a passkey. The authentification is then complete, and the toolbox should work properly.

For further details see the included readme.txt file located in the toolbox directory.

Disclaimer: The RWTH - Mindstorms NXT Toolbox for MATLAB is neither affiliated with nor endorsed by the LEGO Group. LEGO, MINDSTORMS, TECHNIC, and NXT are registered trademarks of the LEGO Group.

Last modified 10 years ago Last modified on Jul 26, 2009, 2:14:33 AM