Bitbrain SDK 2.10.6
Bitbrain SDK
Loading...
Searching...
No Matches
Versatile Plus: Device-specific settings

Data acquisition modes

Versatile Plus devices provide several acquisition modes that allow users to balance wireless mobility, acquisition latency, sampling rate requirements and data storage options. Depending on the selected configuration, data can be transmitted via Bluetooth or USB connection:

Three concepts are introduced below to explain the differences between USB and Bluetooth:

USB mode

Connection SR (Hz) Samples per block Seq increment
USB 256 2 1
USB 512 4 1
USB 1024 8 1

Bluetooth mode

Connection Streaming - SR (Hz) Streaming - samples per block Streaming - seq inc SD card - SR (Hz) SD card - samples per block SD card - seq inc
Bluetooth 256 8 4 2048 16 1
Bluetooth 256 8 4 1024 8 1
Bluetooth 256 8 4 512 4 1
Bluetooth 256 8 4 256 2 1

Digital I/O (DIO) port

Versatile Plus EEG devices include a configurable Digital Input/Output (DIO) port that enables event marking and synchronization with other devices. The port can operate either as digital input or as digital output, depending on whether Versatile Plus receives synchronization signals from external equipment or acts as the source of them.

Enabling the DIO port

The DIO port is exposed as a signal of type Digital_Input_Output. Because it is directional, bbt_device_enable_signal is not enough: select the direction with bbt_device_set_signal_mode, passing a value of bbt_device_versatile_plus_dio_mode.

unsigned short count = 0;
const struct bbt_device_signal_t* signals = NULL;
bbt_device_get_signals(device, &count, &signals);
for (unsigned short i = 0; i < count; ++i)
{
if (signals[i].type == Digital_Input_Output)
{
break;
}
}
BBT_SDK_API int bbt_device_start(bbt_device_t *device)
Sets the device into acquisition mode.
BBT_SDK_API int bbt_device_get_signals(const bbt_device_t *device, unsigned short *n, const struct bbt_device_signal_t **device_signals)
Get the list of signals available in the device.
BBT_SDK_API int bbt_device_set_signal_mode(bbt_device_t *device, unsigned short n, int mode)
Sets the mode to a specific value.
@ DIGITAL_INPUT
Definition bbt_device.h:536
@ Digital_Input_Output
Definition bbt_device.h:457
The bbt_device_signal_t class.
Definition bbt_device.h:565
enum bbt_device_signal_type_t type
Definition bbt_device.h:567

Use DISABLED (or bbt_device_disable_signal) to turn the port off.

Versatile Plus in Linux

On Linux the device is identified by its MAC address rather than by its name. Retrieve it with bluetoothctl (scan first if the device has not been seen on this machine before):

bluetoothctl scan on # wait for BBT-VP2-xxxxxx to appear, then Ctrl-C
bluetoothctl devices | grep BBT-VP2-AAA001

Pass that address as the device_name argument:

bbt_device_t* device = bbt_device_new_versatile_plus_32("C4:D3:6A:BE:7C:B1", "Bluetooth", 512);
struct bbt_device_s bbt_device_t
bbt_device_t is an opaque type that identifies a connection to a device
Definition bbt_device.h:114
BBT_SDK_API bbt_device_t * bbt_device_new_versatile_plus_32(const char *device_name, const char *connection_type, unsigned short sampling_rate)
Creates an instance of a handler to a versatile plus type device with 32 channels.