Error Using P3Speller LSL Source

This forum deals with BCI2000 configuration issues.
Post Reply
nigamavykari
Posts: 3
Joined: 19 Sep 2023, 04:31

Error Using P3Speller LSL Source

Post by nigamavykari » 19 Sep 2023, 04:52

We are currently utilizing the Emotive EPOC+ 14-channel EEG system to establish a connection using the LSLSource within the BCI2000 framework, but haven't been successful so far. It's worth noting that the BCI2000 installation has no problems. All files and prerequisites are properly installed. Are there any specific configuration settings that must be taken into consideration when executing the P3Speller LSL source file within the Batch folder? Any idea why this is causing an LSL byprop error?
Attachments
bci2000Error2.PNG
bci2000Error2.PNG (19.69 KiB) Viewed 22315 times

mellinger
Posts: 1207
Joined: 12 Feb 2003, 11:06

Re: Error Using P3Speller LSL Source

Post by mellinger » 19 Sep 2023, 07:38

Welcome to the BCI2000 forum.

When you click "Set Config", the LSL source module calls lsl_resolve_byprop() to connect to a stream of type "EEG".
If this fails, you might not have started your amplifier correctly, or it does not register its stream with a type of "EEG".

If you need more flexibility, e.g. connect to streams with types that are not "EEG", I can modify the LSL source module for you.

Regards,
Jürgen

nigamavykari
Posts: 3
Joined: 19 Sep 2023, 04:31

Re: Error Using P3Speller LSL Source

Post by nigamavykari » 20 Sep 2023, 03:59

mellinger wrote: 19 Sep 2023, 07:38 Welcome to the BCI2000 forum.

When you click "Set Config", the LSL source module calls lsl_resolve_byprop() to connect to a stream of type "EEG".
If this fails, you might not have started your amplifier correctly, or it does not register its stream with a type of "EEG".

If you need more flexibility, e.g. connect to streams with types that are not "EEG", I can modify the LSL source module for you.

Regards,
Jürgen
Thank you for your response.

The amplifier for the 14-channel EPOC device is built-in with the headset and is operated through an on/off switch. As far as I can see, there is no problem with the connection to the amplifier. I can see the EEG signals through Emotive Pro software. The EEG quality and contact quality are also quite good.

The problem arises when I load the parameters into the "P3Speller_LSLSource" batch file and click set config. It throws a byprop error as mentioned in my previous post.

I do not understand what you mean by "stream type that is not EEG." Since we are trying to implement a speller task, we would require EEG. Is there something I'm missing?

mellinger
Posts: 1207
Joined: 12 Feb 2003, 11:06

Re: Error Using P3Speller LSL Source

Post by mellinger » 21 Sep 2023, 11:05

In the LSL protocol, data streams are registered with a "type". The EPoC documentation about LSL should tell you which type the EPoC uses when registering its data stream. The difference could be as trivial as "eeg" instead of "EEG".

In BCI2000, a type of "EEG" is hardcoded, so you would need to change its source code once you obtained information about EPoC's data type.
Alternatively, we could make the LSL data type a parameter, so you could modify it without changing BCI2000's source code.

HTH
Jürgen

nigamavykari
Posts: 3
Joined: 19 Sep 2023, 04:31

Re: Error Using P3Speller LSL Source

Post by nigamavykari » 22 Sep 2023, 07:39

mellinger wrote: 21 Sep 2023, 11:05 In the LSL protocol, data streams are registered with a "type". The EPoC documentation about LSL should tell you which type the EPoC uses when registering its data stream. The difference could be as trivial as "eeg" instead of "EEG".

In BCI2000, a type of "EEG" is hardcoded, so you would need to change its source code once you obtained information about EPoC's data type.
Alternatively, we could make the LSL data type a parameter, so you could modify it without changing BCI2000's source code.

HTH
Jürgen
I have checked the EPOC documentation about LSL and the stream type is mentioned as "EEG". So it is the same stream type that is hardcoded in BCI2000 (I have double-checked the BCI2000 source code as well). Could there be any other reason for this error? If making the LSL data type as a parameter would work, how can I modify it?

mellinger
Posts: 1207
Joined: 12 Feb 2003, 11:06

Re: Error Using P3Speller LSL Source

Post by mellinger » 22 Sep 2023, 10:50

Could it be that the stream has a _name_ of "EEG" but a different _type_?
I am not very familiar with LSL, but you might try to establish communication with one of those viewers before:
https://labstreaminglayer.readthedocs.i ... ewers.html

The advantage of parameterizing stream information would be that you could try different options without recompiling.
I can do that for you if you like.

turibalab
Posts: 1
Joined: 12 Oct 2023, 14:20

Re: Error Using P3Speller LSL Source

Post by turibalab » 12 Oct 2023, 14:31

mellinger wrote: 22 Sep 2023, 10:50 Could it be that the stream has a _name_ of "EEG" but a different _type_?
I am not very familiar with LSL, but you might try to establish communication with one of those viewers before:
https://labstreaminglayer.readthedocs.i ... ewers.html

The advantage of parameterizing stream information would be that you could try different options without recompiling.
I can do that for you if you like.
Hello, recently I've been trying to launch P3Speller through LSL connection. I have OpenBCI Cyton board with daisy extension. I start lsl stream with the name "obci_eeg1" and type "EEG" through OpenBCI GUI application and still get "lsl_resolve_byprop: error 1". Also when I try to launch P3Speller through Open BCI bat file it gets stuck after setting all the channels on "query the board". What would you recommend me to do?

mellinger
Posts: 1207
Joined: 12 Feb 2003, 11:06

Re: Error Using P3Speller LSL Source

Post by mellinger » 13 Oct 2023, 11:34

From this conversation: https://openbci.com/forum/index.php?p=/ ... -in-bcilab it seems that OpenBCI is not using "type" "EEG" but "name" "OpenBCI":
you should change the line:
result = lsl_resolve_byprop(lib,'type','EEG'); end
to
result = lsl_resolve_byprop(lib,'name','OpenBCI_EEG'); end
or
result = lsl_resolve_byprop(lib,'source_id','openbci_eeg_id1'); end
You may change this in the BCI2000 source code of the LSL source module, or I can make it configurable for you so you can enter it as a parameter.

turibalab2
Posts: 1
Joined: 13 Oct 2023, 16:01

Re: Error Using P3Speller LSL Source

Post by turibalab2 » 13 Oct 2023, 16:52

mellinger wrote: 13 Oct 2023, 11:34 From this conversation: https://openbci.com/forum/index.php?p=/ ... -in-bcilab it seems that OpenBCI is not using "type" "EEG" but "name" "OpenBCI":
you should change the line:
result = lsl_resolve_byprop(lib,'type','EEG'); end
to
result = lsl_resolve_byprop(lib,'name','OpenBCI_EEG'); end
or
result = lsl_resolve_byprop(lib,'source_id','openbci_eeg_id1'); end
You may change this in the BCI2000 source code of the LSL source module, or I can make it configurable for you so you can enter it as a parameter.
The link that you provided seems to explain an issue with BCILAB and in file ReceiveData.m. Does that mean that BCI2000 LSL module works through the matlab? Or where can I find file containing those lines(or file) in BCI2000 source code/installation files?

mellinger
Posts: 1207
Joined: 12 Feb 2003, 11:06

Re: Error Using P3Speller LSL Source

Post by mellinger » 13 Oct 2023, 18:29

The link is about Matlab but LSL source works there in the same way as in C/C++.
You don't need to worry about this any more, I made the property type and value configurable under the "Source" tab.
Also, I fixed a bug that might have prevented you from connecting to your amplifier.

Please download the latest version from SVN and try again.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests