Skip to content
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

Mex files don't compile #11

Open
iwalkdaline opened this issue Mar 2, 2016 · 8 comments
Open

Mex files don't compile #11

iwalkdaline opened this issue Mar 2, 2016 · 8 comments

Comments

@iwalkdaline
Copy link

I've download the latest version of BCILab and the mex files don't compile.

Are there any known compatibility issues with compiling mex files on a mac >10.10, Matlab 2013a, with Xcode 7.2?

I would like this version because it gives the timestamps because I'm not sure how to reconstruct them in the previous version of bcilab.

@chkothe
Copy link
Contributor

chkothe commented Mar 2, 2016

Can you try the 'devel' branch of the repository? This should have mex
files prebuilt for Mac OS. We've recently updated them. If this works for
you and you'd like to however continue using the master branch of bcilab,
you could also copy those dependencies back into your master checkout
working directory and use them with that (the only mex files are in
dependencies). Note that almost all mex files are only for specific methods
that you most likely won't need unless you want to run one of the affected
handful of methods (except lsl, which is almost certainly needed if you're
doing online processing).

Christian

On Wed, Mar 2, 2016 at 10:22 AM, iwalkdaline notifications@github.com
wrote:

I've download the latest version of BCILab and the mex files don't
compile.

Are there any known compatibility issues with compiling mex files on a mac

10.10, Matlab 2013a, with Xcode 7.2?

I would like this version because it gives the timestamps because I'm not
sure how to reconstruct them in the previous version of bcilab.


Reply to this email directly or view it on GitHub
#11.

@iwalkdaline
Copy link
Author

I checked out the 'devel' branch. I tried to run run_readlsl('laststream', 'type=''EEG''', '') and never past that the following line:
Looking for a device with type='EEG' ...

My goal at the moment is straight forward as I'm trying to stream data into BCILab using LSL.

@chkothe
Copy link
Contributor

chkothe commented Mar 3, 2016

That looks like mex files are working now. What you need is a data source
on LSL. See the file tutorial_lsl.m, lines 5-6, that show how to simulate
an EEG device on the network (by playing back a file). For more info about
LSL and how to use your EEG amplifier with it, see
https://github.com/sccn/labstreaminglayer

Note: if you do already have a data source online but you can't seem to
read from it, make sure you read the network troubleshooting section (e.g.,
firewalls etc. can get in the way).

On Thu, Mar 3, 2016 at 1:03 PM, iwalkdaline notifications@github.com
wrote:

I checked out the 'devel' branch. I tried to run run_readlsl('laststream',
'type=''EEG''', '') and never past that the following line:
Looking for a device with type='EEG' ...

My goal at the moment is straight forward as I'm trying to stream data
into BCILab using LSL.


Reply to this email directly or view it on GitHub
#11 (comment).

@iwalkdaline
Copy link
Author

Sorry, I wasn't clear. I have the python example from lsl (SendData.py) pushing data and I'm trying to received it using ReceiveData.m (under dependencies/liblsl-Matlab). Both files are running on the same computer, I've tested this previously on the same network using two different computers and I get the data stream using BCILAB-1.1 that is available from the ftp site for SCCN.

@chkothe
Copy link
Contributor

chkothe commented Mar 4, 2016

That's interesting. So when you use ReceiveData.m using the BCILAB-devel
version you don't get any data, but if you use ReceiveData.m from the older
release you do? Might want to have both BCILAB distros side-by-side to
confirm that nothing else is different in your setup and one can receive
while the other can't. If that's still the case, as a quick workaround, you
should be able to replace the dependencies/liblsl-Matlab in your
BCILAB-devel by the one in BCILAB-1.1. I suspect that this should work.
Nevertheless I'd like to investigate that... on Windows over here the same
setup works, need to ask someone with a Mac tomorrow to repro it.

On Thu, Mar 3, 2016 at 3:51 PM, iwalkdaline notifications@github.com
wrote:

Sorry, I wasn't clear. I have the python example from lsl (SendData.py)
pushing data and I'm trying to received it using ReceiveData.m (under
dependencies/liblsl-Matlab). Both files are running on the same computer,
I've tested this previously on the same network using two different
computers and I get the data stream using BCILAB-1.1 that is available from
the ftp site for SCCN.


Reply to this email directly or view it on GitHub
#11 (comment).

@iwalkdaline
Copy link
Author

Yes, ReceiveData.m on 1.1 receives data from the inlet and prints it out. The 'devel' version never resolves that an eeg stream exists. I tried the workaround by replacing the dependencies/liblsl-Matlab in my BCILAB-devel by the one in BCILAB-1.1 with the same results. It seems the EEG stream is never resolved:

>> ReceiveData
Loading the library...
Resolving an EEG stream...
Operation terminated by user during lsl_resolve_byprop (line 37)

In ReceiveData (line 9)
    result = lsl_resolve_byprop(lib,'type','EEG'); end

My real goal is to stream eeg into bcilab for detecting SSVEP. I may be able to achieve this goal in 1.1 but I don't seem to receive proper timestamps or I don't know how to reconstruct them. I use 'laststream' when I call 'run_readlsl'; however, laststream.timestamps is a 25 by 2 matrix with 0s and laststream.timestamps_ptr also equals 0. Not sure if there is a more appropriate forum to have a more detailed discussion how to set up my signal acquisition, processing, and visualization pipeline in BCILab. Thanks for the quick replies.

@chkothe
Copy link
Contributor

chkothe commented Mar 4, 2016

When replacing the mex files in your bcilab distribution to retest, make
sure that you restart your matlab, because matlab may otherwise keep
references to the old mex files in memory and use the old code. Basically
when you replace the liblsl-Matlab folder and restart, you should
absolutely get the same behavior as with BCILAB-1.1, unless you have
something else on the MATLAB path that shadows it, since it's really the
same as doing an series of addpath('.../liblsl-Matlab') plus whatever
subdirectories are needed, and then running the ReceiveData.m therein. Can
make sure of that?

On Thu, Mar 3, 2016 at 4:43 PM, iwalkdaline notifications@github.com
wrote:

Yes, ReceiveData.m on 1.1 receives data from the inlet and prints it out.
The 'devel' version never resolves that an eeg stream exists. I tried the
workaround by replacing the dependencies/liblsl-Matlab in my BCILAB-devel
by the one in BCILAB-1.1 with the same results. It seems the EEG stream is
never resolved:

ReceiveData
Loading the library...
Resolving an EEG stream...
Operation terminated by user during lsl_resolve_byprop (line 37)

In ReceiveData (line 9)
result = lsl_resolve_byprop(lib,'type','EEG'); end

My real goal is to stream eeg into bcilab for detecting SSVEP. I may be
able to achieve this goal in 1.1 but I don't seem to receive proper
timestamps or I don't know how to reconstruct them. I use 'laststream' when
I call 'run_readlsl'; however, laststream.timestamps is a 25 by 2 matrix
with 0s and laststream.timestamps_ptr also equals 0. Not sure if there is a
more appropriate forum to have a more detailed discussion how to set up my
signal acquisition, processing, and visualization pipeline in BCILab.
Thanks for quick replies.


Reply to this email directly or view it on GitHub
#11 (comment).

@iwalkdaline
Copy link
Author

I was able to get ReceiveData.m from 1.1 streaming eeg after moving the liblsl-Matlab folder from 1.1 to 'devel'. I'm still uncertain of how to get the timestamps. They seem readily available in the data structure used in version 1.4 (devel) but not in 1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants