Troubleshooting
Start with the symptom that best matches what you see. Change one thing at a time, then repeat the same test so you know which change fixed the problem.
Quick Diagnostic Sequence
Section titled “Quick Diagnostic Sequence”-
Disconnect external projects. Test with only the Knight Board, supplied USB cable, headset electrodes, and ear clip connected.
-
Confirm the serial device. Connect the board and identify the new port in the EXG Visualizer or your operating system.
-
Use one program at a time. Close other visualizers, BrainFlow scripts, serial monitors, and LSL applications that might hold the port.
-
Test one known channel. Use the common reference montage, move that channel’s switch away from the header, enable it at gain
12, and add it to RLD with the required command delays. -
Verify contact. Secure the headset, part hair beneath the dry spike, and attach the ear clip to prepared skin.
-
Run the jaw-clench test. A clear transient confirms that the electrode, channel path, reference, and stream can detect a large biopotential signal.
If the single channel works, add the remaining channels one at a time. This separates a connection problem from a specific electrode, cable, or channel.
Board Is Not Detected
Section titled “Board Is Not Detected”Symptoms: no new serial port appears, the EXG Visualizer port list does not change, or BrainFlow reports that the port cannot be opened.
- Disconnect and reconnect the USB-C cable, then refresh the port list.
- Try another USB port directly on the computer rather than an unpowered hub.
- Try a known data-capable USB cable. Some USB-C cables supply power only.
- Confirm the controller board is fully seated and locked into the Knight Board.
- Close every other program that may be using the serial port.
- On Windows, compare Device Manager before and after connecting the board.
- On Linux, confirm your user has permission to access the
/dev/ttyACM*or/dev/ttyUSB*device. Log out and back in after changing group membership. - On macOS, use the
/dev/cu.*device corresponding to the board.
If the board appears on another computer, the issue is likely the original computer’s cable, USB port, permissions, or software configuration.
The Port Exists but Connection Fails
Section titled “The Port Exists but Connection Fails”Symptoms: prepare_session() raises a serial or board-session exception,
or the visualizer disconnects immediately.
- Confirm that the configured serial port exactly matches the current device. Port numbers can change after reconnecting.
- Select
BoardIds.NEUROPAWN_KNIGHT_BOARDfor the standard board orBoardIds.NEUROPAWN_KNIGHT_BOARD_IMUfor the IMU variant. - Do not run the EXG Visualizer and a BrainFlow script simultaneously.
- Remove custom
BrainFlowInputParamsvalues until onlyserial_portremains. - Power-cycle the board, wait for the serial port to reappear, and retry.
- Enable BrainFlow logging to capture the underlying error:
from brainflow.board_shim import BoardShim
BoardShim.enable_dev_board_logger()When requesting support, include the final relevant logger lines rather than the entire log.
Connected, but EEG Is Empty or Flat
Section titled “Connected, but EEG Is Empty or Flat”The board can transmit packets while all EEG channels remain disabled. A valid connection alone does not activate the signal inputs.
Verify all four requirements:
- The desired physical channel switch is away from the header for a common reference montage.
- The electrode is connected to that channel’s positive (
P) input. - The reference electrode is connected to
COMM. - A
chon_{channel}_{gain}command is sent afterstart_stream().
Use a delayed startup sequence:
import time
board.start_stream()time.sleep(2)
for channel in range(1, 9): board.config_board(f"chon_{channel}_12") time.sleep(1) board.config_board(f"rldadd_{channel}") time.sleep(1)Only One or Two Channels Are Missing
Section titled “Only One or Two Channels Are Missing”Swap components methodically:
- Move a working electrode cable to the failing channel input.
- Move the failing electrode cable to a working channel input.
- Repeat the same
chon_andrldadd_sequence with delays. - Check that the electrode tip reaches the scalp rather than resting on hair.
- Inspect the connector and board header for a loose or offset connection.
If the problem follows the electrode or cable, inspect that component. If it stays with the board channel, recheck the physical switch, header position, and software command for that channel.
Signal Is Noisy or Drifts
Section titled “Signal Is Noisy or Drifts”Start with the signal path before adding filters:
- Part the hair and reseat each dry spike electrode against the scalp.
- Prepare the earlobe and reattach the
COMMreference securely. - Connect
RLDand add only the active channels to the RLD network. - Switch off and disconnect unused channels.
- Support the USB and electrode cables so they do not pull or move.
- Relax the jaw, face, neck, and shoulders during EEG recording.
- Move away from power supplies, AC cables, fluorescent lights, motors, and displays that noticeably affect the trace.
- If using paste or gel, prevent neighboring electrodes from being bridged by excess conductive material.
Large spikes synchronized with blinking, jaw clenching, cable movement, or head movement are usually physiological or motion artifacts, not random electronic noise. Filtering can reduce some frequencies but cannot reconstruct clean EEG hidden by clipping or poor contact.
Strong 50 or 60 Hz Interference
Section titled “Strong 50 or 60 Hz Interference”Power-line contamination usually appears as a regular oscillation across several channels.
- Improve the
COMMreference and scalp contacts first. - Enable RLD for the active channels.
- Run the computer from battery temporarily to test whether its charger is the source.
- Move the setup away from mains cables and powered equipment.
- Apply a 50 or 60 Hz notch filter only after the physical setup is stable.
Choose the notch frequency used by the local electrical grid. Do not apply both without a specific reason, and remember that a notch filter also removes neural or muscle content near that frequency.
Trace Is Clipped, Flat at a Limit, or Unusually Large
Section titled “Trace Is Clipped, Flat at a Limit, or Unusually Large”The amplifier or ADC may be saturated. This is common when paste or gel lowers
contact impedance while the channel remains at gain 12, or when recording EMG
or ECG with an EEG-oriented gain.
- Reduce gain to
6or4and reconnect the session. - Use the same value in
BrainFlowInputParams.other_infoand thechon_command. - Check for excess paste bridging two contacts.
- Confirm that electrode leads are connected to the intended positive,
negative,
COMM, andRLDpins.
params.other_info = '{"gain": 4}'board.config_board("chon_1_4")Increase gain only after the unclipped signal has been verified.
Microvolt Values Look Incorrect
Section titled “Microvolt Values Look Incorrect”BrainFlow scales raw counts using the gain supplied in other_info. The firmware
gain applied by chon_ must match it. For example, scaling for gain 12 while
the hardware channel uses gain 4 produces incorrect microvolt values.
Also verify that custom parsers:
- decode each channel as a signed 16-bit, big-endian integer;
- use the correct gain in the scale factor;
- synchronize on packet start byte
0xA0and end byte0xC0; - treat BrainFlow output as already converted to physical units.
See Knight Board Data Format before comparing a custom parser with BrainFlow.
Samples Repeat, Disappear, or Arrive in Uneven Blocks
Section titled “Samples Repeat, Disappear, or Arrive in Uneven Blocks”BrainFlow stores stream data in a ring buffer:
get_current_board_data(N)copies up to the latestNsamples without removing them. Overlapping calls naturally contain repeated samples.get_board_data()returns available samples and clears them. Calling it in multiple parts of a program can make another consumer see an empty buffer.
For a live sliding window, use get_current_board_data(). For incremental
processing, use one owner for get_board_data() and pass each retrieved block
to the rest of the application. Do not let several functions independently
flush the same board buffer.
An initial request may contain fewer samples than requested because the stream has not been running long enough. Wait for at least one complete analysis window before classifying.
Sample Rate or Timing Looks Wrong
Section titled “Sample Rate or Timing Looks Wrong”The board supports 125, 250, and 500 SPS, and examples commonly assume the default 125 SPS. Retrieve the configured rate instead of hard-coding it:
sampling_rate = BoardShim.get_sampling_rate(board_id)For timing-sensitive experiments, inspect the BrainFlow timestamp row. Use the same sample rate, filter design, epoch length, and window length during data collection, model training, and live inference.
IMU Channels Are Missing
Section titled “IMU Channels Are Missing”Use BoardIds.NEUROPAWN_KNIGHT_BOARD_IMU. The standard Knight Board ID exposes
the eight ExG channels but not the accelerometer, gyroscope, or magnetometer
rows. Query the relevant BrainFlow channel getters rather than assuming row
numbers in application code.
See Knight Board IMU for the current channel mapping.
EXG Visualizer Is Blocked by the Operating System
Section titled “EXG Visualizer Is Blocked by the Operating System”- Windows: choose More info, verify the downloaded application, then select Run anyway in the SmartScreen prompt.
- macOS: open System Settings → Privacy & Security, find the blocked app, and select Open Anyway after verifying the download.
- Linux: make the downloaded application executable if required by its package format, then launch it from a terminal to see missing-library errors.
Download a fresh copy from the official page if the file is incomplete or the operating system reports that it is damaged.
Python Cannot Import BrainFlow or a Project Module
Section titled “Python Cannot Import BrainFlow or a Project Module”Activate the same virtual environment used to install the dependencies, then run the command from the repository root:
.\.venv\Scripts\Activate.ps1python -m pip show brainflowpython your_script.pyUse python -m pip when checking or installing packages so pip and python
refer to the same interpreter. For tutorial repositories, the root directory is
usually the folder containing the main scripts and local packages.
An LSL Stream Does Not Appear
Section titled “An LSL Stream Does Not Appear”- Confirm that the NeuroPawn LSL application is connected to the correct board and actively streaming.
- Close duplicate outlet applications so stream names are unambiguous.
- Allow the application through the operating-system firewall on private networks.
- Run the outlet and inlet on the same computer to separate signal problems from network discovery problems.
- Check the stream name, type, channel count, and sample rate expected by the receiving application.
If local discovery works but another computer cannot see the stream, check that both devices are on the same network and that client isolation or firewall rules are not blocking LSL discovery traffic.
A Tutorial Model Trains but Fails Live
Section titled “A Tutorial Model Trains but Fails Live”A successful training command does not prove that the model generalizes. Verify:
- electrode locations and channel order match the calibration session;
- preprocessing, filter bands, sample rate, and window length are identical;
- the user performs the same task used to create the labels;
- the loaded model artifacts came from the current dataset;
- cross-validation or held-out results are reasonable, not only an in-sample training report;
- live windows contain enough new samples before inference begins.
Recalibrate after changing electrode placement, channel order, cue behavior, or preprocessing. Thresholds and smoothing can stabilize a valid model but cannot repair incompatible inputs.
Before Requesting Support
Section titled “Before Requesting Support”Collect the following information:
- Knight Board variant: standard or IMU
- operating system and version
- application or repository being used
- BrainFlow and Python versions, if applicable
- serial port and selected board ID
- channel wiring, physical switch positions, and electrode montage
- gain in both
other_infoandchon_commands - whether the basic jaw-clench test works
- exact error text and the smallest script that reproduces it
