Streaming to a computer (LSL)#

Lab Streaming Layer (LSL) will let recording and analysis software on a computer receive the live signal from a streaming headset over your local network. Tools that consume it include LabRecorder, MNE-LSL, OpenViBE, BCI2000, MATLAB, and Python via pylsl. The outlet is controlled from the Live signal viewer at More → Output → LSL outlet.

Important

LSL streaming is not available in BrainAccess Mobile 1.0.0 for iOS. The LSL outlet switch is shown greyed out with the caption Not available in this version. The app does not stream over your local network and does not ask for Local Network access. LSL streaming is planned for a later version. The rest of this page describes the planned feature.

Turning the outlet on (planned)#

The LSL outlet is off by default — nothing is published to the network until you opt in. To turn it on, open the viewer, tap More → Output, and switch on LSL outlet. The choice is remembered for next time.

Switching the outlet on publishes that headset’s raw stream data to every LSL client on the local network you are joined to, for as long as it streams — any client on that network can pick it up.

iOS Local Network permission#

Once LSL is available, the first LSL use may trigger iOS’s Local Network prompt. Allow it for LSL to work. If you deny it, open iOS Settings → BrainAccess Mobile and enable Local Network before trying again. Bluetooth and recording do not need this permission.

What is advertised#

While the outlet is on, the headset advertises a single stream that follows the BrainAccess Board LSL contract v1 — the same layout BrainAccess Board publishes (see LSL contract in the Board manual), so Board, LabRecorder, pyxdf and MNE read it without any BrainAccess-specific code.

Property

Value

Stream name

<headset name>_<MODEL>_BrainAccess — for example BA MAXI 016_MAXI_BrainAccess

Source ID

The headset’s Bluetooth name, for example BA MAXI 016 — stable across stops, restarts and app launches, so a recorder reconnects to the same stream

Type

EEG

Sample rate

The configured rate (250, 500, 1000 or 2000 Hz, depending on the headset’s board)

Sample format

64-bit float (double64)

Channels, in this order

1. your active EEG channels; 2. one contact_<name> channel per EEG channel; 3. Accel_x, Accel_y, Accel_z on headsets with an accelerometer (MINI, MIDI, MAXI, EXG8, HALO V3); 4. Gyro_x, Gyro_y, Gyro_z on headsets with a gyroscope (EXG8, HALO V3); 5. Sample; 6. Streaming; 7. Battery

Types and units

EEG: type EEG, unit microvolts (kOhm during an impedance check). contact_*: type CONTACT, unit value — 1 when the headset reports that electrode as connected, otherwise 0. Accel_*: type ACCEL, m/s2. Gyro_*: type GYRO, deg/s. Sample: type SAMPLE, the device’s sample counter (exact over its whole 32-bit range, so long recordings keep unique sample numbers). Streaming: type MISC, 1 for samples that arrived over Bluetooth and 0 for zero-filled gaps. Battery: type BATTERY, percent, -1 while unknown

Timestamps

Each sample carries the moment the headset took it, from the headset’s own clock (firmware 3.8.0 or later), to within about a millisecond. For the first seconds of a stream, until that clock is matched to the phone’s, samples are held and then sent with their exact timestamps. Without it (older firmware, contact check) samples are stamped when they reach the phone, a few tens of milliseconds late

Header: identity

Manufacturer (Neurotechnology), model and exact hardware generation, the headset’s serial number, firmware and hardware versions, the app version (versions/mobile), the SDK version and the contract version

Header: montage

Reference and ground electrodes, the cap (name and 10-05 label scheme), the configured gain and bias, and per electrode the standard 10-05 position and the electrode hardware (dry, gold-plated, pad or pins)

Header: other

synchronization/can_drop_samples is false (gaps are zero-filled and flagged by Streaming), no hardware filter is applied, and test_signal says whether the headset streams its built-in test signal (a diagnostic; the channels then carry a square wave, not EEG)

Note

The stream name, source ID and header carry the headset’s name, serial number and firmware version. Anyone on the network who can see the stream can read them.

Requirements#

  • The iPhone and the computer must be on the same Wi‑Fi network / LAN, and that network must allow multicast and direct connections between clients. Many guest and captive networks block this.

  • Keep the app running. Background continuation is subject to iOS policy.

  • Data pushed to LSL is raw headset data — display filters do not apply.

Notes#

  • Each headset advertises its own name and serial number, so several headsets — even of the same model — are told apart by the stream name or source ID, and a stream can be traced to the physical headset from another computer.

  • Recorders reconnect by themselves. LSL recorders such as LabRecorder reconnect to a stream that comes back with the same name, source ID and channels, and keep writing the same file. The name and source ID come from the headset, so they never change; the app also keeps the channels whenever it can: stopping and starting the stream, running a contact check and returning to the stream, reconnecting the headset after a dropout and streaming again, and switching the outlet off and on all bring back the same stream. Closing and reopening the app brings back the same stream too. Changing the channel set in Config makes a different stream — start a new recording on the computer after that.

  • If sending to LSL fails, the app drops that packet and keeps the outlet. If it keeps failing, the app restarts the outlet with the same name, source ID and settings and tells you; the computer’s recording has a gap of about two seconds while it reconnects. Only if the restart also fails is the outlet switched off. A failure never changes your LSL outlet setting.

  • If the network drops out, consumers stall and resume when it returns; the app cannot see this. If a consumer stops receiving, toggle LSL outlet off and on again.

See also#