Cortex API
  • Getting Started
  • Connecting to the Cortex API
  • Overview of API flow
  • Authentication
    • getCortexInfo
    • getUserLogin
    • requestAccess
    • hasAccessRight
    • authorize
    • generateNewToken
    • getUserInformation
    • getLicenseInfo
  • Headsets
    • controlDevice
    • queryHeadsets
    • updateHeadset
    • updateHeadsetCustomInfo
    • syncWithHeadsetClock
    • Headset object
  • Sessions
    • createSession
    • updateSession
    • querySessions
    • Session object
  • Data Subscription
    • subscribe
    • unsubscribe
    • Data sample object
  • Records
    • createRecord
    • stopRecord
    • updateRecord
    • deleteRecord
    • exportRecord
    • queryRecords
    • getRecordInfos
    • configOptOut
    • requestToDownloadRecordData
    • Record object
  • Markers
    • injectMarker
    • updateMarker
    • Marker object
  • Subjects
    • createSubject
    • updateSubject
    • deleteSubjects
    • querySubjects
    • getDemographicAttributes
    • Subject object
  • BCI
    • queryProfile
    • getCurrentProfile
    • setupProfile
    • loadGuestProfile
    • getDetectionInfo
    • training
    • Readonly profile
  • Advanced BCI
    • getTrainedSignatureActions
    • getTrainingTime
    • facialExpressionSignatureType
    • facialExpressionThreshold
    • mentalCommandActiveAction
    • mentalCommandBrainMap
    • mentalCommandGetSkillRating
    • mentalCommandTrainingThreshold
    • mentalCommandActionSensitivity
  • Warning Objects
  • Error Codes
  • Troubleshooting Guide
  • Release Notes
  • cortexaccess tool
Powered by GitBook
On this page
  • Parameters
  • Result
  • Examples
  1. Headsets

updateHeadset

PreviousqueryHeadsetsNextupdateHeadsetCustomInfo

Last updated 4 years ago

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 .

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.

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.

Parameters

Name

Type

Required

Description

cortexToken

string

yes

headset

string

yes

setting

object

yes

An object containing the setting to apply. See below.

The setting parameter must be an object with these fields:

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

number

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.

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

Result

The result is an object containing these fields:

Name

Type

Description

headsetId

string

The headset id you set in the parameters.

message

string

A success message.

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.

Examples

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

{
    "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": "..."
    }
}

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": "updateHeadset",
    "params": {
        "cortexToken": "xxx",
        "headsetId": "EPOCPLUS-3B9AXXXX",
        "setting": {
            "mode": "EPOC",
            "eegRate": 128,
            "memsRate": 0
        }
    }
}
{
    "id": 1,
    "jsonrpc": "2.0",
    "result": {
        "headsetId": "EPOCPLUS-3B9AXXXX",
        "message": "..."
    }
}

A token returned by .

A headset id returned by .

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.

queryHeadsets
queryHeadsets
authorize
queryHeadsets
code 110 or 111
code 112