aboutsummaryrefslogtreecommitdiff
path: root/src/argaze/TobiiGlassesPro2/README.md
blob: 4d8e9a23d2ece551fb36288edc50dd71766a2f2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Class interface to handle Tobbi Glasses Pro 2 device.  
This work is greatly inspired by the David de Tommaso and Agnieszka Wykowska [TobiiGlassesPySuite](https://arxiv.org/pdf/1912.09142.pdf).

* [Tobii Glasses Pro 2 device user manual](https://www.tobiipro.com/siteassets/tobii-pro/user-manuals/tobii-pro-glasses-2-user-manual.pdf).

## Utils

Print **A4_calibration_target.pdf** onto A4 paper sheet to get calibration target at expected dimension.

## Local network configuration

If the tobii Glasses aren't connected to a router, here is how to configure a local DHCP server to enable device connection.

* Install DHCP server: 
```
brew install isc-dhcp
```

* Setup DHCP server:

**/usr/local/etc/dhcpd.conf**

```
# NECESSARY TO BE A DHCP SERVER
authoritative;

# DHCP CONFIGURATION INFORMATION
default-lease-time 43200;
max-lease-time 86400;
server-name "dhcpserver.robotron.lan";

# DNS SERVERS DHCP WILL PUSH TO CLIENTS
option domain-name-servers 192.168.1.1;

# SEARCH DOMAINS DHCP WILL PUSH TO CLIENTS
option domain-name "robotron.lan";

# DHCP STATIC IP ASSIGNMENTS FILE
include "/usr/local/etc/master.conf";

# SUBNET FOR IP ADDRESSES MANUALLY/STATICALLY ASSIGNED ONLY
subnet 192.168.1.0 netmask 255.255.255.0 {
  option broadcast-address 192.168.1.255;
  option subnet-mask 255.255.255.0;
  option routers 192.168.1.254;
}
```

**/usr/local/etc/master.conf**

```
# Static IP assignments 
## SUBNET - 192.168.1.0/24
host tobiiglasses { hardware ethernet 74:fe:48:34:7c:92; fixed-address 192.168.1.10; }
```
Replace 74:fe:48:34:7c:92 by the correct MAC address.

* Setup USB LAN Interface:
```
ip: 192.168.1.1
subnet: 255.255.255.0
router: 192.168.1.254
```

* Monitor DHCP server activity:
```
sudo log stream --info --debug --predicate "process == 'dhcpd'"
```

* On Mac: Launch Tobii glasses interface to enable USB LAN Interface before to launch DHCP server.

* Launch DHCP server: 
```
sudo /usr/local/sbin/dhcpd
```

* Kill DHCP server: 
```
sudo kill `cat /usr/local/var/dhcpd/dhcpd.pid`
```