OpenBCI Documentation

OpenBCI Documentation

  • Main Site
  • Shop
  • Forum
  • Documentation
  • Github
  • Citations

›Ganglion Board

Welcome to OpenBCI

  • Welcome to the OpenBCI Community

Getting Started

  • Getting Started
  • Boards

    • Cyton Getting Started Guide
    • Daisy Getting Started Guide
    • Ganglion Getting Started Guide
    • WiFi Shield Getting Started Guide

    Biosensing Setups

    • Setting up for EEG
    • Setting up for ECG
    • Setting up for EMG

    Community

    • Welcome to the OpenBCI Community

Cyton Board

  • Cyton Board
  • Cyton Specs
  • Cyton Data Format
  • Cyton Board SDK
  • Cyton Board Programming Tutorial
  • Cyton Radios Programming Tutorial
  • External Trigger on OpenBCI Cyton Board
  • Using SD Card with OpenBCI

Ganglion Board

  • Ganglion Board
  • Ganglion Specs
  • Ganglion Data Format
  • Ganglion SDK
  • Ganglion Programming Tutorial

Headwear & Electrodes

  • Add Ons
  • Headwear

    • Ultracortex Mark IV
    • Ultracortex Mark III
    • OpenBCI EEG Headband Kit Guide
    • Electrode Cap Getting Started Guide

    Electrodes

    • Electrode Guide

Third-Party Hardware

  • Third-Party Hardware
  • EmotiBit

    • EmotiBit Guide

    HEGduino Kit

    • HEGduino How-to

    IDUN Dryode

    • IDUN Dryode™

    Myoware

    • MyoWare OpenBCI Integration (Cyton Board)
    • MyoWare OpenBCI Integration (Ganglion Board)

    Pulse Sensor

    • Pulse Sensor Guide

    ThinkPulse

    • ThinkPulse™ Getting Started Guide

    WiFi Shield

    • OpenBCI WiFi
    • Wifi Shield Programming Tutorial
    • OpenBCI WiFi Shield API
    • OpenBCI Wifi SDK

Software

  • Compatible Software
  • Developed By OpenBCI

    • The OpenBCI GUI
    • GUI Widget Guide

    Compatible Third Party Software

    • MATLAB
    • Neuromore
    • OpenViBE
    • Lab Streaming Layer (LSL)
    • BrainBay
    • BioEra
    • VirtualBox Windows Guide

For Developers

  • For Developers
  • Software Development
  • Firmware Development
  • Hardware Development

Deprecated Documents

  • Deprecated Docs
  • Spiderclaw V1 & V2 (deprecated)
  • OpenBCI 8bit Board (no longer in production)
  • Ultracortex Mark 1
  • Ultracortex Mark 2
  • Ultracortex Mark III "Nova" & "Supernova" (REVISED)
  • Python and OpenBCI
  • OpenBCI Hub

Troubleshooting

  • Troubleshooting Landing
  • Minimizing Noise
  • GUI Troubleshooting
  • FTDI Buffer Fix on Linux
  • FTDI Buffer Fix on OS X
  • FTDI Buffer Fix on Windows

Example Projects

  • Example Projects
  • Experiments

    • Puppies and Kittens Experiment

    Community Page Projects

    • Community Page Projects

    EMG Projects and Tutorials

    • EMG Scrolling
    • EMG-controlled Stop/Start Music
    • EMG-controlled Slideshow
    • EMG-controlled LED
    • EMG Chrome Dino Game

    EEG Projects and Tutorials

    • Send Focus Data from GUI to Arduino
    • Motor Imagery

FAQ

    FAQ

    • Frequently Asked Questions
    • General Frequently Asked Questions
    • How OpenBCI products go together?
    • Hardware & Software
    • Purchases & Payment Processing
    • Shipping & Taxes

    Policies

    • OpenBCI Cookie Policy
    • Privacy & Security
    • RETURNS & REFUNDS
    • Liability Policy
Edit

Ganglion SDK

The OpenBCI boards communicate using a byte string (mostly ASCII) command protocol. This Doc covers command use for the OpenBCI Ganglion. Further this Doc covers the commands needed in order to alter the radio system. There have been several iterations of the firmware, please send reset commands to your board to see what firmware you have if you're unsure!

Ganglion Command Protocol Overview

Ganglion boards have a powerful microcontroller on board that comes pre-programmed with the firmware. The Simblee radio link uses the Nordic Gazelle stack and library along with a BLE stack. The microcontroller has been programmed with firmware that interfaces between the MCP (Analog Front End), LIS3DH (Accelerometer), and micro SD (if installed). The user, or application, controls the board by sending commands over wireless serial connection.

On startup, the OpenBCI Ganglion board sends the following text over the radio:

OpenBCI Ganglion v2.0.0

LIS2DH ID: 0x33 MCP3912 CONFIG_1: 0xXX use !,@,#,$ to turn ON channels

send 'b' to start data stream

send 's' to stop data stream

use 1,2,3,4 to turn OFF channels

send '?' to print all registers

send 'v' to initialize board

send '[' ']' to enable/disable synthetic square wave

send 'z' 'Z' to start/stop impedance test

send 'n','N' to enable/disable accelerometer"

Command Set

Turn Channels OFF

1 2 3 4
These ASCII characters turn the respective channels [1-4] off. The channel will read 0.00 when off during streamData mode. These commands work in and out of streamData mode.

Turn Channels ON

! @ # $
These ASCII characters turn the respective channels [1-4] on. The channel will read ADC output values during streamData mode. These commands work in and out of streamData mode.

Synthetic Square Wave ON

[
Turn on and generate a fake square wave signal.

Synthetic Square Wave OFF

]
Turn off and generate a fake square wave signal.

LeadOff Impedance

z
Start an impedance test, will send back impedance packets!

Z
Stop an impedance test.

Accelerometer

n
Start accelerometer which results in 18-bit delta compression of channel data.

N
Stop accelerometer which results in 19-bit delta compression of channel data.

SD card Commands

A S F G H J K L
Send to initiate SD card data logging for specified time

  • A = 5MIN
  • S = 15MIN
  • F = 30MIN
  • G = 1HR
  • H = 2HR
  • J = 4HR
  • K = 12HR
  • L = 24HR
  • a = about 14 seconds for testing

j
Stop logging data and close SD file

Stream Data Commands

b
Start streaming data

s
Stop Streaming data

Miscellaneous

?
Query register settings
Read and report all register settings for the MCP and the LIS3DH. Expect to get a verbose serial output from the OpenBCI Board.

v Soft reset for the Board peripherals.

Firmware v2.x.x New Commands

Supporting all v1.0.0, the v2.0.0 firmware extends the OpenBCI Ganglion system to allow for a variable sample rate.

Sample Rate

~(COMMAND)
This works similar to the Channel Settings commands, however, there is no latching character. Power cycling the OpenBCI Ganglion board will cause the sample rate to reset back to default of 200Hz.

IMPORTANT! The Ganglion cannot and will not stream data over 200SPS. Plug in the wifi shield to get speeds over 200SPS streaming.

COMMAND

  • 0 = 25600 Hz
  • 1 = 12800 Hz
  • 2 = 6400 Hz
  • 3 = 3200 Hz
  • 4 = 1600 Hz
  • 5 = 800 Hz
  • 6 = 400 Hz
  • 7 = 200 Hz
  • ~ = Get current sample rate

EXAMPLE

First, user sends ~~

returns Sample rate is 200Hz

Then, user sends ~5

returns Sample rate set to 800Hz$$$

Wifi Shield Commands

{

Try to attach a Wifi Shield

returns Success will send response Success: Wifi attached$$$ on failure response will be Failure: Wifi not attached$$$. Failure happens when the wifi shield is not powered up or the wifi shield does not power correctly. Try power cycling the system if failure continues.

}

Remove an attached wifi shield.

returns Success will send response Success: Wifi removed$$$ on failure response will be Failure: Wifi not removed$$$. Failure occurs when no wifi shield is present to remove.

:

Get the status of the wifi shield, will either be connected or not connected.

returns With wifi shield successfully attached will send response Wifi present$$$. If there is no OpenBCI board attached, will send Wifi not present, send { to attach the shield$$$.

;

Perform a soft reset of the Wifi shield. Will do a power on reset of just the wifi shield.

Unused ASCII Characters

These are currently unused (and user available) characters in the OpenBCI Ganglion platform:

a A B c C d D e E f F g G h H i I j J k K l L m M o O p P q Q r R S t T u U V w W x X y Y ` 5 6 7 8 9 0 % ^ & * ( ) - _ { } [ ] ; : ' " , . / \ | (space)

Last updated on 2019-7-25
← Ganglion Data FormatGanglion Programming Tutorial →
  • Ganglion Command Protocol Overview
  • Command Set
    • Turn Channels OFF
    • Turn Channels ON
    • Synthetic Square Wave ON
    • Synthetic Square Wave OFF
    • LeadOff Impedance
    • Accelerometer
    • SD card Commands
    • Stream Data Commands
    • Miscellaneous
  • Firmware v2.x.x New Commands
    • Sample Rate
    • Wifi Shield Commands
  • Unused ASCII Characters
OpenBCI Documentation
Site
OpenBCI WebsiteOpenBCI StoreOpportunitiesDownloads
Social
TwitterInstagramFacebookLinkedIn
More
GitHubCommunityForumContact
Copyright © 2021 OpenBCI