Dear all,
We are trying to get the SMI iViewX RED 500 to work. Remote commands work fine, but receiving data using the iViewXComm doesn't work... Pinging the iViewX does work using this snippet:
% See if we can ping RED:
IVXsend('ET_PNG',ivx);
data = IVXreceive(ivx);
if ~strncmp(data,'ET_PNG',6)
fprintf([mfilename ': cannot ping the iViewX host.\n']);
[success, ivx]=iViewX('closeconnection', ivx);
return
else strncmp(data,'ET_PNG',6)
fprintf([mfilename ': The ET_PNG-signal pinged to the iViewX host was echoed back to and recieved by the matlab script.\n']);
end
IVXsend and IVXreceive are subparts (and minutely tweaked) versions of the iViewXComm function and are taken from Jenny Read (see attachment).
If I try to run the calibration I get a time out. When I interrupt the script the matlab script hangs up at 'if len>0' at line 51 of iViewXComm-script (also attatched to this issue)
% open connection for receiving data
[success, ivx]=iViewX('openconnection', ivx);
if success==-1
fprintf([mfilename ': cannot open a connection to iViewX host.\n']);
return
end
% send screen info
[success, ivx]=iViewX('setscreensize', ivx);
[success, ivx]=iViewX('startrecording', ivx);
% send (possibly adapted) calibration point positions
[success, ivx]=iViewX('setcalibration', ivx, ivx.nCalPoints); %??
[success, ivx]=iViewX('sendcalibrationpoints', ivx);
% now we should wait for iView to send
% information on calibration screen size
% and calibration point positions
% now we should wait for iView to send
% information on calibration screen size
% and calibration point positions
% now we should wait for iView to send
% information on calibration screen size
% and calibration point positions
tBreak=GetSecs+ivx.commTimeOut;
npts=0;
klaar=0;
while klaar==0
[keyIsDown,secs,keyCode] = KbCheck;
if 1==keyCode(ivx.modifierKey) & 1==keyCode(ivx.breakKey)
fprintf('Break or modifier key detected')
result=-1;
return;
break;
end
if GetSecs>tBreak
fprintf([mfilename ': timed out waiting for data.\n']);
result=-1;
return
end
[data, ivx]=iViewX('receivedata', ivx);
For some reason len = 0, but I don't understand why. It was also capable to ping the iViewX.
I have overwritten the default settings from ivx to:
ivx.host= '10.10.10.1';
ivx.port= 4444;
ivx.localport= 5555;
ivx.screenHSize = 1280;
ivx.screenVSize = 1024;
ivx.nCalPoints = 9;
ivx.calTimeOut = 4;
Should we also modify ivx.socket, ivx.udpreadtimeout and ivx.udpmaxread to receive data from the eyetracker?
It would be great if you could help us.
Thanks in advance,
Pol van Rijn