Amplifier Setup: openBCI Cyton and Ganglion¶
COM port¶
When using either the OpenBCI Ganglion or Cyton with an USB-dongle we have to pass the serial_port argument, to find the serial port in use by your amplifier follow the following instructions:
On Windows¶
Open Device Manager and unfold Ports(COM&LPT), the com port number is shown behind your used bluetooth adapter.
Then, in the online_bci configuration file (mindaffectBCI/online_bci.json) you should have: "serial_port":"COM_X_"
.
Also make sure to set "board_id":0
to the value that corresponds with your amplifier as specified in the BrainFlow Docs.
On Mac¶
Open a Terminal session
Type:
ls /dev/cu.*
, and look for something like/dev/cu.usbmodem1
(or similar):$ ls /dev/cu.* /dev/cu.Bluetooth-Modem /dev/cu.iPhone-WirelessiAP /dev/cu.Bluetooth-PDA-Sync /dev/cu.usbserial /dev/cu.usbmodem1
Then, in the online_bci configuration file (mindaffectBCI/config/online_bci.json) you should define as "serial_port":"dev/cu.your_com_name"
.
Also make sure to set "board_id":0
to the value that corresponds with your amplifier as specified in the BrainFlow Docs.
On Linux¶
Open a Terminal session
Plug in your USB dongle
Type
dmesg
, and look for something likettyACM0
orttyUSB0
(or similar):[43.364199] usb 2-1: New USB device found, idVendor=2458, idProduct=0001, bcdDevice= 0.01 [43.364206] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [43.364209] usb 2-1: Product: Low Energy Dongle [43.364213] usb 2-1: Manufacturer: Bluegiga [43.364215] usb 2-1: SerialNumber: 1 [43.394168] cdc_acm 2-1:1.0: ttyACM0: USB ACM device
Then, in the online_bci configuration file (mindaffectBCI/online_bci.json) you should define as "serial_port":"dev/ttyXXXX"
.
Also make sure to set "board_id":0
to the value that corresponds with your amplifier as specified in the BrainFlow Docs.
Linux Serial Port Permissions¶
As explained in the OpenBCI Docs, on Linux you need to have permission to access the serial ports of your machine.
Otherwise, you will get the error Failed to connect using /dev/ttyUSB0
or similar.
To fix this follow their instructions:
First, verify if the user does belong to the dialout group using the
id
command.- Type
id -Gn <username>
in terminal and check if it prints dialout as one of the options. - Replace with your Linux username. Example:
id -Gn susieQ
- Type
Next, add the user to the dialout supplementary group.
- Type
sudo usermod -a -G dialout <username>
in terminal. - Example:
sudo usermod -a -G dialout susieQ
- Type
Restart Ubuntu
Try
id
command again- Repeat step one
OpenBCI Cyton Latency Fix¶
If you are using the OpenBCI Cyton with the included USB dongle, the default COM config has to be changed to fix latency issues. The default config for the dongle driver sends very big data-packets relatively slowly. The fix is pretty simple, just drop the packet size. To do so:
- Open device-manager
- Find the dongle driver under the ports dropdown
- Go to properties for this com port
- Go to port-settings
- Select Advanced
- Reduce the receive buffer to 1024 Bytes
- Reduce the latency timer to 6ms
- Apply and reboot