Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Dual-PC setup with an SMI Eyetracker

mariomario Posts: 4

Hi everyone,

I'm attempting to run a dual-pc setup for an eyetracking experiment, having an SMI eye-tracker attached to a desktop computer, which is in turn connected through an ethernet cable to a laptop running OpenSesame.

I've successfully made the laptop communicate with the eye-tracker with a couple of the sample applications bundled with SMI's SDK. I haven't however been able to make OpenSesame communicate with the eyetracker: the connection always fails.

The SMI API requires two IP addresses to be introduced, one to which to send "signals", and a second from which to receive signals. Looking (through very newbie eyes) at the implementation of SMI support in the PyGaze code (and in the PyGaze plugin in OpenSesame), it seems like it receives a single IP address as input, and uses that for both receiving and sending signals. That should work for a single-PC setup, but it'd cause problems in my situation.

Am I reading the situation right? Any thoughts? Thanks!

Comments

  • JarikJarik Posts: 190

    Hi Mario,

    I think you're right. As far as I know PyGaze always uses a single-PC setup. I don't know how to solve your problem other then programming everything yourself using the SMI API. But I guess thats a big challenging project on its own :|

    Best,
    Jarik

  • mariomario Posts: 4

    Indeed! I can also opt out of the dual pc setup and go single-pc, but it's not ideal. Then again, I've heard things rarely are ideal in the world of experimental science.

    Thanks for the input, Jarik!

  • mariomario Posts: 4

    Problem solved!

    Inspired by ShiroAndy's post on another thread ( http://forum.cogsci.nl/index.php?p=/discussion/1195/solved-problem-loading-iviewxapi-dll#latest ) I changed a line on the libsmi.py file to use set values to connect to the eye-tracker rather than variables:

    Changed:

    res = iViewXAPI.iV_Connect(
        c_char_p(ip), c_int(sendport), c_char_p(ip), c_int(receiveport)
    

    To:

    res = iViewXAPI.iV_Connect(
        c_char_p('192.168.0.1'), c_int(4444), c_char_p('192.168.0.2'), c_int(5555)
    

    I think I had actually tried this before, but changed the wrong file, from a separate PyGaze installation in the same machine, rather than the one in the OpenSesame folder...

    Thanked by 1ishan276
  • JarikJarik Posts: 190

    Hi Mario,

    Thanks for sharing!

    For completeness, I was mistaking in my previous post. Where PyGaze uses a single-PC setup when selecting EyeTribe as tracker type for example, it does use a dual-PC setup when selecting EyeLink.

    Best,
    Jarik

  • Hi Mario,

    Do you know what installations are required on the stimulus pc in order to make this setup work ? I have as well difficulties to connect to an SMI Eyetracker via ethernet connection between two PCs, but the solution you found did not solve my problem.

    Opensesame keeps telling me iViewXAPI.dll is missing, but I copied it in the Opensesame folder, just as mentionned here : http://forum.cogsci.nl/index.php?p=/discussion/1195/solved-problem-loading-iviewxapi-dll#latest

    Thanks for any advice.
    Jessica

  • mariomario Posts: 4

    Hi Jessica,

    I didn't have to manually copy the iViewXAPI.dll file to any of OpenSesame's folders. I only installed the iView SDK and the latest version of OpenSesame and didn't need to any further tweaking to make that particular part of the connection work.

    I don't have access to computer I'm using to connect to the eye-tracking workstation right now, but if you think it'll help, I can check it later for where the iViewXAPI.dll file is located.

    Note that I still haven't been able to go through the calibration process without errors (might open a thread on that subject later), but at least OpenSesame seems to be connecting to iView.

    Best regards,

    Mario

  • cescocesco Posts: 26
    edited June 7

    [EDIT] To save you some typing; just one additional search led me to the SDK download. The file appears to be in that package so never mind. No matter how embarrassing, I'll leave my post below as it could be helpful for someone else.

    This is a silly question which doesn't warrant opening a new thread, so I'll just post it in this relevant thread.

    In terms of copying the iViewXAPI.dll file to the pygaze\_eyetracker folder, I have trouble locating the iViewXAPI.dll file in the first place. It is not present on the SMI laptop with iView and Experiment Center installed, and I cannot find it on the installation CDs either.

    Any pointers would be welcome, thanks!

  • cescocesco Posts: 26

    I am bumping this thread with an additional issue.

    The other day I managed to run a simple pygaze experiment in OpenSesame with the Dual PC set-up as described above, by simply hardcoding the relevant IP addresses into the iViewXAPI.iV_Connect() function. However, for some reason it refuses to work now. Which is a little frustrating, as to the best of my memory I haven't changed anything since then.

     File "C:\Program Files (x86)\OpenSesame\lib\site-packages\pygaze\_eyetracker\libsmi.py", line 201, in __init__
        raise Exception("Error in libsmi.SMItracker.__init__: failed to set logger; %s" % err)
    Exception: Error in libsmi.SMItracker.__init__: failed to set logger; unknown error with decimal code 401; please refer to the iViewX SDK Manual

    In the libsmi file, this script is prior to the one where you hardcode the IP-addresses and concerns these lines:

    res = iViewXAPI.iV_SetLogger(c_int(1), c_char_p(logfile + '_SMILOG.txt'))
            if res != 1:
                err = errorstring(res)
                raise Exception("Error in libsmi.SMItracker.__init__: failed to set logger; %s" % err)

    The 401 code in the manual is fairly ambiguous, but the bottom line is that it fails to connect (iV_Connect). The first argument of the SetLogger function (c_int(1) calls something from the API/dll, but that's not something I want/could go into.

    I am just putting this out there, in hope of getting any pointers.

Sign In or Register to comment.