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

Read input from neuroscan recorder could not work #71

Open
Zhang-Mengfan opened this issue Sep 20, 2021 · 7 comments
Open

Read input from neuroscan recorder could not work #71

Zhang-Mengfan opened this issue Sep 20, 2021 · 7 comments

Comments

@Zhang-Mengfan
Copy link

We select Online Analysis ---> Read input from... --> Neuroscan Recorder in the menu.
We use Curry8 to send the data to Netstreaming (TCP/IP).
So we input the TCP and port address of Curry8, then the MATLAB command window shows ‘Neuroscan Scan connection established’.
However, after that, MATLAB shows "busy", and we could not open any drop-down menu by clicking the button on the bci menu. Also, MATLAB could not run any other commands as well.

MATLAB version: MATLAB R2019a

Curry8:
Amplifier: SynAmps2 / RT
Configuration: Quik-Cap 64 HV500
Sample Rate: 500 Hz

What could we do to make the real-time streaming work?

@chkothe
Copy link
Contributor

chkothe commented Sep 20, 2021

Hi, this is a fairly old API I believe and I'm not sure that it still works properly. However, as an alternative you could try to read from the Lab Streaming Layer (LSL) into BCILAB and use the NeuroScan Acquire LSL Adapter (https://github.com/labstreaminglayer/App-NeuroscanAcquire) to convert between the Acquire software (available from NeuroScan) and LSL. It's a lot of steps but we had recently confirmed that this workflow works (we had tested with NeuroPype for the BCI but I'm assuming that BCILAB should be able to read the data too).

@Zhang-Mengfan
Copy link
Author

We tried to read from the Lab Streaming Layer (LSL) into BCILAB by using the NeuroScan Acquire LSL Adapter you suggested above. The NeuroScan Acquire LSL Adapter did work, and Curry8 said "Accepted connection from client...". However, we could not open any drop-down menu by clicking the button on the bci menu after starting reading input from LSL. When we interrupt the program by pressing "control + C", it turned out the code is stuck at "result = lsl_resolve_bypred(lib,opts.data_query); end" in "run_readlsl".

We also downloaded an online stream viewer from https://github.com/labstreaminglayer/App-MATLABViewer/. We run "vis_stream", but it showed an error "There is no stream visible on the network".

We also followed some instructions from #20 and https://openbci.com/forum/index.php?p=/discussion/761/unable-to-input-openbci-lsl-stream-in-bcilab. Such as clearing the Marker Query field, moving the LSL/Apps/MATLABViewer/liblsl-Matlab from LSL's current github repo to replace BCILAB/dependencies/liblsl-Matlab, and downloading a newer version from https://github.com/Epist/bci_focus/blob/master/Server/bin/liblsl64.dylib, but the program is still stuck at the same place.

Do you have any other suggestions?

On the related note, we see that sending the data in Curry 8 to ExamplePlot.m (part of Neuroscan/Curry 8/Matlab) works, as it automatically starts the MATLAB and plots a real-time data streaming figure. Is there any way that BCILAB can read this data directly?

@cboulay
Copy link

cboulay commented Sep 24, 2021

I don't use BCILAB nor NeuroScan hardware so I can't help there. I just wanted to clear up: that liblsl dylib you pointed to is not "a newer version". The latest version can be obtained here: https://github.com/sccn/liblsl/releases

@chkothe
Copy link
Contributor

chkothe commented Sep 24, 2021

Ok that's definitely puzzling -- this would suggest that the acquire LSL app is for some reason not sending the stream. I could imagine a protocol version incompatibility, but debugging that would probably require single-stepping through the code of App-NeuroScanAquire (this is all on Windows right?). So given that none of us over here have NeuroScan hardware at hand right now, maybe the clearest path forward would be to instead take the Curry8 MATLAB example you mentioned and to make a version 2 of run_readneuroscan.m from it to get the data streamed into BCILAB. This could be fairly simple (eg like https://github.com/sccn/BCILAB/blob/devel/code/online_plugins/BioSemi/run_readbiosemi.m#L63-L66), but sometimes these things turn into rabbit holes.

@chkothe
Copy link
Contributor

chkothe commented Sep 24, 2021

The other thing worth checking is if a firewall blocks LSL transmission on your PC, which would result in none of the LSL examples working - there is a troubleshooting page on this in the LSL documentation.

@Zhang-Mengfan
Copy link
Author

Thank you for your suggestions. We tried to turn off windows firewall for the public and private network, but it still said "There is no stream visible on the network". We inspected the ExamplePlot.m that curry 8 is using to send data to MATLAB. We hope that we can use those data to fit into BCILAB data format. At this point, we do not see a way forward in using TCP/port connection with NeuroScan Acquire LSL Adapter which was supposed to be sending data to MATLAB via LSL because liblsl compiling by build-mex was successful but it didn't change the situation and we still did not see the stream.
Are there any laboratories or researchers using NeuroScan + Curry 8 for bcilab successfully?

@arnodelorme
Copy link
Contributor

arnodelorme commented Oct 1, 2021

You need to reinstall the LSL binaries in the dependency folder of BCILAB using the released code at

https://github.com/labstreaminglayer/liblsl-Matlab

BCILAB LSL binaries are outdated

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

4 participants