Home Forums Software Development Setting up a Tobii X120 on Windows 10 PC using C# SDK

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #22846
    Shaun
    Participant

    Hi folks,
    I’m new to this forum, so please be gentle!

    Having a real nightmare trying to get my Windows 10 PC to recognise a Tobii X120 eye tracker.

    I have to …
    allow a port through the firewall.
    Install the SDK using Nugent into VStudio
    Setup a C# console program, then paste in some example code from Tobii.
    Can’t find a version of Tobii Eye Tracker Manager that will recognise the X120, it’ll only see newer eye trackers, which isn’t very helpful. There are no legacy versions of the manager on the Tobii webside either.

    SO I did all of that above (apart from getting Tobii manager to work) & there are loads of errors in the code, like as if half of the functions or variable don’t exists in the SDK!

    I’d be very grateful if someone could give me some guidance as to how I can set up a simple C# program.

    After a day and a half, following the instructions on the Tobii website, I’m still no nearer!

    Thanks,
    Ray

    #22848
    Jonas Högström
    Participant

    Is your tracker a Tobii X3-120 (with USB connection or Ethernet via an EPU) or is to a Tobii X120 (network tracker)? Using Tobii X3-120 requires the installation of a driver, and that driver can be installed using Tobii Eyetracker Manager.

    Once you have the driver installed, the following simple console application code (.net6) should find your eyetracker and subscribe to gaze data.

    var eyeTracker = Tobii.Research.EyeTrackingOperations.FindAllEyeTrackers().First();
    eyeTracker.GazeDataReceived += (_, args) =>
    {
    Console.WriteLine($”{args.SystemTimeStamp}: “+
    $”x={args.LeftEye.GazePoint.PositionOnDisplayArea.X} “+
    $”y={args.LeftEye.GazePoint.PositionOnDisplayArea.X}”);
    };
    Thread.Sleep(TimeSpan.FromSeconds(5));

    #22849
    Shaun
    Participant

    Hi Jonas,
    Thanks for your email.

    Ours is the Tobii X120 Eye Tracker, it is connected straight to a PC’s network card using an Ethernet lead (there is no USB port). It doesn’t look like this is compatible with the Tobii Eyetracker manager from what I can tell :(.

    Regards,
    Ray

    #22850
    Shaun
    Participant

    ????

    #22858
    Jonas Högström
    Participant

    Yes, ETM should support connecting to a network tracker also with a direct cable setup. In this setup, the tracker will typically use a “linklocal” IP4 address. If you have a router/switch with DHCP support available you can try connecting the tracker via the router instead to see if that solves any problems.

    Did the sample code above manage to find the tracker?

    #22864
    Shaun
    Participant

    Hi Jonas,
    Thanks for your reply. I was having real issues with posting on here on Friday, hence the ?????’s , it was a test as I’d lost a couple of messages, then eventually gave up!

    The problem I have is finding some software that will allow me to connect to the eye tracker. I think that I need either an older version of EyeTrackerManager, or a verion of Clearview (deprecated) that works on Window 7+.

    I need one of the above to get me to the point where I can then use the SDK.

    I’ve scoured the Tobii websites & the only copy of EyeTrackerManager available doesn’t recognise the TX120 :(.

    Cheers,
    Shaun

    #22865
    Jonas Högström
    Participant

    The problem is not with ETM. I can confirm that latest version of ETM is compatible with Tobii X120.

    Have you tried connecting your tracker via a router as I suggested above (to rule out that the direct connection and OS support for link local isn’t the issue)?

    Have you tried the sample Tobii Pro SDK code I posted above to see if that is capable of detecting and connecting to your tracker?

    #22866
    Shaun
    Participant

    I tried doing that but just get the message ‘installation failed’.

    The option for TX120 or T120 isn’t in the list of eye trackers, unless there’s an older version of the software somewhere that does support it?

    Anyway, on a positive note, I did manage to get the Tobii Studio and config manager installed & to be surprise, after running in XP SP3 compatibility mode, it runs! So I can now configure and see the eye tracker working!

    All I need now if a version of the SDK that recognises the TX120. I ran the class from the SDK examples on Tobii which matches the SDK I installed & it does a scan for eye trackers, but comes back with zippo :(.

    I tried adding in the code you suggested & got the following…

    System.InvalidOperationException
    HResult=0x80131509
    Message=Sequence contains no elements
    Source=System.Core
    StackTrace:
    at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
    at WindowsFormsApp1.Program.Main() in C:\Users\Louisa (ET Study)\source\repos\trying newer SDK\Program.cs:line 24

    #22867
    Shaun
    Participant

    … in this line … var eyeTracker = Tobii.Research.EyeTrackingOperations.FindAllEyeTrackers().First();

    Now getting Error: Slow down; you move too fast. Arghhhhh!

    #22879
    Jonas Högström
    Participant

    If the SDK can’t find any available tracker, the operation “FindAllEyeTrackers” will return an empty list. Here is a little larger example that handles this problem a little more gracefully. I just tested it with a Tobii X120 connected directly to a USB/Ethernet adapter in my laptop:

    https://gist.github.com/jonashogstrom/baed7fbc9cab4f2464773234748bd34f

    #22880
    Shaun
    Participant

    Thanks Jonas, I will try that.

    Before I do though, I have found what is probably causing all our issues! I checked the firmware of the TX120-204-…. & it’s version 1.1.19

    After re-reading the latest SDK information, it requires version 2.0 or higher!

    Only issue I have now is getting a copy of the newer firmware version, then getting the following question answered, is this going to stop our existing copies of Tobii Studio, Configuration Manager & Tobii Eyetracker Browser software from working? If I did that, I would not be popular with the other people who use it!

    #22882
    Jonas Högström
    Participant

    That firmware update is probably required, but unfortunately, I don’t have any details on whether that upgrade will cause any incompatibilities with Tobii Studio. It was probably released 10+ years ago (That tracker was old already when I started at Tobii 12 years ago). I’m pretty sure that the last major release of Tobii Studio (3.x) should be compatible with the latest version of the X120 firmware, but I’m not able to guarantee that. And if you haven’t updated tracker firmware in 10+ years, chances are that you are also on an old version of Tobii Studio.

    The device I have is running on FW 2.0.7 but I don’t have Tobii Studio installed.

    #22883
    Jonas Högström
    Participant

    You have PM

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.