Skip to content

OpenBCI Protocol Reference

biomurph edited this page Nov 11, 2014 · 14 revisions

##THIS PAGE HAS BEEN DEPRECIATED. SEE: https://github.com/OpenBCI/OpenBCI_8bit/wiki/OpenBCI-8bit-Commands**

OpenBCI communication has a few layers that need to be un-peeled. The outer layer is what would appear to be a native UART between the PC and the OpenBCI Board. The next layer down are the radios, and how they relay information. Then there is discreet communication between radios.

ASCII Command Protocol

The PC directs control to the on-board uC and peripherals by simply sending ASCII characters. When the OpenBCI board (8bit or 32bit) starts up, it initializes all of the peripherals (ADS1299 and LIS3DH and SD card, if present) in a default setting, and reports the control register values via the serial port. Once this happens, the OpenBCI board is ready to receive commands instructions from the PC. The RFduinos manage serial transactions with a 2mS timeout. Successive Commands should be sent with this timing in mind. Here is the command set in no particular order.

'?' Print All Registers

Send '?' to receive a list of register settings for the ADS1299 and LIS3DH Accelerometer

'b' Begin streaming data

Tells the target uC to turn on the ADS and start sending data. Data packet protocol can be found here

's' Stop streaming data

Tells the target uC to turn off the ADS. Some (2~3) residual packets may get through after 's' is sent.

'f' Add notch filter

Tells the target uC to run a notch filter on the data before sending. Notch is default 60Hz. Adjustable in code to other frequencies. Or topologies for that matter.

'g' Remove notch filter

Tells the target uC to sop running the notch filter.

'1,2,3,4,5,6,7,8' Turn channels off

Turn off the respective channel by disabling it on the ADS1299.

'q,w,e,r,t,y,u,i' Trun channels on

Turn on the respective channel (1-8) by enabling it on the ADS1299

'0,-,=,p,[,]' Connect channels to test signals

Connect all 8 ADS channels to internal test signals.

  • 0 inputs shorted to internal ADS1299 ground reference
    • Testing frequency slow, +/-1mV square wave
  • = Testing frequency fast, +/-1mV square wave
  • p inputs connected to DC signal
  • [ Testing frequency slow, +/- 2mV square wave
  • [ Testing frequency fast, +/- 2mV square wave

'!,@,#,$,%,^,&,*' Turn impedance testing on P channel

Activate the impedance measurement signal for P input on respective channel (1-8)

'Q,W,E,R,T,Y,U,I' Trun off impedance testing on P channel

Deactivate the impedance measurement signal for P input on respective channel (1-8)

'A,S,D,F,G,H,J,K' Turn impedance testing on N channel

Activate the impedance measurement signal for P input on respective channel (1-8)

'Z,X,C,V,B,N,M,<' Trun off impedance testing on N channel

Deactivate the impedance measurement signal for N input on respective channel (1-8)