Home › Forums › Software Development › use create_eyetracker.c is fail
Tagged: c++, create_eyetracker
- This topic has 1 reply, 2 voices, and was last updated 7 years, 3 months ago by Grant [Tobii].
- AuthorPosts
- 25/08/2017 at 03:53 #7331杨西Participant
I use python discover_glasses_on_network.py is
import socket
import structMULTICAST_ADDR = ‘ff02::1’ # ipv6: all nodes on the local network segment
PORT = 13007if __name__ == ‘__main__’:
s6 = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM)
s6.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s6.bind((‘fe80::fc50:54de:2271:25bd%11’, PORT))
#s6.bind((‘fe80::492:abf:8c99:c340%18’, PORT))s6.sendto(‘{“type”:”discover”}’, (MULTICAST_ADDR, 13006))
print (“Press Ctrl-C to abort…”)
while True:
data, address = s6.recvfrom(1024)
print (” From: ” + address[0] + ” ” + data)print data is :
From: fe80::76fe:48ff:fe1c:9646%11 {“type”:”identity”,”class”:”glasses2″,”name”
:”TG02B-080107110661″,”version”:”1.22.0-zucchinipaj”,”id”:”TG02B-080107110661″,”
port”:80,”interface”:”eth0″,”ipv4″:”192.168.1.141″}but when i use c code, file create_eyetracker.c
#include <stdio.h>
#include “tobii_research.h”
#include “tobii_research_eyetracker.h”
void create_eyetracker_example(char* address) {
// ex address = “tet-tcp://12.13.14.15”
TobiiResearchEyeTracker* eyetracker = NULL;
TobiiResearchStatus status = tobii_research_get_eyetracker(address, &eyetracker);
char* serial_number;
char* device_name;
char* model;
tobii_research_get_serial_number(eyetracker, &serial_number);
tobii_research_get_device_name(eyetracker, &device_name);
tobii_research_get_model(eyetracker, &model);
printf(“Get Eye tracker with status: %i”, status);
printf(“Address: %s\n”, address);
printf(“Model: %s\n”, model);
printf(“Name (It’s OK if this is empty): %s\n”, device_name);
printf(“Serial number: %s\n”, serial_number);
tobii_research_free_string(serial_number);
tobii_research_free_string(device_name);
tobii_research_free_string(model);
}int main()
{
create_eyetracker_example(“tet-tcp://192.168.1.141”);
return 0;
}eyetracker value is NULL.
please help me look the problem
25/08/2017 at 09:11 #7333Grant [Tobii]KeymasterHi @yangxi, The Tobii Glasses are part of the Tobii Pro business department.
This forum is intended for support with the Tobii EyeX and C4 Eye Tracker and associated SDK’s.
Please get in touch with Tobii Pro Support department directly @ http://www.tobiipro.com/contact/contact-support/ for an
answer to your query.Apologies for the inconvenience.
- AuthorPosts
- You must be logged in to reply to this topic.