Getting FieldTrip Buffer Working

This forum deals with BCI2000 configuration issues.
Locked
AeroShark
Posts: 5
Joined: 18 Aug 2012, 17:31

Getting FieldTrip Buffer Working

Post by AeroShark » 26 Aug 2012, 02:27

Hi, I'm just getting started with bci2000, and I'm trying to start out simply by sending a generated signal to a FieldTrip buffer and graphing it. I start BCI2000Launcher and select SignalGenerator, FieldTripBuffer, and DummyApplication. In matlab I run the example code given here: http://www.bci2000.org/wiki/index.php/P ... rip_buffer. Unfortunately, the matlab just behaves the same as if no signal was being sent to the buffer. Using the FieldTrip Realtime Buffer Viewer GUI application, it connects but shows no data. Because of this I believe that bci2000 is running a FieldTrip buffer server but I don't think it's writing any data to the buffer. Anyone know what the problem is? Thanks for any help you can provide!

r.oostenveld
Posts: 10
Joined: 20 Aug 2007, 08:59

Re: Getting FieldTrip Buffer Working

Post by r.oostenveld » 28 Aug 2012, 08:27

Hi,

Here are some suggestions:

Have you started the BCI2000 processing (i.e. press the play button)?

I suggest that you check that the buffer is properly created by BCI2000 and that it can be connected to from MATLAB. In MATLAB you can do
hdr = read_header('buffer://localhost:1972')
repeatedly and you should see hdr.nSamples increasing over subsequent calls. If this does not work, it means that either you cannot connect to the buffer, or that BCI2000 is not streaming the data into it.

I also suggest that you try it with sine2ft.exe, which is in fieldtrip/realtime/bin/win32. That is a small GUI to write simulated data to a buffer. With that running, the ft_read_header (or the bufferViewer) should just work.

best regards
Robert

AeroShark
Posts: 5
Joined: 18 Aug 2012, 17:31

Re: Getting FieldTrip Buffer Working

Post by AeroShark » 29 Aug 2012, 00:39

Thanks for your help! So hdr.nSamples stays constant even when BCI2000 is running. Also nothing shows up in bufferViewer.exe. If I run sine2ft instead though, hdr.nSamples steadily increases and the signal shows up in bufferViewer.exe. So i think it's safe to say that BCI2000 is not sending the data. All I've done is start BCI2000Launcher, select SignalGenerator for the signal source, FieldTripBuffer for the signal processing, and DummyApplication for the Application. Then click launch, i don't do any configuration for now so i just click Set Config, and finally click start.

Is there something else I'm supposed to be doing to get it to work? When I do all this bci2000 shows some simple signal windows, so it seems to be working; any idea what's up? Any additional debugging I could do?

AeroShark
Posts: 5
Joined: 18 Aug 2012, 17:31

Re: Getting FieldTrip Buffer Working

Post by AeroShark » 31 Aug 2012, 13:52

bump...

r.oostenveld
Posts: 10
Joined: 20 Aug 2007, 08:59

Re: Getting FieldTrip Buffer Working

Post by r.oostenveld » 01 Sep 2012, 04:22

Which BCI2000 version are you precisely using? Using the same version I might be able to replicate it and pin it down.

Hmm, I now realize that old binary compiled versions are not that easily available from http://www.bci2000.org/BCI2000/Download.html.

Can you send me the binaries that you are using, for example using one of the file sharing services listed at the bottom of http://fieldtrip.fcdonders.nl/contact

AeroShark
Posts: 5
Joined: 18 Aug 2012, 17:31

Re: Getting FieldTrip Buffer Working

Post by AeroShark » 02 Sep 2012, 03:36

I'm not sure how to tell what version I have; I've been digging through the files and can't find any version number. Is there a way to tell? I just I downloaded again from here: http://bci2000.org/downloads/bin/BCI2000Contrib.exe and installed again. The problem still occurs, so hopefully you can just download from that link to get the same version. Let me know if there's a way I can find the version number so you can have that too if you need. Also, I've uploaded the exact download and the installed/extracted files to my dropbox if you want to download from there: https://www.dropbox.com/sh/ivyo08bqd5b5cy6/odC9mL49-N Thanks again for your help!

r.oostenveld
Posts: 10
Joined: 20 Aug 2007, 08:59

Re: Getting FieldTrip Buffer Working

Post by r.oostenveld » 02 Sep 2012, 05:16

I will download the latest binary release version, as you have been using. What operating system do you have. and which MATLAB version? Are you running on 32 or 64 bit?

AeroShark
Posts: 5
Joined: 18 Aug 2012, 17:31

Re: Getting FieldTrip Buffer Working

Post by AeroShark » 02 Sep 2012, 12:42

Windows 7 Home Premium 64-bit. Matlab R2012a (7.14.0.739) 64-bit.

r.oostenveld
Posts: 10
Joined: 20 Aug 2007, 08:59

Re: Getting FieldTrip Buffer Working

Post by r.oostenveld » 02 Sep 2012, 15:35

I have been able to reproduce the problem on 32 bit WinXP. It appears that the buffer server (i.e. the TCP server that deals with the requests from within and from outside of BCI2000) does not work properly. That is something I tested after "set config" but before "start", by using sine2ft and bufferViewer. At that time the buffer server should be running, and should be able to pass data from sine2ft->bufferViewer. The sine2ft application does not report problems, but bufferViewer complains with an error ("buffer aborted" or so).

I will copy the problem over to the fieldtrip bug tracker and discuss it tomorrow with the co-developers. Please register on bugzilla.fcdonders.nl and add your name to the CC of the bug, so that we can keep you posted.

See http://bugzilla.fcdonders.nl/show_bug.cgi?id=1687

Locked

Who is online

Users browsing this forum: No registered users and 14 guests