This is a PHP application to easy decode the GPS information received from Teltonika devices. This project is made to satisfy FMXXXX Protocols of Teltonika explained here: http://bahpav.com/assets/uploadsp/doc/FMXXXX_Protocols_v2.10.pdf
This application provides some tools:
- PHP TCP socket server in which you can receive the data sent by the teltonika device.
- Data parser to turn binary data received from the device into a view-friendly way.
- Database mechanism to save that information into your database.
- ReactPHP: https://reactphp.org/
- Medoo: https://medoo.in
-
You need to configure your teltonika device to point to your host/ip with TCP protocol in the GPS settings section.
-
Open TCP port you will use in your network.
-
Fill your config.php with your information (database credentials, host, ip...)
Create new php file (eg: run.php) and paste this code:
/*Initialize the server and it will start getting data from device,
parsing it and storing it into the database
*/
$server = new SocketServer(Conf::host, Conf::port);
$server->runServer();
Execute that php file:
php run.php
Server will start getting data from device.
-
Error with longitude (Maybe parsing or related to encoding with bytes?)(FIXED)