The Blackrock acquisition module enables signal acquisition from Blackrock Microsystems Cerebus and Neuroport acquisition hardware through the CereLink "cbsdk".
Griffin Milsap (firstname.lastname@example.org)
- V1.0 -- Analog Signal Acquisition and Digital Filtering Functionality
Source Code Revisions
- Initial development: 4365
- Tested under: 4365
- Known to compile under: 4365
- Broken since: N/A
The Blackrock source module is used for acquiring recordings from the Blackrock NSP through CereLink (https://github.com/dashesy/CereLink). It also happens to be one of the first BCI2000 SignalSource modules to function under Linux. This documentation explains the parameterization and specifics on how to set up the system.
Building the Blackrock module should copy .bat files for standard experiments into the batch directory, in addition to a parameter fragment for the amplifier, placed in parms/fragments/amplifiers.
Ensure your machine is connected to a switch or router that the NSP is also connected to. This module communicates to the NSP using UDP, and is susceptable to packet loss. In the event of a lost packet, the module will crash (this is rare with a good switch). Ensure you have a commercial grade switch to avoid dropping packets. You can also use a crossover cable to connect directly to the NSP, but this prevents other computers from receiving data from the NSP.
You will also need to change your interface's network configuration (Windows): IP address: 192.168.137.XXX where XXX is less than 128. Ensure no other computers have this same address on this switch. Subnet Mask: 255.255.255.0 Default Gateway: <Blank> To test your network configuration, open a terminal or command prompt and type ping 192.168.137.128. This is the NSP's default network address. If you can ping the NSP, you should be able to run the module.
This should work out of the box with standard parameters.
If you encounter a segfault or error message on SetConfig, one of the most common issues is with permissions. NSP 6.03 and previous opens port 1002 and 1001 to communicate packets. This was a rather unfortunate choice, as administrative privileges are required in order to open ports below 1024 on standard *nix systems. NSP Firmware 6.04+ uses higher port numbers to avoid this problem. If you're running 6.03 firmware or below, you will need to start the Blackrock module with administrative privileges. One way to accomplish this is to comment out the "Start Blackrock" line in your batch file, and launch the Blackrock module from a separate terminal with "sudo ./Blackrock", executed from the bci2000/prog directory.
You may also receive an error complaining about the size of your network buffer size:
Socket memory assignment error Consider using sysctl -w net.core.rmem_max=8388608 or sysctl -w kern.ipc.maxsockbuf=8388608
Depending on your operating system (OSX or your favorite flavor of Linux) you should execute one of these commands with administrative privileges. You will need to do this once every time the computer reboots. There may be a way to do this on boot using some config file somewhere. If you have any ideas, edit this section. net.core.rmem_max is the proper key to use for Fedora 17.
The following parameters are available for configuring the Blackrock source module. You will find these parameters in the Source -- Signal Properties section.
"Source:Signal%20Properties int SourceCh= 144 // number of digitized and stored channels
"Source:Signal%20Properties intlist AnalogCh= 0 // Analog channels to acquire from Blackrock
"Source:Signal%20Properties int SignalFilter= 0 // Filter to apply to data:
- 0 -- No Filter
- 1 -- HP 750Hz
- 2 -- HP 250Hz
- 3 -- HP 100Hz
- 4 -- LP 50Hz
- 5 -- LP 125Hz
- 6 -- LP 250Hz
- 7 -- LP 500Hz
- 8 -- LP 150Hz
- 9 -- BP 10Hz-250Hz
- 10 -- LP 2.5kHz
- 11 -- LP 2kHz
- 12 -- BP 250Hz-5kHz
1000 // number of samples transmitted at a time",