Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Dual-PC setup with an SMI Eyetracker

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

  • 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

  • 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!

  • 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...

  • 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

  • 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

  • edited June 2017

    [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!

  • 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.

  • Hey Cesco,

    I´m facing the same problem as you had 8 months ago. Did you manage to solve it in the meantime? This would be great! Although fighting the SMI Eye-Tracker in a corporation with matlab, maybe you could help me out with this?

    Error:
    Define Logger
    Logger could not be opened

    "Could not establish Connection"

    The ret_log and ret_con variables are both set to 401 which results in that quite ambiguous error.

    Best regards
    Kilian

  • Dear all,

    just in case there are some other guys out there trying to get the SMI-Eye-Tracker running in a dual-PC Setup in matlab. Here are the steps which were necessary for me to get this thing working:

    Connect the two PC´s via Ethernet or a cat5 crossover cable;
    copy the Iview SDk Folder from the eye-tracker PC to your "application PC( the one which you use to run your Experiment with matlab);
    install the IviewxSDK Setup.exe;
    start the smi-programm on your eye-tracking PC, go to the hardware-communication menu and Change the Connection Settings (Exchange or insert the respective PC´s ip addresses and ports) --> see cmd -ipconfig (for Windows) for that;
    start the "initandconnect"- example script from the iviewSDK Folder which is provided bei SMI;
    This should result in a successful Connection message in matlab. From there on you can start Building your own Experiment using this Setup.

    I hope this may be a help!

    Best regards
    Kilian

  • I managed to track down the real cause of Error 401 (ERR_FUNC_NOT_LOADED) while writing my own interface to the iview-dll.

    You absolutely need to make sure the two DLLs "iViewXAPIL.dll" and "iViewXAPIR.dll" are loaded as well!

    I can reproduce the issue with the examples by only putting the "iViewXAPI.dll" next to the examples executable. Putting the other dlls there as well fixes the issue.

    When manually loading the "iViewXAPI.dll" you may also need to manually load the others! For my java interface, I just added some calls to Native.loadLibrary for the others.

    Now the "ERR_FUNC_NOT_LOADED" makes sense, since there was indeed some function not loaded.

    Thanked by 2Edwin cesco
  • It's been a while for me, but indeed I remember that copying all the dll's into the right folder solved some, but not all of the issues, so

    When manually loading the "iViewXAPI.dll" you may also need to manually load the others!

    makes a lot of sense!

    I don't speak Java, so your interface sounds great! I suppose that's the way forward, with the way SMI has gone.

Sign In or Register to comment.