sccn / BCILAB

MATLAB Toolbox for Brain-Computer Interface Research
Other
195 stars 120 forks source link

LabStreamingLayer plugin for reading run_readlsl hangs #27

Closed syedahmar closed 7 years ago

syedahmar commented 7 years ago

I am trying to read lsl stream from the online analysis menu using the run_readlsl. I already have a few streams running in the LSL (confirmed by labrecorder, showing a listing of the streams). I am primarily interested in acquiring the stream from openVibe (connecting a TMSi device) and that stream is visible in the labrecorder. The problem is that the online plugin just doesn't work and once I try to run it, it just hangs. I have narrowed it down to "lsl_resolve_bypred" which basically returns an empty result even if I provide a LSLstream in type (e.g. "type=openvibeSignal"). If I instead use the command lsl_resolve_all, I do end up getting all the streams returned in matlab. Any pointers as to why "lsl_resolve_bypred" is not working ? I am using windows 7 64 bit.

cboulay commented 7 years ago

@syedahmar , I don't use BCILAB and I don't use LSL in Matlab, so I might be way off base, but here's what I would try.

First, try changing your predicates. According to the instructions, your example predicate should look like: 'type=''openvibeSignal'''

Second, replace your BCILAB's liblsl-Matlab with the latest one (ftp://sccn.ucsd.edu/pub/software/LSL/SDK/), just in case.

syedahmar commented 7 years ago

@cboulay Thanks for the response. Unfortunately both suggestions do not work. Actually I did use various combinations of quotes including the one from instructions but that did not make any difference. I also used the latest code from the development branch, and I then changed it to the one that you suggested from the FTP server. Unfortunately the problem persists..

cboulay commented 7 years ago

Can you verify that your predicate works outside of BCILAB?

First try a simple liblsl-Matlab script (i.e. LSL from the ftp, not from BCILAB). If that doesn't work, then you should probably post your issue in the LabStreamingLayer repository and get @dmedine to take a look. I think, to maximize the probability of getting a helpful result, you will have to also test that resolve_bypred works for you outside of Matlab e.g. in liblsl-Python or a simple C program. Be sure to indicate your version of Matlab and operating system.

It it does work in liblsl-Matlab then I would try replacing all of the LSL-related binaries (shared objects and mex files) in BCILAB.

syedahmar commented 7 years ago

@cboulay I just tested it outside BCILAB, and it does not work. Actually neither resolving by predicate or property work for me, only trying to get all streams work. It sounds like this is a problem independent of BCI, I will migrate this issue to the labstreamingrespository..

syedahmar commented 7 years ago

@cboulay Today I tried using the equivalent function from python ( e.g. pylsl.resolve_stream('type' , 'AudioCaptureWin') ) and it did not work. And similar to Matlab, if I use the function asking for all streams in python, that does work (e.g. streams = pylsl.resolve_streams(2) ).

cboulay commented 7 years ago

Clearly it's not a BCILAB thing. You should probably close this issue. Let's continue in the LSL issue.