Using MonoBrick Communication Library On Linux

This guide describe how to get the LEGO Mindstorms NXT brick to work with the MonoBrick communication library and its related software under Linux. This guide is done using Ubuntu 12.10 – other flavors of Linux may differ slightly but the genneral approach described here should be the same. Also this guide is written for the NXT but also applies for the EV3

Installing Mono and MonoDevelop

First you need to install the Mono Runtime. With Ubuntu this is done with :

sudo apt-get install mono-complete

If you are using the MonoBrick communication library for writing your own programs you need to install MonoDevelop. With Ubuntu this is done with :

sudo apt-get install monodevelop

Once this is done you should be able to execute and compile C# programs.

USB Communication

Before establishing a USB connection to the Mindstorms Brick you need to install development files for libusb 1.0.0. On Ubuntu this is done with:

sudo apt-get install libusb-1.0-0-dev

Now you are all set and should be able to “see” the brick using:

lsusb|grep Lego

The result should look something like this:
Bus 001 Device 004: ID 0694:0002 Lego Group Mindstorms NXT

To get read and write access to the USB device do the following:

sudo groupadd nxt

Add the user(s) that you want to access the LEGO Brick to this group using:

sudo usermod -a -G nxt <username>

Make a file name /etc/udev/rules.d/70-lego.rules using your favorit editor and add the following content:

SUBSYSTEM=="usb", ATTRS{idVendor}=="0694", GROUP="nxt", MODE="0660"

That is it – after a reboot you now have a working USB connection that can be used with the MonoBrick communication library.

Bluetooth Communication

To get a working Bluetooth connection on Linux use this guide by Bruno Hautzenberger. An english google translated version can be found here.

2 comments on “Using MonoBrick Communication Library On Linux
  1. Author Image huty says:


    Where should I write that commands? in which programm/ where can I download it?
    Thanks for reply.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Make a donation