aboutsummaryrefslogtreecommitdiff
path: root/src/argaze/TobiiGlassesPro2/README.md
blob: 881363ddec6f19640a98462be17a5877a2f097b5 (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
81
82
83
84
85
86
87
88
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.

Load **imu.json** file with argaze utils **tobii_imu_calibrate.py** script with -i option. This is an example file to illustrate how to load Inertial Measure Unit (IMU) calibration parameters.

## Local network configuration

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

### Linux (Ubuntu)

* Setup static eth0 interface

**/etc/network/interfaces**

```
auto eth0
iface eth0 inet static
  address 192.168.1.1
  netmask 255.255.255.0
  network 192.168.1.0
  gateway 192.168.1.254
```

* Install DHCP server: 

```
sudo apt-get install isc-dhcp
```

* Setup DHCP server:

**/etc/default/isc-dhcp-server**

```
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
INTERFACESv4="eth0"
INTERFACESv6=""
```

**/etc/dhcp/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 "/etc/dhcp/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;
}
```

**/etc/dhcp/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.

* Monitor DHCP server activity:

```
journalctl | grep -Ei 'dhcp'
```