To install BrainAccess, run this command in your terminal while in BrainAccess directory:
$ pip install .
$ python setup.py install
If you don’t have pip installed, this Python installation guide or this Anaconda environment installation guide can guide you through the process.
Bluetooth connection setup
To connect the BrainAccess device on windows:
Plug-in bluetooth adapter. Skip this step using an integrated bluetooth adapter.
Select BrainAccess device from the available bluetooth devices and connect.
Note which COM port is used by the device. Note: typically two com ports are shown ‘incoming’ and ‘outgoing’, ‘outgoing is the once that’s needed.
In the code enter the COM port when connecting
Asynchronous EEG acquisition example line 23
EEG measurement example line 25
To connect the BrainAccess device on linux:
Plug-in bluetooth adapter. Skip this step using an integrated bluetooth adapter. Connect to the device via bluetooth. If using Ubuntu/GNOME, this can be done through the GNOME Control Center, or using the bluetoothctl or bluez tools as shown in
Install the bluez-utils package (Ubuntu/Debian: sudo apt install bluez-utils)
Enter the following command:
sudo rfcomm bind <DEVICE> <MAC_ADDRESS>, where
<DEVICE> is the port you will enter into the application to connect to the device (/dev/<DEVICE>). By default, you should use rfcomm0
<MAC_ADDRESS> is the bluetooth address of the device (example: B8:F0:09:AA:28:6A)
sudo rfcomm bind rfcomm0 B8:F0:09:AA:28:6A
Once finished, you can do sudo rfcomm unbind <DEVICE> to remove the port and free it for usage by another EEG device.
Step 3 has to be repeated every time the PC is restarted.
If you have trouble connecting to the device, turn it off, remove the device from the bluetooth menu in GNOME Control Center, kill any program that might be using the port, and try again (no need to unbind / bind the rfcomm port).
While using the library enter the <DEVICE> when connecting
Asynchronous EEG acquisition example line 21
EEG measurement example line 23
Root directory of every program running BrainAccess should contain,
bacore.json file describing acquisition parameters.
chunk_size: size of chunks to be acquired from core (Default: 25)
logging parameters for debugging.
The example file is provided in the root directory of BrainAccess package