Some problem using the fieldtripbuffer

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Thu Jan 14 21:54:23 CET 2010


Hi Teris,

I have also occasionally encountered the problem with opening a TCP connection on windows (i.e. bci2000). The error means that the client (MATLAB) is not able to make a connection to the server (the fieldtrip buffer which is running under BCI2000).

On a Linux or OSX only setup (both the matlab client and the buffer server running on linux and/or OSX) the problem never happened to me. I don't know where in the code the problem is, and since it is so difficult to reproduce, I also don't know where to start looking in the code. If it results in problems for you, then I suggest you do something like

function varargout = retry_read_header(varargin)
retry = 100;
while retry>0
  try
      varargout = read_header(varargin{:});
      break;
  end
  retry = retry - 1;
end

and something similar for read_data and read_event.

Of course it would be better if the problem were fully diagnosed and subsequently fixed, so any suggestions are welcome.

best regards,
Robert  



-----------------------------------------------------------
Robert Oostenveld, PhD
Senior Researcher
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
tel.: +31 (0)24 3619695
e-mail: r.oostenveld at donders.ru.nl
web: http://www.ru.nl/neuroimaging
skype: r.oostenveld
-----------------------------------------------------------

On 12 Jan 2010, at 8:20, teris tam wrote:

> Dear all,
>         I am trying to read the signal from BCI2000 in MATLAB using the fieldtripbuffer. I use the code given in the BCI2000 wiki at http://www.bci2000.org/wiki/index.php/Programming_Tutorial:Working_with_the_FieldTrip_buffer.
>         It was able to read and plot the signal from BCI2000 correctly for a certain period of time, but eventually it stopped and reported "ERROR: failed to create socket (-2)". I was able to connect to and read from the buffer again if I re-run the program.
>         Does anyone have an idea why this error occur and how to solve it?
>         Thanks a lot!
> Best regards,
> Teris

-----------------------------------------------------------
Robert Oostenveld, PhD
Senior Researcher
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
tel.: +31 (0)24 3619695
e-mail: r.oostenveld at donders.ru.nl
web: http://www.ru.nl/neuroimaging
skype: r.oostenveld
-----------------------------------------------------------


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20100114/91d247f4/attachment-0002.html>


More information about the fieldtrip mailing list