Command line

The command line interface allows you to script BT747 operations.

Not all BT747 functionality is implemented yet. The first interface definition was based on mtkbabel, the code is entirely different!

There are only 'a few' customers for this, so functionality will be added as requested and acccording to other priorities.


AGPS (assisted GPS) is a system that helps GPS devices in getting a FIX situation faster.
In a few words the EPO file contains "hints" that lead the device to find satellites faster.
To use the AGPS feature of your device you have to keep those "hints" updated.
This is useful in poor signal conditions, like when tall buildings or trees make the signal weak.

The new AGPS upload feature is available even in the command line version.
From the usage:
--agps Upload APGS data using the default URL
(or the provided url when available).
--agps-clear Clears the AGPS data in the device
(done before the upload).
--agps-url Specify the URL (file://, ftp://, http://)
to the AGPS (EPO) data.
The basename of this file is usually
Implies agps option.

If you use command line probably you are using it in some sort of BAT script.

This is my experience in mirroring EPO files to get a faster download (and my troubles...)
When uploading EPO files to many devices it could be faster to mirror an EPO file you got somewere, and then upload a local file to avoid a network transfer everytime you send data to the device.
But the EPO file has no checksum informations, so be careful you do not alter the file during the transfer.

Linux example:
cd /home/locale1/agpsdata ; wget -O file.EPO
It works without damaging your file.

Win example:
we call ftp with a script file:
c:\windows\system32\ftp -s:c:\mailtrack_app\ftp.cmd

content of ftp.cmd:
get file.EPO C:\your\path\file.EPO

Notice the "binary" command:
without this the file get corrupted, and you can notice this when - with the GUI - you see the expiration date of the EPO file very far in the future.


The next table has to be updated. Look at the help provided on the command line for up-to-date information.

Option Description
-R Recover from disabled log: erase data and reset recording criteria
--UTC <Integer: UTCoffset> Define UTC offset to apply to output file
-a Read all the log memory (overlapped data)
-b <filename.bin> Do not read device, read a previously saved file.The file type is selected according to the filename extension. Recognized file extensions are .csv, .trl,.nmea, .nme, .nma, .txt, .log, .sr .
--badcolor <HEXCOLOR> Color to use for 'bad part' in tracks (HEX RGB value), ex 00FFFF
--color <HEXCOLOR> Color to use for tracks (HEX RGB value, ex 00FF00)
-d <Integer: DEBUG_LEVEL> Debug level: 0..2
--device <DEVICE> Make sure the raw bin file is correctly interpreted (DEFAULT, HOLUX).
--download-method FULL|SMART|REPORTED Select the download method. FULL = All
the memory, SMART=According to
previous download, REPORTED=Ignores
overwrite setting and download
reported used memory.
-f <filename> Base name for saved files (.bin and other)
-h Displays help
--height-to-msl Correct WGS84 height (elevation) to MSL (Mean Sea Level)
-l <(on|off)> Turn logging ON/OFF
-m <(stop|overlap)> Set STOP/OVERLAP recording method on memory full
--outtype <OUTPUTTYPE> Create a gpx file of type NMEA, GPX, GMAP, KML, KMZ, CSV, PLT, TRK.
More than one format can be specified when separated with ','
-p <port> Communication port, default: /dev/ttyUSB0
-r <Integer: time:distance:speed> Set logging criteria (zero to disable)
-s <Integer: speed> Serial port speed, default 115200 baud
--splittype <SPLITTYPE> The way to split the input data: NOSPLIT, DAY or TRACK
-t Create a gpx file with tracks
--template-taggedfilename FORMAT Specify the template for the tagged filename. Default FORMAT is "%p\%f_tagged%e".

%p is replaced by the directory of the original file.

%e is replaced by the extension of the original file.

%f is replaced with the base of the original file.

So the default will convert a file "BT747\org.jpg" to "BT747\org_tagged".

--timesplit <Integer: MINUTES> Time separation in minutes needed for track segment or track separation.
--trkptinfo Add record information for each trackpoint.
--trkptname Give each trackpoint a name (based on time)
-v Print BT747 version and exit
-w Create a gpx file with waypoints