-
Notifications
You must be signed in to change notification settings - Fork 0
Tracker installation
Following tutorial will show you how to install and configure software on your Raspberry Pi.
Presumably you already have tracker-server and tracker-client installed.
Create new tracker in Tracker section and copy the generated API key. You will need it in step 4.
To enable powering off with the button you must add following line to the end of /boot/config.txt file:
dtoverlay=gpio-shutdown
Download the DEB file from this link and transfer it to your Raspberry Pi. Alternatively, you can directly download it to your Raspberry Pi using the following command in the terminal:
wget https://github.com/jsfraz/trek-tracker/releases/download/1.0.0/trek-tracker-1.0.0.debOnce downloaded, navigate to the directory where the DEB file is located and run the following command to install it:
sudo dpkg -i trek-tracker-1.0.0.debDuring installation you will be prompted to configure the tracker. If you refuse, you can change it afterwards. The configuration file is located at /etc/trek-tracker/trek-tracker.conf. It should look like this:
[trek-tracker]
Https = false
ServerAddress = trek.example.com
ServerPort = 8080
ApiKey = generate_your_key_in_frontend
ReconnectDelay = 1
InitialReconnectDelay = 10
BaudRate = 115200
Make sure to adjust the values according to your setup. Specifically, you may want to change the following settings:
-
Https: Set to true if you're using HTTPS, otherwise set it to false. -
ServerAddress: Set to the IP address or hostname of your server. -
ServerPort: Set to the port number on which your server is running. -
ApiKey: Replacegenerate_your_key_in_frontendwith the API key obtained from your frontend application. -
ReconnectDelay: Set the delay (in seconds) for the device to attempt reconnection after disconnection. -
InitialReconnectDelay: Set the initial delay (in seconds) before the device attempts reconnection for the first time. -
BaudRate: Set the baud rate for serial communication with your GPS module.
If you configured the tracker manually after installation, you need to restart the trek-tracker.service. You can do this by running the following command:
sudo systemctl restart trek-tracker.serviceIf you did not reboot the device after installation, it is recommended to do so for the software and power button to work properly. You can do this by running the following command:
sudo systemctl restart trek-tracker.serviceYou are done!
Congratulations! You have completed the setup process for the tracker.