Skip to main content

Module protocol

Module protocol 

Source
Expand description

GATT UUIDs, sampling constants, and sensor scaling factors for Hermes V1 EEG headsets.

All UUIDs belong to the Hermes vendor namespace 9fa4XXXX-4967-11e5-a151-0002a5d5c51b.

Constants§

ACC_SENSITIVITY
Accelerometer sensitivity: 0.061 mg/LSB → g.
ADS1299_GAIN
Default ADS1299 amplifier gain.
ADS1299_VREF
Default ADS1299 reference voltage in volts.
COMPASS_CHARACTERISTIC
Compass (magnetometer-only) characteristic (defined by the device but not currently used — magnetometer data arrives via MOTION_CHARACTERISTIC).
EEG_CHANNEL_NAMES
Human-readable EEG channel labels.
EEG_CONFIG_CHARACTERISTIC
EEG configuration characteristic — used for both writes (commands) and notifications (config responses).
EEG_DATA_CHARACTERISTIC
EEG data characteristic — notifications carry packed 24-bit ADS1299 samples.
EEG_FRAME_BYTES
Bytes per single multi-channel EEG sample frame (8 channels × 3 bytes).
EEG_FREQUENCY
EEG sample rate in Hz (250 samples per second per channel).
EEG_NUM_CHANNELS
Number of EEG channels on the ADS1299 (8 differential inputs).
EEG_SERVICE_UUID
Primary EEG GATT service UUID.
EVENT_CHARACTERISTIC
Event (button press) characteristic — notifications on user interaction.
EVENT_SERVICE_UUID
Event (button) GATT service UUID.
GYRO_CHARACTERISTIC
Gyroscope-only characteristic (defined by the device but not currently used — gyro data arrives via MOTION_CHARACTERISTIC).
GYRO_SENSITIVITY
Gyroscope sensitivity: 8.75 mdps/LSB → dps (degrees per second).
MAG_SENSITIVITY
Magnetometer sensitivity: 0.14 mgauss/LSB → gauss.
MOTION_CHARACTERISTIC
9-DOF motion characteristic — accel + gyro + magnetometer in one notification.
PACKET_INDEX_MODULUS
Packet index range (0..=127). The index wraps from 127 → 0.

Functions§

ads1299_to_microvolts
Convert a raw signed 24-bit ADS1299 value to microvolts.
cmd_read_register
Build the 4-byte “read register” command (register address 0x0195).
cmd_start_streaming
Build the 4-byte “start streaming” command.
cmd_test_mode
Build the 4-byte “test mode” command.