Display signal from OpenEEG EEG-SMT

There is a number of software intended for EEG works. The EEG-SMT quick start guide suggests Electric Guru, BrainBay and OpenVibe, but it implies the use of a legacy operating system instead of Linux.

This post extends the quick start to have Linux notes. The content:

* Install OpenVIBE
* Connect STM-EEG to Linux
* Configure OpenVIBE
* Get the signal


OpenVibe is a software platform that enables to design, test and use Brain-Computer Interfaces (BCIs). OpenViBE can also be used as a generic realtime EEG acquisition, processing and visualization system.

The version 2.0 BETA is released at the moment of writing, but I decided to avoid being a tester and downloaded the stable version 1.3.0 as the source code package. Unpack it:

tar xJvf openvibe-1.3.0-src.tar.xz

Read the file INSTALL for instructions. The short story is:

$ cd scripts
$ ./linux-install_dependencies
$ ./linux-build

Under Ubuntu 16.04.03, these commands have successfully built OpenVIBE without any tuning. The result is in "dist/".

Connect STM-EEG to Linux

Connect the device. Linux detects it automatically as:

Bus 001 Device 009: ID 0403:6001 Future Technology Devices
  International, Ltd FT232 USB-Serial (UART) IC

Modules are been automatically loaded: ftdi_sio, usbserial.

A new tty device automatically appears:

$ ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Sep  2 16:48 /dev/ttyUSB0

You are not allowed to access this file because you are not in the group "dialout". For the time being, I use a quick dirty solution, allowing access to everyone. I don't remember if write access is also required, but grant it too.

$ sudo chmod o+rw /dev/ttyUSB0
$ ls -l /dev/ttyUSB0
crw-rw-rw- 1 root dialout 188, 0 Sep  2 16:48 /dev/ttyUSB0

Configure OpenVIBE acquisition server

Now you can follow the quick start guide.

Start the aquisition server ($ ./openvibe-acquisition-server.sh) and configure as suggested:

19) Select "OpenEEG Modular EEG p2" from the drop-down menu and adjust it's properties. Especially change the COM port to the proper port the EEG-SMT got connected to (after the drivers were installed in point) and also remember to reduce the number of channels to 1 or 2!


In our case, the port is "/dev/ttyUSB0".

Click "Connect". A debug message appears in the console:

[  INF  ] Connecting to device [OpenEEG Modular EEG P2]...
[  INF  ] Connection succeeded !

Click "Run". Console:

[  INF  ] Starting the acquisition...
[  INF  ] Now acquiring...

The program complains often that "device drift is too high". I don't know if it is bad and hope it can be ignored.

Get the signal

The visualisation tool is OpenVIBE designer (./openvibe-designer.sh).

A minimal useful program consist of two blocks:

* get the signal, and
* visualise the signal.


Consult the quick start for detailed instructions.

Make sure that the acquisition server is running, now run the visualisation program and see the result:


This is a disaster with a lot of noice. And a topic for the next post.

Categories: bci