GPS/GLONASS tracker server for Debian
glonassd is a linux daemon that receives data from a GPS / GLONASS trackers, processing and preserving them in a database.
Written in C, сompiled with gcc 6.3.0 for x86_64-linux-gnu.
Receiving: Arnavi-4/5, Galileo (all versions), GPS101-GPS103, SAT-LITE / SAT-LITE2, Wialon IPS, Wialon NIS (SOAP / Olympstroy), EGTS (ERA-GLONASS), TQ GPRS (H02).
Sending (forwarding): all receiving without reencode or reencode to EGTS, Wialon NIS, WialonIPS, Galileo.
Protocols can be added using plug libraries.
PostgreSQL
Redis
Oracle
Databases can be added using plug libraries.
make all for compile daemon + database library + terminals libraries
make glonassd for compile daemon only
make pg for compile database (PostgreSQL) library
make name for compile terminal name library
Additional information about threed party libraries
Create folder for daemon an copy in it files glonassd, .so, .sql, or use folder where project compiled.
In you PostgreSQL database create table "tgpsdata" (see script tgpsdata.sql).
If you use firewall, enable ports for incoming terminal connections.
In glonassd.conf file in server section edit values for:
listen - IP addres listen trackers interface
transmit - IP addres retranslation to remote server interface
log_file - full path to log file
db_host, db_port, db_name, db_schema, db_user, db_pass - parameters for you PostgreSQL database
Comment or uncomment terminals sections for used terminals and edit listeners ports.
For forwarding terminals data to remote server see comments in forward section of the glonassd.conf file.
For schedule database tasks see comments about timer parameter in server section of the glonassd.conf file.
Test the system message queue length limit using ulimit -q
or ulimit -a
and check the value of the 'POSIX message queue'.
By default, it is 819200 bytes. Increase this value at least to 81920000.
To do this, add the following lines to the /etc/security/limits.conf file:
root soft msgqueue 81920000
root hard msgqueue 81920000
* soft msgqueue 81920000
* hard msgqueue 81920000
and reboot the system. If the message "mq_send(config->db_queue) message queue is already full" appears in the log file during operation, then the queue size must be increased further.
From daemon folder use ./glonassd start command for start in console mode, CTRL+C for stop.
Use -d parameter for start in daemon mode.
Use -c path/to/config/file parameter for config file not in daemon folder.
If daemon configured as automatically startup, use service glonassd start and service glonassd stop for start/stop if needded.
Edit DAEMON variable in glonassd.sh file for correct path to daemon folder.
Copy glonassd.sh file in /etc/init.d folder.
Use chmod 0755 /etc/init.d/glonassd.sh for make it executable.
Use systemctl daemon-reload and update-rc.d glonassd.sh defaults for enable autostart daemon.
Use update-rc.d -f glonassd.sh remove for diasble autostart without delete glonassd.sh file.
Delete /etc/init.d/glonassd.sh file and use systemctl daemon-reload for fully cleanup daemon info.
The glonassd is open-sourced software licensed under the MIT license.
Documentation to be written.
Andrey Fedorov, Kurgan, Russia.
mailto:mail@locman.org
This daemon is part of navigation service of locman.org.
12.06.2020
01.05.2021
13.11.2021
04.04.2022
17.04.2022