BCILAB icon indicating copy to clipboard operation
BCILAB copied to clipboard

Mex files don't compile

Open iwalkdaline opened this issue 9 years ago • 8 comments

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.

iwalkdaline avatar Mar 02 '16 18:03 iwalkdaline

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 [email protected] 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 https://github.com/sccn/BCILAB/issues/11.

chkothe avatar Mar 02 '16 22:03 chkothe

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.

iwalkdaline avatar Mar 03 '16 21:03 iwalkdaline

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 [email protected] 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 https://github.com/sccn/BCILAB/issues/11#issuecomment-191961670.

chkothe avatar Mar 03 '16 21:03 chkothe

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.

iwalkdaline avatar Mar 03 '16 23:03 iwalkdaline

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 [email protected] 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 https://github.com/sccn/BCILAB/issues/11#issuecomment-192025381.

chkothe avatar Mar 04 '16 00:03 chkothe

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.

iwalkdaline avatar Mar 04 '16 00:03 iwalkdaline

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 [email protected] 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 https://github.com/sccn/BCILAB/issues/11#issuecomment-192037992.

chkothe avatar Mar 04 '16 05:03 chkothe

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.

iwalkdaline avatar Mar 07 '16 13:03 iwalkdaline