BCI2000

Introduction

The contributions package for BCI2000 contains an LSL source module that can be used to acquire data from the LabStreamingLayer (LSL) to use in BCI2000. It is currently not possible to subscribe to an LSL stream from the Explore device without making changes to the source code of Explorepy or building BCI2000 yourself. This is due to the LSL node resolving streams by data type, the last released installer for BCI2000 with Contributions does not contain changes to filter by a custom property. As the LSL node filters out any type that isn’t EEG and Explorepy and Explore Desktop push the data with the type ExG, the stream cannot be discovered in this version.

This page aims to give an overview of the options advanced users have to get a data stream from the Explore device as input to BCI2000.

Option 1: Building BCI2000 locally from the latest code revision

The source code for BCI2000 is available after making a free account on the BCI2000 website. Their wiki contains an in-depth guide to building the software locally. The LSL source node available in the contributions to BCI2000 contains fields to set the LSL stream property (StreamSelectionProperty) and value (StreamSelectionPropertyValue) to filter for.

If you have built BCI2000 locally with the latest version of the LSL source node, follow these steps to stream data from your Explore device to BCI2000:

  1. Install Explorepy or Explore Desktop.
  2. If using Explorepy, use the push2lsl command to connect to a device and push data from it to LSL. If using Explore Desktop, connect to a device, navigate to the signal visualisation, open the LSL menu by clicking on the LSL button and click on Push data to LSL.
  3. Open the BCI2000 Launcher or launch a batch script from the batch directory of your BCI2000 installation that uses LSLSource as the acquisition module. If you are using the BCI2000 Launcher, select LSLSource as the Signal Source module and choose the other modules as needed (for example, DummySignalProcessing and DummyApplication), then click on Launch.
  4. Click on Config in the newly launched Operator to open the configuration for your set-up, navigate to the Source tab and change the fields according to the device stream.
    1. SourceCh: The number of channels your device has, i.e. 8, 16 or 32.
    2. SamplingRate: The sampling rate the device is set to, i.e. 250Hz, 500Hz, 1000Hz.
    3. SourceChGain: The gain for the signals, default is auto. You can alternatively set this to 1uV per channel (i.e. 1 1 1 1 1 1 1 1 for an 8 channel device).
    4. StreamSelectionProperty: The property of the stream to filter for, you can use i.e. type or name.
    5. StreamSelectionPropertyValue: The value of the stream property to filter for, if using type, this should be ExG, if using name this should be Explore_XXXX_ExG (with XXXX replaced with your device’s ID).
Lorem ipsum
The configuration for the LSL source node needs to be adapted to fit the properties of the Explore device's LSL stream. In this example, an 8 channel device is pushing to LSL with a sampling rate of 250Hz.
  1. To ensure that your configuration is correct, click on Set Config. This will launch a signal visualizer that will show your signals as they are coming in via the LSL stream.
Lorem ipsum
If BCI2000 finds the correct stream, either by changing the type to EEG in Explorepy or by using a locally built version of BCI2000, the signals coming in can be visualized when clicking on Set Config. In this example, only channels 5 to 8 made contact with the skin.

Option 2: Adapting Explorepy

Explorepy and Explore Desktop push signals to LSL using the type ExG as the Explore device can be used to gather various types of biosignals. The last binary release of BCI2000 with contributions (which the LSLSource module is a part of) does not allow filtering for a specific property and value. Instead, it filters for the type EEG. To push data from the Explore device with the type EEG you can adapt the source code of Explorepy yourself. Explorepy is fully open source and can be forked from our public GitHub repository. To adapt Explorepy for your needs, you can follow these steps:

  1. Create a fork of Explorepy.
  2. Pull your newly created fork to have it locally.
  3. In the pulled repository, navigate to src –> explorepy and open tools.py.
  4. Find the method initialize_outlets in the class LslServer.
  5. Change the line type='ExG' to type='EEG' where the StreamInfo object is created for the ExG stream:
    def initialize_outlets(self):
        info_exg = StreamInfo(name=self.device_name + "_ExG",
                              type='EEG',
                              channel_count=self.n_chan,
                              nominal_srate=self.exg_fs,
                              channel_format='float32',
                              source_id=self.device_name + "_ExG")
        info_exg.desc().append_child_value("manufacturer", "Mentalab")
        [...]
  1. Create a new environment with dependencies as described in Explorepy’s documentation.
  2. Intead of installing explorepy in your environment from PyPI (pip install explorepy), navigate to the root folder of your Explorepy fork and install the local repository (pip install .).
  3. Use the push2lsl command to push data from the device to LSL.
  4. From here, you can follow steps 3 - 5 from Option 1 to subscribe to the data in BCI2000 (skipping steps 4.4 and 4.5).

For more information or support, do not hesitate to get in contact at: support@mentalab.com

Copyright © 2025 Mentalab