Menu

Tree [69dd79] master /
 History

HTTPS access


File Date Author Commit
 assets 2015-08-10 Johan Persson Johan Persson [7968b7] Added framework to start with content creation ...
 bldscripts 2022-06-22 Johan Persson Johan Persson [69dd79] Updated stst build script
 design 2017-05-10 Johan Persson Johan Persson [889677] Sync with version 3.4.1
 docs 2019-02-06 Johan Persson Johan Persson [7fd732] G7-19 fix: Don't delete shell script at make clen
 dpkg 2018-10-21 Johan Persson Johan Persson [90e964] chg: Updated build dependencies for dpkg
 src 2022-06-06 Johan Persson Johan Persson [a8bc44] Added creation of unique message id
 systest 2022-06-06 Johan Persson Johan Persson [5a9636] Use standard password
 .gitignore 2019-01-27 Johan Persson Johan Persson [973b5b] G7-5 chg: Added SonarQube scanning
 AUTHORS 2015-04-12 Johan Persson Johan Persson [aa4745] Initialize commit to git
 COPYING 2015-04-12 Johan Persson Johan Persson [aa4745] Initialize commit to git
 ChangeLog 2022-06-17 Johan Persson Johan Persson [9f6373] Update notes for old v3.5.3
 Makefile.am 2017-05-10 Johan Persson Johan Persson [889677] Sync with version 3.4.1
 NEWS 2017-05-10 Johan Persson Johan Persson [889677] Sync with version 3.4.1
 OLD-TODO 2017-05-10 Johan Persson Johan Persson [889677] Sync with version 3.4.1
 README 2018-10-12 Johan Persson Johan Persson [fdf021] Update README for removed SuSE bootstrap script
 TODO 2017-05-10 Johan Persson Johan Persson [889677] Sync with version 3.4.1
 configure.ac 2022-06-06 Johan Persson Johan Persson [2a13a2] Add handling of iconv library for OSX >= 12.0 w...
 sonar-project.properties 2021-06-16 Johan Persson Johan Persson [ae27fb] Updated SQ Parameters

Read Me

1. Overview
===========

This package contains a Unix/Linux service (a.k.a. daemon) that is intended to
be used together with the GM7 GPS Tracker. The daemon has primarily two functions.

1) Listen on a specified TCP/IP port (the device port) for location and event 
   reports sent by the tracker. For details on the operation of the daemon see 
   man (1) g7ctrl. All Event received by the daemon are store in sqlite3 database.

2) Detect USB connections of a GM7 tracker. When a connection is detected the daemon
   allows the user to send and receive commands to the tracker. This is accomplished
   by the daemon also listening to a different port (the command port). It is possible
   to directly connect to the command port directly but the recommended way is to use
   the supplied command shell. This command shell (g7sh) facilitate the  handling of commands 
   to/from the daemon by shadowing some technicalities in the command protocol as well
   as offering full command line editing including history handling.
    See man (1) g7sh for more details.

In addition the command protocol allows for some rudimentary questions to the DB as 
well as some queries regarding the state of the daemon. See man (1) g7sh for a detailed
list of supported commands.


2. Short installation guide
===========================
The package has some mandatory and some optional pre-requirements that needs to be
in order to build the package.


2.1 Mandatory pre-requirements

- Development version of "libreadline"
- Development version of "libpthread" 
- Development version of "libpcre"
- Development version of "libsqlite3"

All the development libraries above are common libraries supplied by all modern
GNU/Linux distributions. 


2.2 Optional pre-requirements

In order to re-generate the documentation (which is written in the XML schema
Docbook5) as manpages, HTML and PDF a full working DocBook5 environment must 
exist. However, it is perfectly possible to build the library without a full
DocBook5 setup and in that case a set of pre-rendered documentations (included
in the distribution of this package) will be installed.


2.3 Automatic bootstrapping

In order to make it really simple to build the daemon the package includes 
a bootstrap script, "bootstrap.sh" in the "bldscripts/"
directory. It is intended to be run just after the package has been downloaded.
It will will try to install all necessary pre-requisite (including DocBook5) 
in order to create a full build environment.

- "bootstrap.sh" Is intended for Debian based distributions such as Linux Mint, 
   Elementary, Ubuntu. 


2.4 Building the package

The package makes use of the standard GNU automake/autoconf toolset which makes
building the package straightforward. Unpack the tar ball and change into the 
corresponding directory and type:

./configure && make -j4

NOTE: It is common to initially get some errors when running configure about missing
libraries. The error messages should be descriptive enough to indicate which library
is missing. To correct a missing library please install the corresponding "-dev" package
of the missing library. So for example if you get an error about missing "readline" library
please install the "libreadline-dev" package (or similar named package for your distribution)

After a successful build all that is needed is to install the package. This must be done 
with root privileges as

sudo make install

2.4.1 Adjusting the configuration of the package

The "configure" scripts supports some additional arguments that will for example
allow you to customize where the package is installed and where its configuration file
should go. Please see "configure --help" for a list of options. Major options are
also detailed in the INSTALL file.


3. Running the daemon
=====================

Before starting the daemon you should make suer that the daemons configuration file
suits your setup. By default a template for the the configuration file will be installed into 
"/etc/g7ctrl/g7ctrl.conf.template". Start by copying the template to get a proper
configuration file with the command (as root)

cd /etc/g7ctrl && mv g7ctrl.conf.template g7ctrl.conf

The open "g7ctrl.conf" in your favorite editor and go through all the settings.

When you are happy with the settings the daemon can just be started (as root) by typing

g7ctrl

This will start the service as a daemon (unless this is disabled in the config file).
The daemon will run as the specified user (in the config file).

It is possible to give command line arguments to the daemon when it is started and
in that case any parameters given on the command line will override the corresponding 
argument in the config file. So for example running

g7ctrl -d n -V 3

will start the service NOT as a daemon and use level 3 logging (include debug messages).