Hello I have installed traccar with opengts , some devices are working fine .. but gt06 is not insert the position,
this the configuration file :
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'>
<properties>
<entry key='web.enable'>false</entry>
<entry key='web.port'>8082</entry>
<entry key='web.path'>/opt/traccar/web</entry>
<entry key='geocoder.enable'>false</entry>
<entry key='geocoder.type'>google</entry>
<entry key='decoder.ignoreSessionCache'>true</entry>
<entry key='processing.computedAttributes.enable'>true</entry>
<entry key='logger.enable'>true</entry>
<entry key='logger.level'>all</entry>
<entry key='logger.file'>/opt/traccar/logs/tracker-server.log</entry>
<entry key='database.driver'>com.mysql.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://localhost:3306/gts?allowMultiQueries=true</entry>
<entry key='database.user'>root</entry>
<entry key='database.password'>root</entry>
<entry key='database.refreshDelay'>300</entry>
<entry key='database.updateLatestPosition'>
START TRANSACTION;
UPDATE Device SET lastValidLatitude = :latitude, lastValidLongitude = :longitude,lastValidHeading = :course, lastValidSpeedKPH = :speed * 1.852, lastGPSTimestamp = UNIX_TIMESTAMP(:fixTime), lastUpdateTime = UNIX_TIMESTAMP(NOW()) WHERE imeiNumber = SUBSTRING(CAST(:deviceId AS CHAR(32)), 2);
COMMIT;
</entry>
<entry key='database.selectDevices'>
SELECT CONCAT('1', imeiNumber) AS id, imeiNumber AS uniqueId FROM Device WHERE imeiNumber REGEXP '^[0-9]+$';
</entry>
<entry key='database.selectAllDevices'>
SELECT CONCAT('1', imeiNumber) AS id, imeiNumber AS uniqueId FROM Device WHERE imeiNumber REGEXP '^[0-9]+$';
</entry>
<entry key='database.insertPosition'>
START TRANSACTION;
UPDATE Device SET lastValidLatitude = :latitude, lastValidLongitude = :longitude,lastValidHeading = :course, lastValidSpeedKPH = :speed * 1.852, lastGPSTimestamp = UNIX_TIMESTAMP(:fixTime), lastUpdateTime = UNIX_TIMESTAMP(NOW()) WHERE imeiNumber = SUBSTRING(CAST(:deviceId AS CHAR(32)), 2);
SELECT @accountID := accountID, @deviceID := deviceID FROM Device WHERE imeiNumber = SUBSTRING(CAST(:deviceId AS CHAR(32)), 2);
INSERT INTO EventData (accountID, deviceID, timestamp, statusCode, latitude, longitude, speedKPH, heading, altitude, rawData, creationTime, address)
VALUES (@accountID, @deviceID, UNIX_TIMESTAMP(:fixTime), 0, :latitude, :longitude, :speed * 1.852, :course, :altitude, '', UNIX_TIMESTAMP(NOW()), :address, :alarm) ON DUPLICATE KEY UPDATE accountID= @accountID, deviceID= @deviceID, timestamp= UNIX_TIMESTAMP(:fixTime), statusCode = 0, latitude= :latitude, longitude= :longitude, speedKPH= :speed , heading=:course, altitude= :altitude, rawData='', creationTime= UNIX_TIMESTAMP(NOW()), address = :address;
COMMIT;
</entry>
<entry key='hunterpro.port'>22000</entry>
<entry key='gt06.port'>5050</entry>
</properties>
and this is some log :
2018-08-18 19:04:09 INFO: Starting server...
2018-08-18 19:05:04 INFO: [A6510E6D] connected
2018-08-18 19:05:04 DEBUG: [A6510E6D: 5050 < 197.252.2.201] HEX: 78780d0103537010920124140007125d0d0a
2018-08-18 19:05:04 DEBUG: [A6510E6D: 5050 > 197.252.2.201] HEX: 787805010007bcea0d0a
2018-08-18 19:05:05 DEBUG: [A6510E6D: 5050 < 197.252.2.201] HEX: 78780a134406040002000820150d0a
2018-08-18 19:05:05 DEBUG: [A6510E6D: 5050 < 197.252.2.201] HEX: 78781f12120812110105c401adf892037c54ec005413027a0703f00034730009f4790d0a
2018-08-18 19:06:08 INFO: [19EC9B60] connected
2018-08-18 19:06:08 DEBUG: [19EC9B60: 5050 < 197.252.3.110] HEX: 78780d010353701092028451000792670d0a
2018-08-18 19:06:08 DEBUG: [19EC9B60: 5050 > 197.252.3.110] HEX: 787805010007bcea0d0a
2018-08-18 19:06:09 DEBUG: [19EC9B60: 5050 < 197.252.3.110] HEX: 78780d01035370109202845100086a900d0a
2018-08-18 19:06:09 DEBUG: [19EC9B60: 5050 > 197.252.3.110] HEX: 787805010008441d0d0a
2018-08-18 19:06:10 DEBUG: [19EC9B60: 5050 < 197.252.3.110] HEX: 78780a134406030002000901400d0a
2018-08-18 19:06:11 DEBUG: [19EC9B60: 5050 < 197.252.3.110] HEX: 78781f12120812110224c601a879ba037c66b000550c027a0703ed00294c000a6e5d0d0a
2018-08-18 19:06:13 DEBUG: [19EC9B60: 5050 < 197.252.3.110] HEX: 78780a134406030002000b22520d0a
2018-08-18 19:08:08 INFO: [3BA99AF7] connected
2018-08-18 19:08:13 DEBUG: [3BA99AF7: 22000 < 197.252.0.194] HEX: 3e343030343c244750524d432c3137303830392e3030302c412c313533342e363136342c4e2c30333233302e393433362c452c302e30332c38312e30392c3138303831382c2c2c4135452c257b303030303134303f31323036222c304d490d
2018-08-18 19:08:13 INFO: [3BA99AF7] id: 4004, time: 2018-08-18 18:08:09, lat: 15.57694, lon: 32.51573, speed: 0.0, course: 81.1
2018-08-18 19:08:18 DEBUG: [3BA99AF7: 22000 < 197.252.0.194] HEX: 3e343030343c244750524d432c3137303830392e3030302c412c313533342e363136342c4e2c30333233302e393433362c452c302e30332c38312e30392c3138303831382c2c2c4135452c257b303030303134303f31323036222c304d490d
2018-08-18 19:08:18 INFO: [3BA99AF7] id: 4004, time: 2018-08-18 18:08:09, lat: 15.57694, lon: 32.51573, speed: 0.0, course: 81.1
2018-08-18 19:08:23 DEBUG: [3BA99AF7: 22000 < 197.252.0.194] HEX: 3e343030343c244750524d432c3137303832302e3030302c412c313533342e363136332c4e2c30333233302e393433362c452c302e30352c38312e30392c3138303831382c2c2c4135342c257b303030303134303f31323036222c304d490d
2018-08-18 19:08:23 INFO: [3BA99AF7] id: 4004, time: 2018-08-18 18:08:20, lat: 15.57694, lon: 32.51573, speed: 0.1, course: 81.1
please note the device at port 22000 is working fine, but device at port 5050 which is (gt06 default port 5023 ) can fined the device in the database but cannot insert
any help ?
Thank you
Hello I have installed traccar with opengts , some devices are working fine .. but gt06 is not insert the position,
this the configuration file :
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE properties SYSTEM 'http://java.sun.com/dtd/properties.dtd'> <properties> <!-- SERVER CONFIG --> <entry key='web.enable'>false</entry> <entry key='web.port'>8082</entry> <entry key='web.path'>/opt/traccar/web</entry> <entry key='geocoder.enable'>false</entry> <entry key='geocoder.type'>google</entry> <entry key='decoder.ignoreSessionCache'>true</entry> <entry key='processing.computedAttributes.enable'>true</entry> <entry key='logger.enable'>true</entry> <entry key='logger.level'>all</entry> <entry key='logger.file'>/opt/traccar/logs/tracker-server.log</entry> <!-- Global configuration --> <entry key='database.driver'>com.mysql.jdbc.Driver</entry> <entry key='database.url'>jdbc:mysql://localhost:3306/gts?allowMultiQueries=true</entry> <entry key='database.user'>root</entry> <entry key='database.password'>root</entry> <entry key='database.refreshDelay'>300</entry> <entry key='database.updateLatestPosition'> START TRANSACTION; UPDATE Device SET lastValidLatitude = :latitude, lastValidLongitude = :longitude,lastValidHeading = :course, lastValidSpeedKPH = :speed * 1.852, lastGPSTimestamp = UNIX_TIMESTAMP(:fixTime), lastUpdateTime = UNIX_TIMESTAMP(NOW()) WHERE imeiNumber = SUBSTRING(CAST(:deviceId AS CHAR(32)), 2); COMMIT; </entry> <entry key='database.selectDevices'> SELECT CONCAT('1', imeiNumber) AS id, imeiNumber AS uniqueId FROM Device WHERE imeiNumber REGEXP '^[0-9]+$'; </entry> <entry key='database.selectAllDevices'> SELECT CONCAT('1', imeiNumber) AS id, imeiNumber AS uniqueId FROM Device WHERE imeiNumber REGEXP '^[0-9]+$'; </entry> <entry key='database.insertPosition'> START TRANSACTION; UPDATE Device SET lastValidLatitude = :latitude, lastValidLongitude = :longitude,lastValidHeading = :course, lastValidSpeedKPH = :speed * 1.852, lastGPSTimestamp = UNIX_TIMESTAMP(:fixTime), lastUpdateTime = UNIX_TIMESTAMP(NOW()) WHERE imeiNumber = SUBSTRING(CAST(:deviceId AS CHAR(32)), 2); SELECT @accountID := accountID, @deviceID := deviceID FROM Device WHERE imeiNumber = SUBSTRING(CAST(:deviceId AS CHAR(32)), 2); INSERT INTO EventData (accountID, deviceID, timestamp, statusCode, latitude, longitude, speedKPH, heading, altitude, rawData, creationTime, address) VALUES (@accountID, @deviceID, UNIX_TIMESTAMP(:fixTime), 0, :latitude, :longitude, :speed * 1.852, :course, :altitude, '', UNIX_TIMESTAMP(NOW()), :address, :alarm) ON DUPLICATE KEY UPDATE accountID= @accountID, deviceID= @deviceID, timestamp= UNIX_TIMESTAMP(:fixTime), statusCode = 0, latitude= :latitude, longitude= :longitude, speedKPH= :speed , heading=:course, altitude= :altitude, rawData='', creationTime= UNIX_TIMESTAMP(NOW()), address = :address; COMMIT; </entry> <entry key='hunterpro.port'>22000</entry> <entry key='gt06.port'>5050</entry> </properties>
and this is some log :
please note the device at port 22000 is working fine, but device at port 5050 which is (gt06 default port 5023 ) can fined the device in the database but cannot insert
any help ?
Thank you