Skip to content

liblsl (C++) and PyLSL doesn't seem to receive EEG LSL packets correctly on Debian Linux (testing) #229

@cslr

Description

@cslr

The following python test program doesn't show EEG signals correctly and similar problems are in liblsl (C++) compiled on Linux. BrainAccessBoard (BrainAccess HALO EEG) is run on Windows and LSL is sent to local wifi network. On the original Windows machine LSL is shown correctly by third party application.

New Debian Linux (testing) laptop receives LSL stream but when PyLSL is run or liblsl is used, it doesn't show EEG signals correctly at all when plotted.

Python code:

#!/usr/bin/python3

import matplotlib.pyplot as plt
import numpy as np

from pylsl import resolve_streams, StreamInlet
import sys


streams = resolve_streams()

for stream in streams:
    print(f"Name: {stream.name()}, Type: {stream.type()}")

if(len(streams) <= 0):
    sys.exit("No LSL stream");

inlet = StreamInlet(streams[0])

data = []
timestamps = []

for _ in range(1000): # 250 Hz output rate means 4 secs of data???
    sample, timestamp = inlet.pull_sample()
    data.append(sample)
    timestamps.append(timestamp)

data = np.array(data)
# plt.plot(timestamps)
plt.plot(timestamps, data)
plt.xlabel("Time (s)")
plt.ylabel("EEG Amplitude")
plt.title("EEG Signal")
plt.show()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions