arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

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.

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