-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Devel: BCILab hangs on reading data from LSL stream #20
Comments
Possibly relevant comment: Unfortunately, clearing the Marker Query field has no visible effect on the problem. |
I don't use BCILab on osx at all, but you might want to start by On 7/14/2016 12:26 PM, Hani Awni wrote:
|
Hello, LSL's MATLABViewer app, vis_stream.m, can successfully connect and receive data from the OpenBCI LSL stream (or LSL's SendData.py stream), once settings have been changed according to this comment. This means the issue lies in BCILAB's LSL-streaming plugin in the current version. Thanks! |
Update: I believe the code is hanging in /code/online_plugins/run_readlsl.m, between the two print statements where it does this:
This means the code is hanging in lsl_resolve_bypred.m, which pretty much immediately calls the mex function lsl_resolve_bypred_.c This means the error has something to do with how the LSL plugin is being initialized in BCILAB in comparison to LSL's MATLABViewer App. Next step is finding where that initialization happens. EDIT: Hold up- the BCILAB/dependencies/liblsl-Matlab folder and labstreaminglayer/Apps/MATLABViewer/liblsl-Matlab folder have a bunch of differences. First next step is testing swapping out the BCILAB one for the LSL/MATLABViewer one. |
Ok. I have committed the cardinal sin of editing code that I do not fully understand, but it no longer hangs, and seems to be functioning properly? Though I'll have to do a bit more to test. What I did was move the LSL/Apps/MATLABViewer/liblsl-Matlab from LSL's current github repo to replace BCILAB/dependencies/liblsl-Matlab, operating under the assumption that BCILAB's copy of liblsl-Matlab is simply out of date. With this change, BCILAB was immediately able to connect to the stream, but started spamming this error:
That region of code is where BCILAB's run_readLSL plugin is querying the inlet stream, first for data, then for the time corrections, and there is where the problem lies:
Line 183's function definition has been changed, in more recent versions of liblsl-matlab, to:
And it no longer complains, nor hangs, when attempting to connect to an LSL stream. Thus I have two questions for the sake of testing my duck-tape 'fix', @dmedine:
|
This change seems to work as well for writing to an LSL stream. My concern is that we lose some of the timing information/configuration for the stream. Do you have some way to test the timing resolution of the version with my changes? |
Dear where is devel BCILAB which is error free? |
Thanks. I found BCILAB-devel |
When using the devel branch of BCILab (1.4-devel) with Matlab 2015b on MacOSx 10.11.5, BCILab boots without issue, and menus can be browsed/etc.
When selecting Online Analysis -> Read input from... -> Lab streaming layer..., the window run_readlsl() opens, and the user can specify stuff to connect to/parameters just fine.
However, once the user selects "ok", BCILab simply prints "Looking for a device with type='EEG' ..." and fails to actually do anything. Attempting to use the BCILAB window then results in erroneous behavior, with menus highlighting but failing to open and buttons not actually doing anything.
When the user sends a keyboard interrupt in the Matlab command window, all the user's button presses go through in sequence, implying the attempt to find the LSL stream is hanging.
I'm demoing this on a single machine, running both LSL's SendData.py (which sends random 8-channel data with stream name="BioSemi" and type="EEG") and Matlab/BCILAB. Note that SendData.py is working, because I can concurrently run LSL's ReceiveData.py and print it.
Any idea what the problem is?
The text was updated successfully, but these errors were encountered: