arrow-left

All pages
gitbookPowered by GitBook
1 of 8

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

updateHeadsetCustomInfo

This method lets you set the headband position of an EPOC X headset.

The headband position is important to interpret the motion data coming from the headset. The motion sensor is located in the headband. So Cortex uses the headband position to know the orientation of the motion sensor.

When you start a record Cortex saves the current headband position into the record. So you should set the position before starting the record.

This method was added in Cortex 2.4

hashtag
Parameters

hashtag
Result

The result is an object containing these fields:

hashtag
Examples

yes

Must be "back" or "top".

Name

Type

Required

Description

cortexToken

string

yes

A token returned by authorize.

headsetId

string

yes

A headset id returned by queryHeadsets.

headbandPosition

Name

Type

Description

headsetId

string

The headset id used in the request.

customName

string

The custom name of the headset.

headbandPosition

string

The position of the headband. Can be "back" or "top".

string

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "updateHeadsetCustomInfo",
  "params": {
    "cortexToken": "xxx",
    "headbandPosition": "top",
    "headsetId": "EPOCX-12345678"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "customName": "Epoc 1",
    "headbandPosition": "top",
    "headsetId": "EPOCX-12345678",
    "message": "Update headset customized information successfully."
  }
}

queryHeadsets

Discover details about headsets connected to your device via USB dongle, USB cable, or Bluetooth or virtual headsets enabled through the EMOTIV Launcher. Additionally, search for a specific headset using its ID or apply a wildcard for partial matches.

hashtag
Parameters

Name

Type

Required

For the parameter id, you can use these wildcards:

hashtag
Result

The result is an array of , or an empty array if no headset matches the request.

hashtag
Examples

hashtag
Query all the headsets

If no headset matches your request, then the result is an empty array.

hashtag
Query a headset by its id

hashtag
Query all the Insight headsets

configMapping

The configMapping API manages EEG channel mapping configurations for a EPOC Flex headset. This API allows you to create, get, read, update and delete mapping configurations.

To connect to an EPOC Flex headset, you must input a specific EEG channel mapping or the name of an existing mapping for the current Emotiv user.

hashtag
Parameters

Headsets

After you finish the authentication process, your application should start headset scanning to search for EMOTIV headsets, using the method controlDevice with "refresh" command, then use the method queryHeadsets to get the discovered headsets.

If the headset is not connected to Cortex yet, then you must call controlDevice with "connect" command.

See also Headset object for details.

Description

id

string

No

A headset id or a wildcard

includeFlexMappings

boolean

No

Set this parameter to true to include the mapping of each EPOC FLEX headset in the result headset object.

Wildcard

Filter

INSIGHT-*

All Insight headsets

EPOC-*

All Epoc headsets

EPOCPLUS-*

All Epoc Plus headsets

headset objects
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "queryHeadsets"
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": [
        {
            "connectedBy": "dongle",
            "customName": "",
            "dongle": "6ff",
            "firmware": "625",
            "id": "EPOCPLUS-3B9AXXXX",
            "motionSensors": [
                "GYROX",
                "GYROY",
                "GYROZ",
                "ACCX",
                "ACCY",
                "ACCZ",
                "MAGX",
                "MAGY",
                "MAGZ"
            ],
            "sensors": [
                "AF3",
                "F7",
                "F3",
                "FC5",
                "T7",
                "P7",
                "O1",
                "O2",
                "P8",
                "T8",
                "FC6",
                "F4",
                "F8",
                "AF4"
            ],
            "settings": {
                "eegRate": 256,
                "eegRes": 16,
                "memsRate": 64,
                "memsRes": 16,
                "mode": "EPOCPLUS"
            },
            "status": "connected"
        }
    ]
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "queryHeadsets"
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": []
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "queryHeadsets",
    "params": {
        "id": "EPOCPLUS-3B9AXXXX"
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": [
        {
            "connectedBy": "dongle",
            "customName": "",
            "dongle": "6ff",
            "firmware": "625",
            "id": "EPOCPLUS-3B9AXXXX",
            "motionSensors": [
                "GYROX",
                "GYROY",
                "GYROZ",
                "ACCX",
                "ACCY",
                "ACCZ",
                "MAGX",
                "MAGY",
                "MAGZ"
            ],
            "sensors": [
                "AF3",
                "F7",
                "F3",
                "FC5",
                "T7",
                "P7",
                "O1",
                "O2",
                "P8",
                "T8",
                "FC6",
                "F4",
                "F8",
                "AF4"
            ],
            "settings": {
                "eegRate": 256,
                "eegRes": 16,
                "memsRate": 64,
                "memsRes": 16,
                "mode": "EPOCPLUS"
            },
            "status": "connected"
        }
    ]
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "queryHeadsets",
    "params": {
        "id": "INSIGHT-*"
    }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": [
    {
      "id": "INSIGHT-AAAA0000",
      "status": "connected",
      "connectedBy": "dongle",
      "customName": "",
      "dongle": "6ff",
      "firmware": "930",
      "headbandPosition": null,
      "motionSensors": [
        "Q0",
        "Q1",
        "Q2",
        "Q3",
        "ACCX",
        "ACCY",
        "ACCZ",
        "MAGX",
        "MAGY",
        "MAGZ"
      ],
      "sensors": [
        "AF3",
        "T7",
        "Pz",
        "T8",
        "AF4"
      ],
      "settings": {
        "eegRate": 128,
        "eegRes": 14,
        "memsRate": 64,
        "memsRes": 14,
        "mode": "INSIGHT"
      }
    }
  ]
}

Name

Type

Required

Description

cortexToken

string

Yes

A valid Cortex token from a successful authentication.

status

string

Yes

Action to perform: create, get, read, update, or delete.

uuid

string

No

Unique ID of a mapping configuration (required for read, delete).

hashtag
Status create

Create a new sensor mapping for EPOC Flex. The configuration will be added to list EEG sensor mapping configuration of current emotiv user, can be synced to other machine. Requires: cortexToken, status="create", name, and mappings.

Example

{
    "id": 1,
    "
{
  "id": 1,
  "

hashtag
Status get

Retrieve all mapping configurations for the current Emotiv user. Requires: cortexToken, status="get".

Example

hashtag
Status read

Read the details of a specific configuration. Requires: cortexToken, status="read", uuid.

Example

hashtag
Status update

To update an existing mapping configuration. Requires: cortexToken, status, and uuid.

The name and mappings are optional parameters:

  • If name is included, the configuration name will be updated.

  • If mappings is included, the mappings will be updated.

  • If both are included, both fields will be updated.

Example

hashtag
Status delete

Delete a mapping configuration. Requires: cortexToken, status="delete", uuid.

Example

updateHeadset

This method lets you change the settings of an EPOC+ or EPOC X headset.

You can configure the EEG sample rate, EEG resolution, motion data sample rate, and motion data resolution. You can check the current settings of a headset using the method queryHeadsets.

This method is for EPOC+ and EPOC X headsets only. There are no configuration settings for other EMOTIV headsets.

Please note that updating the configuration of a headset can take a few seconds.

circle-info

The user must connect the headset to the computer by using a USB cable before calling this method. You can't configure the headset through a wireless connection. You can use to check how the headset is connected.

hashtag
Parameters

The setting parameter must be an object with these fields:

circle-info

A motion rate of zero means that the motion sensors are disabled.

hashtag
Result

The result is an object containing these fields:

In Cortex 2.3.0 and earlier, you just need to check the result of the method. If the method doesn't return any error, then it means that the update is successful.

However, since Cortex 2.4.0, the result of the method just tells you that the update is in progress. You must wait for a warning object with to know if the update is successful or not.

If your configuration is not compatible with a Bluetooth connection then you will receive a warning with . Your configuration will work fine with a USB dongle. To use the headset with a Bluetooth connection, you must set the EEG rate to 128Hz and disable the motion sensors.

hashtag
Examples

Set the EEG rate to 256 hertz (16 bits) and the motion rate to 64 hertz (16bits)

Set the EPOC+ headset in EPOC mode, EEG rate at 128 hertz (14 bits) and disable the motion sensors.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "configMapping",
  "params": {
    "cortexToken": "xxx",
    "status": "get"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "message": "Get flex mapping config successful",
    "value": {
      "config": [
        {
          "label": {},
          "mappings": {
            "CMS": "TP10",
            "DRL": "TP9",
            "LA" : "C3",
            "LB" : "T7",
          },
          "name": "Default Configuration",
          "uuid": "f4296b2d-d6e7-45cf-9569-7bc2a1bd56e4"
        },
        {
          "label": {},
          "mappings": {
            "CMS": "TP9",
            "DRL": "TP10",
            "RF" : "F8",
            "RG" : "AF4"
          },
          "name": "config2",
          "uuid": "764adb97-a710-4d95-977a-dea5b682aa04"
        }
      ],
      "updated": "2025-10-08T06:16:30.521+07:00",
      "version": "2018-05-08"
    }
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "configMapping",
  "params": {
    "cortexToken": "xxx",
    "status": "read",
    "uuid": "764adb97-a710-4d95-977a-dea5b682aa04"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "message": "Read flex mapping config successful",
    "value": {
      "label": {},
      "mappings": {
        "CMS": "TP9",
        "DRL": "TP10",
        "RF" : "F8",
        "RG" : "AF4"
      },
      "name": "config2",
      "uuid": "764adb97-a710-4d95-977a-dea5b682aa04"
    }
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "configMapping",
  "params": {
    "cortexToken": "xxx",
    "status": "update",
    "uuid": "764adb97-a710-4d95-977a-dea5b682aa04",
    "name": "new config"
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "message": "Update flex mapping config successful",
    "value": {
      "label": {},
      "mappings": {
        "CMS": "TP9",
        "DRL": "TP10",
        "RF" : "F8",
        "RG" : "AF4"
      },
      "name": "new config",
      "uuid": "764adb97-a710-4d95-977a-dea5b682aa04"
    }
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "configMapping",
  "params": {
    "cortexToken": "xxx",
    "status": "delete",
    "uuid": "effa621f-49d6-4c46-95f3-28f43813a6e9"
  }
}
{
  "id": 3373617,
  "jsonrpc": "2.0",
  "result": {
    "message": "Delete flex mapping config successful",
    "uuid": "effa621f-49d6-4c46-95f3-28f43813a6e9"
  }
}
jsonrpc
"
:
"
2.0
"
,
"method": "configMapping",
"params": {
"cortexToken": "xxx",
"mappings": {
"CMS": "TP9",
"DRL": "TP10",
"RD": "T8",
"RE": "F4",
"RF": "F8",
"RG": "AF4"
},
"name": "config1",
"status": "create"
}
}
jsonrpc
"
:
"
2.0
"
,
"result": {
"message": "Create flex mapping config successful",
"value": {
"label": {},
"mappings": {
"CMS": "TP9",
"DRL": "TP10",
"RD": "T8",
"RE": "F4",
"RF": "F8",
"RG": "AF4"
},
"name": "config1",
"uuid": "4416dc1b-3a7c-4d20-9ec6-aacdb9930071"
}
}
}

name

string

No

Name of the configuration (required for create ).

mappings

object

No

Key-value pairs define EEG sensor mapping (required for create; optional for update). More details are available here.

yes

An object containing the setting to apply. See below.

yes

The motion sample rate, in hertz.

If the mode is "EPOC", then the motion rate must be 0.

If the mode is "EPOCPLUS", then the motion rate can be 0, 32, 64 or 128.

Name

Type

Required

Description

cortexToken

string

yes

A token returned by authorize.

headset

string

yes

A headset id returned by queryHeadsets.

setting

Name

Type

Required

Description

mode

string

yes

Must be "EPOC" or "EPOCPLUS".

In "EPOC" mode, the EEG resolution is 14 bits.

In "EPOCPLUS" mode, the EEG and motion resolutions are 16 bits.

eegRate

number

yes

The EEG sample rate, in hertz. If the mode is "EPOC", then the EEG rate must be 128.

If the mode is "EPOCPLUS", then the EEG rate can be 128 or 256.

memsRate

Name

Type

Description

headsetId

string

The headset id you set in the parameters.

message

string

A success message.

queryHeadsets
code 110 or 111
code 112

object

number

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "updateHeadset",
    "params": {
        "cortexToken": "xxx",
        "headsetId": "EPOCPLUS-3B9AXXXX",
        "setting": {
            "mode": "EPOCPLUS",
            "eegRate": 256,
            "memsRate": 64
        }
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "headsetId": "EPOCPLUS-3B9AXXXX",
        "message": "..."
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "updateHeadset",
    "params": {
        "cortexToken": "xxx",
        "headsetId": "EPOCPLUS-3B9AXXXX",
        "setting": {
            "mode": "EPOC",
            "eegRate": 128,
            "memsRate": 0
        }
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "headsetId": "EPOCPLUS-3B9AXXXX",
        "message": "..."
    }
}

controlDevice

This method is to connect or disconnect a headset. It can also refresh the list of available Bluetooth headsets returned by queryHeadsets.

Please note that connecting and disconnecting a headset can take a few seconds.

Before you call createSession on a headset, make sure that Cortex is connected to this headset. You can use queryHeadsets to check the connection status of the headset.

circle-info

This method is not available on iOS. On iOS the user must connect and disconnect the headset in EMOTIV App.

hashtag
Parameters

hashtag
Headset Scanning Flow

The app must call controlDevice with "refresh" command to start headset scanning. The timeout of scanning is around 20s. When the scanning finishes, Cortex will send a to the app. When received this warning, if the app still want to scan for headsets, simply call controlDevice with "refresh" command again.

Please note that headset scanning can affect to data stream quality if headset scanning is running at the same time with data stream subscription, so we recommend app developers to design the app so that we only run headset scanning when necessary.

hashtag
EPOC Flex mapping

The mappings parameter is only to connect an EPOC Flex headset. Use this parameter to tell Cortex how you setup the EEG sensors of your EPOC Flex headset.

The keys for this object must be chosen from this list: "CMS", "DRL", "LA", "LB", "LC", "LD", "LE", "LF", "LG", "LH", "LJ", "LK", "LL", "LM", "LN", "LO", "LP", "LQ", "RA", "RB", "RC", "RD", "RE", "RF", "RG", "RH", "RJ", "RK", "RL", "RM", "RN", "RO", "RP", "RQ".

The keys "CMS" and "DRL" are required.

The values are sensor locations from the international 10-20 system: "Cz", "FCz", "Fz", "Afz", "Fpz", "Fp1", "AF3", "AF7", "F9", "F7", "F5", "F3", "F1", "FC1", "C1", "C3", "FC3", "FC5", "FT7", "FT9", "T7", "C5", "TP9", "TP7", "CP5", "CP3", "CP1", "P1", "P3", "P5", "P7", "P9", "PO9", "PO7", "PO3", "O1", "O9", "CPz", "Pz", "POz", "Oz", "Iz", "O10", "O2", "PO4", "PO8", "PO10", "P10", "P8", "P6", "P4", "P2", "CP2", "CP4", "CP6", "TP8", "TP10", "C6", "T8", "FT10", "FT8", "FC6", "FC4", "C4", "C2", "FC2", "F2", "F4", "F6", "F8", "F10", "AF8", "AF4", "Fp2".

hashtag
Special EEG sensor mapping for EPOC Flex

By default, the streams "met", "com" and "fac" are not available for EPOC Flex. It is because Cortex doesn't implement the detections (performance metrics, mental command, facial expression) for EPOC Flex.

However, you can configure your EPOC Flex to simulate an EPOC X headset. In that case, Cortex runs the detections that are designed for EPOC X.

All you have to do is to use a sensor mapping that includes all the 14 EEG sensors of an EPOC X headset: AF3, F7, F3, FC5, T7, P7, O1, O2, P8, T8, FC6, F4, F8, AF4. In addition, you should use P3 and P4 as references CMS and DRL. Please see the EPOC X for the complete EPOC X configuration.

Your mapping can also include sensors that are not present on an EPOC X. Cortex will not use these additional sensors to run the detections, but you can use them to collect more EEG data.

There are two methods for creating the mapping for EPOC Flex:

  1. Using the EMOTIV Launcher, which can be accessed .

  2. Using the configMapping API, available .

Example of special EEG sensor mapping:

This feature was added in Cortex 2.7.1

hashtag
Connection Type

You can use this parameter together with the command "connect", to force Cortex to use the specified connection type. For example, an EPOC+ headset can be connected by dongle or by Bluetooth. If both connections are available on your computer then you may want to set connectionType to "dongle" so you don't accidentally connect the headset with Bluetooth.

hashtag
Result

The result is an object containing these fields:

When the command is "connect", then the result of this method just tells you that the connection is in progress. You must wait for a warning object with to know that the connection is successful. If the connection fails then you will receive a warning with .

Another way to check if the headset is connected or not is to call and then check the status of the headset.

hashtag
Examples

hashtag
Refresh the list of headsets

Use the refresh command to start searching for new Bluetooth headsets.

Then you will receive a when scanning is finished.

hashtag
Connect an Insight headset

Then you will receive a warning with code 104 if the connection is successful:

hashtag
Connect an Epoc Flex headset

hashtag
Disconnect a headset

syncWithHeadsetClock

This method lets you synchronize the monotonic clock of your application with the monotonic clock of Cortex. It is an important step if you want to inject markers with a high precision.

Cortex uses a different clock for each headset and it initializes this clock when the headset is connected by Bluetooth or USB dongle. This means that:

  • You must call “syncWithHeadsetClock” after the headset is connected, not before.

  • You must provide a headset id.

  • If the headset is disconnected and connected again, then you must call this method again.

The simplest solution is to call this method just before .

hashtag
Use Case

Cortex sets the timestamps of each EEG sample using the of the computer. It is more reliable than using the system clock, because the system clock is subject to unpredictable variations, notably because of the synchronization.

When you to a record, Cortex uses the parameter "time" of your request to associate the marker with the EEG sample that has the closest timestamp. So if you want to have accurate markers, you should set the time of your markers using the monotonic clock, not the system clock.

Most programing languages provide a function to get a monotonic time. But in general, the point of origin of this time is undefined. So you need to synchronize the monotonic clock of your application with the monotonic clock used by Cortex. This is the purpose of this Cortex API method.

hashtag
Parameters

This method takes 3 parameters:

Name
Type
Required
Description

hashtag
Result

The result is a JSON object with these fields:

Name
Type
Description

To synchronize your clock, you must add the “adjustment” to your monotonic times. If the “adjustment” is positive, then it means your clock is late compared to the Cortex clock. If the “adjustment” is negative, then your clock is ahead of the Cortex clock.

hashtag
Example

Headset object

Some methods of the API return one or more headset objects, for example queryHeadsets. A session object also includes a headset object.

hashtag
Description

A headset object include these fields:

Name

hashtag
Status

When you want to work with a headset, it is important to check its status.

hashtag
Settings

The settings object include these fields:

For an Epoc+ headset, the mode can be "EPOC" or "EPOCPLUS", depending on its configuration. See for details. For an Insight or Epoc headset, the mode is always "EPOC". For an Epoc Flex headset, the mode is always "EPOCFLEX".

circle-info

A motion rate of zero means that the motion sensors are disabled.

hashtag
Flex Mapping

Currently, the flexMappings object contains a single field. It may include more fields in the future.

hashtag
Examples

hashtag
Insight

hashtag
Epoc+

hashtag
Virtual MN8

yes

The system time of your application. It must be the number of seconds that have elapsed since 00:00:00 Thursday, 1 January 1970 UTC.

You should get this time right before you call this API.

headset

string

yes

The headset id.

Use queryHeadset to list available headsets.

monotonicTime

number

yes

The monotonic time of your application. The unit is in seconds. The origin can be anything.

You should get this time right before you call this API.

systemTime

headset

string

The headset id.

adjustment

number

The difference between the monotonic clock of your application and the monotonic clock of the headset.

The unit is in seconds.

creating a record
monotonic clockarrow-up-right
NTParrow-up-right
add a marker

number

The motion data sample rate, in hertz.

memsRes

number

The motion data resolution, in bits.

Type

Description

id

string

The id of this headset.

status

string

Can be "discovered", "connecting", or "connected".

connectedBy

string

Can be "bluetooth", "dongle", "usb cable", or "extender".

dongle

string

The version of the dongle firmware.

firmware

string

The version of the headset firmware.

motionSensors

array of strings

The names of the motion sensors of this headset.

sensors

array of strings

The names of the EEG sensors of this headset. Use the international 10-20 system.

settings

object

An object containing the configuration of the EEG and motion data of this headset.

flexMappings

object

If the headset is an EPOC Flex, then this field is an object containing information about the mapping of the EEG channels.

headbandPosition

string

If the headset is an EPOC X, then this field tells you the position of the headband of this headset. Can be "back" or "top". If the headset is not an EPOC X, then this field is null. See updateHeadsetCustomInfo for details.

This field was added in Cortex 2.4

customName

string

The custom name of the headset. The user can set it in EMOTIV Launcher.

This field was added in Cortex 2.4

isVirtual

boolean

True if the headset is a virtual Brainwear. False otherwise.

Status

Description

discovered

Cortex has detected the headset, but it is not connected. You cannot create a session for a discovered headset. You can call controlDevice to connect the headset.

connecting

Cortex is trying to connect to this headset. This can take a few seconds.

connected

Cortex is connected to and receives data from this headset. You can call createSession and start working with this headset.

You can call controlDevice to disconnect the headset.

Name

Type

Description

mode

string

Can be "EPOC", "EPOCPLUS", or "EPOCFLEX"

eegRate

number

The EEG sample rate, in hertz.

eegRes

number

The EEG resolution, in bits.

memsRate

Name

Type

Description

mappings

object

Describe which EEG channel is mapped to which physical connector of EPOC Flex device. The keys are the names of the connectors, the values are the names of the EEG channels.

Example: { "CMS": "TP8", "DRL": "P6", "RM": "TP10", "RN": "P4", "RO": "P8" }

updateHeadset

number

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "syncWithHeadsetClock",
  "params": {
    "headset": "INSIGHT-587XX4BB",
    "monotonicTime": 321.445,
    "systemTime": 1629978090.302
  }
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "adjustment": 1629977768.86108,
    "headset": "INSIGHT-587XX4BB"
  }
}
{
  "id": "INSIGHT-AAAA0000",
  "status": "connected",
  "connectedBy": "dongle",
  "customName": "",
  "dongle": "6ff",
  "firmware": "930",
  "motionSensors": [
    "Q0",
    "Q1",
    "Q2",
    "Q3",
    "ACCX",
    "ACCY",
    "ACCZ",
    "MAGX",
    "MAGY",
    "MAGZ"
  ],
  "sensors": [
    "AF3",
    "T7",
    "Pz",
    "T8",
    "AF4"
  ],
  "settings": {
    "eegRate": 128,
    "eegRes": 14,
    "memsRate": 64,
    "memsRes": 14,
    "mode": "INSIGHT"
  },
  "isVirtual": false
}
{
    "id": "EPOCPLUS-3B9AXXXX",
    "status": "connected",
    "connectedBy": "dongle",
    "customName": "",
    "dongle": "6ff",
    "firmware": "625",
    "motionSensors": [
        "GYROX",
        "GYROY",
        "GYROZ",
        "ACCX",
        "ACCY",
        "ACCZ",
        "MAGX",
        "MAGY",
        "MAGZ"
    ],
    "sensors": [
        "AF3",
        "F7",
        "F3",
        "FC5",
        "T7",
        "P7",
        "O1",
        "O2",
        "P8",
        "T8",
        "FC6",
        "F4",
        "F8",
        "AF4"
    ],
    "settings": {
        "eegRate": 256,
        "eegRes": 16,
        "memsRate": 64,
        "memsRes": 16,
        "mode": "EPOCPLUS"
    },
    "isVirtual": false
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": [
    {
      "connectedBy": "bluetooth",
      "customName": "virtual mn8",
      "dfuTypes": ["dfuNone"],
      "dongle": "0",
      "firmware": "23",
      "firmwareDisplay": "0x23",
      "headbandPosition": null,
      "id": "MN8-2DC3C2D9",
      "isDfuMode": false,
      "isVirtual": true,
      "motionSensors": ["Q0", "Q1", "Q2", "Q3"],
      "sensors": ["T7", "T8"],
      "settings": {
        "eegRate": 128,
        "eegRes": 14,
        "memsRate": 6,
        "memsRes": 10,
        "mode": "MN8"
      },
      "status": "connected",
      "virtualHeadsetId": "2dc3c2d9-cfe1-461b-983b-f187437b91e0"
    }
  ]
}

no

The EEG sensor mapping of the EPOC Flex headset that you want to connect.

If the command is not "connect", or if the headset is not an EPOC Flex, then you should omit this parameter.

connectionType

string

no

If the command is "connect" or "disconnect" then this parameter can be "dongle", "bluetooth" or "usb cable", or you can omit it. If the command is "refresh" then you should omit this parameter.

This parameter was added in Cortex 2.2.1

flexConfigName

string

no

Specify the EEG sensor mapping name for the EPOC Flex headset you wish to connect. This can be retrieved using . If you provide this parameter, the mappings parameter will be ignored.

Name

Type

Required

Description

command

string

yes

The command must be "connect", "disconnect" or "refresh".

headset

string

no

The id of the headset that you want to connect or disconnect. The headset id is returned by queryHeadsets.

If the command is "refresh", then you should omit this parameter.

mappings

Name

Type

Description

command

string

The command that you set in the request

message

string

A success message

warning with code 142
user manualarrow-up-right
here
code 104
code 100, 101, 102 or 113
queryHeadsets
warning with code 142

object

{
    "CMS": "P3",
    "DRL": "P4",
    "LA": "FC5",
    "LB": "O1",
    "LC": "P7",
    "LD": "T7",
    "LE": "F3",
    "LF": "F7",
    "LG": "AF3",
    "RA": "FC6",
    "RB": "O2",
    "RC": "P8",
    "RD": "T8",
    "RE": "F4",
    "RF": "F8",
    "RG": "AF4"
 }
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "controlDevice",
    "params": {
        "command": "refresh"
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "command": "refresh",
        "message": "..."
    }
}
{
    "jsonrpc": "2.0",
    "warning": {
        "code": 142,
        "message": {
            "behavior": "Headset discovering complete."
        }
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "controlDevice",
    "params": {
        "command": "connect",
        "headset": "INSIGHT-12341234"
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "command": "connect",
        "message": "Start connecting to headset INSIGHT-12341234"
    }
}
{
    "jsonrpc": "2.0",
    "warning": {
        "code": 104,
        "message": {
            "headsetId": "INSIGHT-12341234",
            "behavior": "The headset is connected"
        }
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "controlDevice",
    "params": {
        "command": "connect",
        "headset": "EPOCFLEX-12341234",
        "mappings": {
            "CMS": "F3",
            "DRL": "F5",
            "LA": "AF3",
            "LB": "AF7",
            "RA": "P8"
        }
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "command": "connect",
        "message": "..."
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "controlDevice",
    "params": {
        "command": "disconnect",
        "headset": "EPOCFLEX-12341234"
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "command": "disconnect",
        "message": "..."
    }
}
configMapping
here