Back to the main page.

Bug 2582 - improve support for ft_realtime_micromedproxy

Status ASSIGNED
Reported 2014-05-16 10:53:00 +0200
Modified 2014-05-16 12:53:10 +0200
Product: FieldTrip
Component: realtime
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P5 enhancement
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2014-05-16 10:53:30 +0200

On 07 May 2014, at 11:27, Dimitra Makri wrote: I am writing to you to ask some help on the http://fieldtrip.fcdonders.nl/development/realtime/micromed issue. We are currently running a BCI experiment in the FORTH institute(GR) and until now, we have been using BCI2000 to connect our Micromed64 channel system with fieldtrip buffer. I would like to try and replace BCI2000 with the ft_realtime_micromedproxy function but it seems that I am doing something wrong. Despite of the fact that I have the .p version as released freely and so i cant have access to the source code, I am also having a hard time understanding how the function should be used and could not find any tutorials online. Is there anything that I may have missed?


Robert Oostenveld - 2014-05-16 10:54:48 +0200

I see that the links to the documentation on http://fieldtrip.fcdonders.nl/development/realtime/micromed are broken. I also see >> help ft_realtime_micromedproxy No help found for ft_realtime_micromedproxy.p. To get help for a p file, there should also be an m-file with the same name.


Robert Oostenveld - 2014-05-16 11:01:59 +0200

(In reply to Robert Oostenveld from comment #1) mac011> svn commit Adding ft_realtime_micromedproxy.m Transmitting file data . Committed revision 9540. The m-file with documentation will be included in the next release. In the mean time, you can see it here https://code.google.com/p/fieldtrip/source/browse/trunk/realtime/example/ft_realtime_micromedproxy.m


Robert Oostenveld - 2014-05-16 11:32:06 +0200

I noticed that the online documentation at http://fieldtrip.fcdonders.nl/reference (not all functions are shown there) was not being automatically updated correctly. I just triggered the update manually. It turned out that the directory was missing from ft_documentationreference.m. I added it. mac011> svn commit ft_documentationreference.m Sending ft_documentationreference.m Transmitting file data . Committed revision 9541. The micromed page now correctly links to the online documentation at http://fieldtrip.fcdonders.nl/reference/ft_realtime_micromedproxy


Robert Oostenveld - 2014-05-16 12:13:11 +0200

the function starts with a call to "checkconfig", which has since then been renamed to ft_checkconfig. Furthermore, it needs the tcp_udp_ip toolbox. I just downloaded it, and noticed that it does only contain these mex files -rw-r--r--@ 1 roboos staff 73728 Feb 12 11:01 pnet.dll -rw-r--r--@ 1 roboos staff 89663 Feb 12 11:01 pnet.mexglx -rw-r--r--@ 1 roboos staff 32144 Feb 12 11:01 pnet.mexsol -rw-r--r--@ 1 roboos staff 24576 Feb 12 11:01 pnet.mexw32 i.e. OS X 32 and 64 bit are missing, windows 64 bit is missing and linux 64 bit is missing. On my 64 bit OS X computer (and using MATLAB 2014a), I was able to compile the mex file with >> mex pnet.c resulting in -rw-r--r--@ 1 roboos staff 89663 Feb 12 11:01 pnet.mexglx -rwxr-xr-x 1 roboos staff 33112 May 16 12:07 pnet.mexmaci64 -rw-r--r--@ 1 roboos staff 32144 Feb 12 11:01 pnet.mexsol -rw-r--r--@ 1 roboos staff 24576 Feb 12 11:01 pnet.mexw32 after these two fixes, the function starts up and goes in the loop with the warning Warning: waiting for an incoming client connection This is expected behaviour. I have added the change to the fieldtrip release. mac011> svn commit Sending ft_realtime_micromedproxy.p Transmitting file data . Committed revision 9542. It will be part of the ftp zip version tomorrow, or available from https://code.google.com/p/fieldtrip/source/browse/trunk/realtime/example/


Robert Oostenveld - 2014-05-16 12:53:10 +0200

On 16 May 2014, at 12:27, Dimitra Makri wrote: I already checked the updates. You are right on the checkconfig function. I think that HASTOOLBOX has changed to an ft_ name as well(I got error messages on those two). The tutorial gives some insight but either way I don't have access to the Micromed system today so I won't be able to check what happens with the different specifications. I also got this warning: Warning: Unloading mex file. Unclosed tcp/udp/ip connections will be closed! Is this an aspect of what you mentioned in your last comment about the tcp_udp_ip toolbox? ------------------------------------------------------------ Regarding hastoolbox: you are right, I missed that one because I had an old hastoolbox somewhere on my path. That is now fixed. Regarding the unloading mex file: that is harmless. I changed the function a bit so that cleanup is done at the end (i.e. if you press ctrl-C), which means that at the begin you don't see this confusing message any more. mac011> svn commit Sending ft_realtime_micromedproxy.p Transmitting file data . Committed revision 9543.