Problem receiving raw data from GpsGate

koceto809 years ago

Hi,
first of all thank you Anton for this impressive software.
Currently i have 2 devices VT310 and they work very well with GpsGate but i want to migrate to Traccar. So i use gpsgate plugin Data Forward to send the raw data to traccar for initial testing purposes. At the beginning everything works good but after different period of time traccar hangs with error:

2015-10-15 21:19:54 DEBUG: [57A96510: 5009 < 192.168.1.100] HEX: 242400113fffffffffffff500041690d0a
2015-10-15 21:19:54 WARN: [57A96510] error - NullPointerException (BasePipelineFactory:73 < ... < MeiligaoProtocolDecoder:131 < *:160 < ExtendedObjectDecoder:39 < ...)

And stops receiving any data. Gpsgate continues to work without a problem. When i restart traccar the problem is solved. Sometimes it crashes after 5 minutes, sometimes after 4-5 hours.
I compile the latest source code - problem remains.
Thank you in advance!
Konstantin

Anton Tananaev9 years ago

I need protocol documentation for your device to check what this type of message means and how to decode it correctly.

koceto809 years ago

I got it:
http://www.nikodima.com/gps/GPRS_Communication_Protocol_GT30i%20GT60%20VT300%20VT310%20VT400_V2.00_20110414.pdf

Just compared the log files of both servers:

Traccar:

2015-10-16 12:43:19 DEBUG: [70EA7FBE: 5009 < 192.168.1.100] HEX: 2424007f3fffffffffffff99553039343331372e3030302c412c343231322e333438312c4e2c30323432302e303533332c452c31362e34322c38372c3136313031352c2c2a30397c312e317c3233337c323030307c303030392c303030357c303131433030303530423835383743327c31337c3037374539383745010c0d0a
2015-10-16 12:43:20  INFO: [70EA7FBE] id: 2, time: Fri Oct 16 12:43:17 EEST 2015, lat: 42.205801666666666, lon: 24.334221666666668, speed: 16.42, course: 87.0
2015-10-16 12:43:29 DEBUG: [70EA7FBE: 5009 < 192.168.1.100] HEX: 242400803fffffffffffff99553039343332372e3030302c412c343231322e333238322c4e2c30323432302e313135332c452c32302e39352c3134312c3136313031352c2c2a33387c312e317c3233317c323030307c303030372c303030357c303131433030303530423835383743327c31337c3037374539384234b7440d0a
2015-10-16 12:43:30  INFO: [70EA7FBE] id: 2, time: Fri Oct 16 12:43:27 EEST 2015, lat: 42.20547, lon: 24.335255, speed: 20.95, course: 141.0
2015-10-16 12:43:40 DEBUG: [70EA7FBE: 5009 < 192.168.1.100] HEX: 242400803fffffffffffff99553039343333372e3030302c412c343231322e323732352c4e2c30323432302e313633392c452c32342e38302c3135302c3136313031352c2c2a33427c302e397c3232377c323030307c303030372c303030367c303131433030303530423835383743327c31337c303737453939344283300d0a
2015-10-16 12:43:40  INFO: [70EA7FBE] id: 2, time: Fri Oct 16 12:43:37 EEST 2015, lat: 42.204541666666664, lon: 24.336065, speed: 24.8, course: 150.0
2015-10-16 12:43:51 DEBUG: [70EA7FBE: 5009 < 192.168.1.100] HEX: 242400803fffffffffffff99553039343334372e3030302c412c343231322e323036382c4e2c30323432302e323232312c452c33312e34352c3134352c3136313031352c2c2a33357c302e397c3232347c323030307c303030382c303030377c303131433030303530423835383743327c31337c3037374539393943f7960d0a
2015-10-16 12:43:51  INFO: [70EA7FBE] id: 2, time: Fri Oct 16 12:43:47 EEST 2015, lat: 42.203446666666665, lon: 24.337035, speed: 31.45, course: 145.0
2015-10-16 12:44:10 DEBUG: [70EA7FBE: 5009 < 192.168.1.100] HEX: 242400113fffffffffffff500041690d0a
2015-10-16 12:44:10  WARN: [70EA7FBE] error - NullPointerException (BasePipelineFactory:73 < ... < MeiligaoProtocolDecoder:131 < *:160 < ExtendedObjectDecoder:39 < ...)

GpsGate:

[16.10.2015 г. 12:43:46 ч.] (149.62.200.182:65301/Meiligao/udp) Report: (24.3399316666667, 42.201455, 218) (15.72, 119) (10/16/2015 9:44:07 AM)(Low Battery=False x)(Speed=15.72 x) x

[16.10.2015 г. 12:43:45 ч.] (149.62.200.182:65301/Meiligao/udp) Client: $$[0x00][0x80]?[0xFF][0xFF][0xFF][0xFF][0xFF][0xFF][0x99]U094407.000,A,4212.0873,N,02420.3959,E,30.55,119,161015,,*3A|0.9|218|2000|0009,0007|011C00050B8587BF|13|077E9B34[0xAA][0x16][0x0D][0x0A]

[16.10.2015 г. 12:43:45 ч.] (149.62.200.182:65301/Meiligao/udp) Server: @@[0x00][0x12]?[0xFF][0xFF][0xFF][0xFF][0xFF][0xFF]@[0x00][0x01]#[0x9D][0x0D][0x0A]

[16.10.2015 г. 12:43:45 ч.] (149.62.200.182:65301/Meiligao/udp) Client: $$[0x00][0x11]?[0xFF][0xFF][0xFF][0xFF][0xFF][0xFF]P[0x00]Ai[0x0D][0x0A]

[16.10.2015 г. 12:43:26 ч.] (149.62.200.182:65301/Meiligao/udp) Report: (24.337035, 42.2034466666667, 224) (16.18, 145) (10/16/2015 9:43:47 AM)(Low Battery=False x)(Speed=16.18 x)

[16.10.2015 г. 12:43:26 ч.] (149.62.200.182:65301/Meiligao/udp) Client: $$[0x00][0x80]?[0xFF][0xFF][0xFF][0xFF][0xFF][0xFF][0x99]U094347.000,A,4212.2068,N,02420.2221,E,31.45,145,161015,,*35|0.9|224|2000|0008,0007|011C00050B8587C2|13|077E999C[0xF7][0x96][0x0D][0x0A]

[16.10.2015 г. 12:43:15 ч.] (149.62.200.182:63838/Meiligao/udp) Report: (24.336065, 42.2045416666667, 227) (12.76, 150) (10/16/2015 9:43:37 AM)(Low Battery=False x)(Speed=12.76 x)

[16.10.2015 г. 12:43:15 ч.] (149.62.200.182:63838/Meiligao/udp) Client: $$[0x00][0x80]?[0xFF][0xFF][0xFF][0xFF][0xFF][0xFF][0x99]U094337.000,A,4212.2725,N,02420.1639,E,24.80,150,161015,,*3B|0.9|227|2000|0007,0006|011C00050B8587C2|13|077E994B[0x83]0[0x0D][0x0A]

[16.10.2015 г. 12:43:04 ч.] (149.62.200.182:63838/Meiligao/udp) Report: (24.335255, 42.20547, 231) (10.78, 141) (10/16/2015 9:43:27 AM)(Low Battery=False x)(Speed=10.78 x)

[16.10.2015 г. 12:43:04 ч.] (149.62.200.182:63838/Meiligao/udp) Client: $$[0x00][0x80]?[0xFF][0xFF][0xFF][0xFF][0xFF][0xFF][0x99]U094327.000,A,4212.3282,N,02420.1153,E,20.95,141,161015,,*38|1.1|231|2000|0007,0005|011C00050B8587C2|13|077E98B4[0xB7]D[0x0D][0x0A]

It seems that gpsgate respond with the message:
[16.10.2015 г. 12:43:45 ч.] (149.62.200.182:65301/Meiligao/udp) Server: @@[0x00][0x12]?[0xFF][0xFF][0xFF][0xFF][0xFF][0xFF]@[0x00][0x01]#[0x9D][0x0D][0x0A]

But traccar hangs :(
Hope this will help.
Thanks.

koceto809 years ago

So, according the protocol documentation the server responds to the login request from the gps unit. Could it be the problem because traccar tries to respond to the gpsgate server which is actually not the gps unit?

Anton Tananaev9 years ago

I have found and fixed one problem. Please try this build:

https://www.dropbox.com/s/myt68q5u7fiz49r/tracker-server-jar-with-dependencies.jar?dl=0

koceto809 years ago

The same error :(

2015-10-17 12:53:45 DEBUG: [E263F54C: 5009 < 192.168.1.100] HEX: 242400803fffffffffffff99553039353333392e3030302c412c343231312e393031312c4e2c30323431392e323830382c452c31362e37322c3131382c3137313031352c2c2a33387c312e317c3231377c323030307c303030372c303030367c303131433030303530423835383539317c31307c30373832453145328ef70d0a
2015-10-17 12:53:45  INFO: [E263F54C] id: 2, time: Sat Oct 17 12:53:39 EEST 2015, lat: 42.19835166666667, lon: 24.321346666666667, speed: 16.72, course: 118.0
2015-10-17 12:53:47 DEBUG: [E263F54C: 5009 < 192.168.1.100] HEX: 242400113fffffffffffff500041690d0a
2015-10-17 12:53:47  WARN: [E263F54C] error - NullPointerException (BasePipelineFactory:73 < ... < MeiligaoProtocolDecoder:131 < *:160 < ExtendedObjectDecoder:39 < ...)
Anton Tananaev9 years ago
koceto809 years ago

Now the problem is different:

2015-10-18 14:14:10 DEBUG: [0C6CB356: 5009 < 192.168.1.100] HEX: 2424007f3fffffffffffff99553131313430382e3030302c412c343230372e323336332c4e2c30323434312e323138322c452c382e33302c3235322c3138313031352c2c2a30377c312e307c3138397c323030307c303030382c303030377c303131433030303530443738383541447c30417c30373837323343305d210d0a
2015-10-18 14:14:10  INFO: [0C6CB356] id: 2, time: Sun Oct 18 14:14:08 EEST 2015, lat: 42.120605, lon: 24.68697, speed: 8.3, course: 252.0
2015-10-18 14:14:22 DEBUG: [0C6CB356: 5009 < 192.168.1.100] HEX: 2424007f3fffffffffffff99553131313431382e3030302c412c343230372e323331332c4e2c30323434312e313836372c452c392e30322c3235372c3138313031352c2c2a30357c312e307c3138367c323030307c303030412c303030377c303131433030303530443738383541447c30417c3037383732334637de400d0a
2015-10-18 14:14:22  INFO: [0C6CB356] id: 2, time: Sun Oct 18 14:14:18 EEST 2015, lat: 42.12052166666667, lon: 24.686445, speed: 9.02, course: 257.0
2015-10-18 14:14:27 DEBUG: [0C6CB356: 5009 < 192.168.1.100] HEX: 242400113fffffffffffff500041690d0a
2015-10-18 14:14:27 DEBUG: [0C6CB356: 5009 > null] HEX: 404000123fffffffffffff400001239d0d0a
2015-10-18 14:14:27  WARN: [0C6CB356] error - NotYetConnectedException (... < MeiligaoProtocolDecoder:131 < *:160 < ExtendedObjectDecoder:39 < ...)

If you think that it will take a lot of effort to fix this - leave it as is. I'm sure that the code will work with directly connected gps units. Probably you have more important tasks to accomplish with traccar. Just wanted to be sure that these devices (VT310) are compatible with your tracking server. And now i am.
Thanks for your help and this useful software.
Konstantin

Anton Tananaev9 years ago

The problem was with UDP protocol. Originally for Meiligao only TCP was supported. Here is a new build:

https://www.dropbox.com/s/myt68q5u7fiz49r/tracker-server-jar-with-dependencies.jar?dl=0

koceto809 years ago

Now hangs with this:

2015-10-19 22:41:40 DEBUG: [73017927: 5009 < 192.168.1.100] HEX: 242400803fffffffffffff99553139343133382e3030302c412c343231302e363339382c4e2c30323432382e323030302c452c33362e33382c3237342c3139313031352c2c2a33457c312e307c3230347c323030307c303030392c303030357c303131433030303530423839374438337c30467c3037384430313637589f0d0a
2015-10-19 22:41:40  INFO: [73017927] id: 2, time: Mon Oct 19 22:41:38 EEST 2015, lat: 42.17733, lon: 24.47, speed: 36.38, course: 274.0
2015-10-19 22:41:50 DEBUG: [73017927: 5009 < 192.168.1.100] HEX: 242400803fffffffffffff99553139343134382e3030302c412c343231302e363437362c4e2c30323432382e303438352c452c33372e34382c3237342c3139313031352c2c2a33337c312e307c3230347c323030307c303030422c303030377c303131433030303530423839374438337c30467c303738443031454242880d0a
2015-10-19 22:41:50  INFO: [73017927] id: 2, time: Mon Oct 19 22:41:48 EEST 2015, lat: 42.17746, lon: 24.467475, speed: 37.48, course: 274.0
2015-10-19 22:43:50  INFO: [73017927] timed out

Not receiving any data after that. Just restart fixes it. Any ideas?
Thanks

Anton Tananaev9 years ago

If you don't see any HEX messages in the log, it means device or your GpsGate doesn't send it.

koceto809 years ago

My mistake. I put meiligao.resetDelay with value 120 in the config a couple of days ago for testing. Now i erase it and everything is OK :)
Thanks Anton for the help.

Anton Tananaev9 years ago

For UDP protocols Traccar uses a single channel object (because there are no connections). What happens is that reserDelay closes that channel and you are not able to receive any more data.