Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GL200: GTINF decoding #2402

Closed
Abyss777 opened this issue Oct 4, 2016 · 22 comments
Closed

GL200: GTINF decoding #2402

Abyss777 opened this issue Oct 4, 2016 · 22 comments

Comments

@Abyss777
Copy link
Collaborator

Abyss777 commented Oct 4, 2016

Hello,

I've got an GL300 device for a test and find out that current implementation of GTINF message decoder only for GV500 device. This type of message do not contain coordinates but have other valuable info.
I've investigated and found documentations for 7 devices that send 'GTINF' messages and they are very different.
Here is comparing table:
image
GTINF.xlsx

I'm pretty sure they can be identified by protocol version.
I'm still not good in PatternBuilder and will appreciate an advice if it is possible to combine in one pattern or it is better to use different?

@tananaev
Copy link
Member

tananaev commented Oct 4, 2016

Thanks for the comparison table. I will take a look as soon as I have time.

@tananaev
Copy link
Member

tananaev commented Oct 4, 2016

By the way, do you have message samples for each of those formats?

@Abyss777
Copy link
Collaborator Author

Abyss777 commented Oct 4, 2016

GL200
+RESP:GTINF,020102,135790246811220,,41,898600810906F8048812,16,0,0,0,,4.10,0,0,0,0,20100214013254,,,,+0800,0,20100214093254,11F0$
GL300
+RESP:GTINF,1A0800,860599000773978,GL300,41,89701016426133851978,17,0,1,26.6,,3.90,1,1,0,0,0,20161003184043,69,1,44,,,20161004040811,022C$
GL300W
+RESP:GTINF,2C0204,135790246811220,,41,898600810906F8048812,16,0,0,0,,4.10,0,0,0,0,20100214013254,,,,+0800,0,20100214093254,11F0$
GV200
+RESP:GTINF,040100,135790246811220,,16,898600810906F8048812,16,0,1,,0,4.4,0,0,0,0,20090214013254,13000,00,00,+0800,0,20090214093254,11F0$
GV300
+RESP:GTINF,060100,135790246811220,,16,898600810906F8048812,16,0,1,12000,,4.4,0,0,0,0,20090214013254,0,1300,2000,00,00,+0800,0,20090214093254,11F0$
GV500 is already in test
GMT100
+RESP:GTINF,080100,135790246811220,,16,898600810906F8048812,16,0,1,11870,,4.1,0,0,0,,20090214013254,,12340,,00,00,+0800,0,20090214093254,11F0$

GL300 from real device, other from documentation examples

GV500_Track_Air_Interface_Protocol_V106.160124626.pdf
GV300.pdf
GMT100.pdf
GV200.pdf
GL500.Tracker.Air.Interface.Protocol.V3.02_.pdf
GL300W.Tracker.Air.Interface.Protocol.V2.04_.pdf

They are from google.
GL300 i have in paper.
GL500 do not have GTINF. I attached just if you want put it on site

@Abyss777
Copy link
Collaborator Author

Abyss777 commented Oct 4, 2016

I've found GL300 documentation
GL300_Tracker_Air_Interface_Protocol_V102_decrypted.100131106.pdf

@tananaev
Copy link
Member

tananaev commented Oct 5, 2016

GL200 example doesn't seem to match the documentation. There are 4 zeroes between battery and time, but documentation says that there should be 5 values.

@tananaev
Copy link
Member

tananaev commented Oct 5, 2016

I have simplified the table a little bit to make it easier to write regex for it: GTINF.xlsx

I combined reserved fields with some data fields. So, if it's zero, we can ignore it, otherwise use value.

@Abyss777
Copy link
Collaborator Author

Abyss777 commented Oct 5, 2016

Looks like error in documentation example
image

@tananaev
Copy link
Member

tananaev commented Oct 6, 2016

Adding GL200 documentation here for easy access:

GL200 @Tracker Air Interface Protocol_V1.02.pdf

@tananaev
Copy link
Member

tananaev commented Oct 6, 2016

I did some more investigation and your table doesn't actually help because some fields are missing even though protocol supports it. Here is a new one:

GTINF_comparison.xlsx

From this it's much easier to make a regular expression to match all protocols.

@tananaev
Copy link
Member

tananaev commented Oct 6, 2016

OK, I think I've implemented as much as possible. Ignored some fields for now, but it should be fairly easy to enable them.

Looks like examples for GL200 and GL300W are incorrect, so I ignored them.

@Abyss777
Copy link
Collaborator Author

Abyss777 commented Oct 6, 2016

Are they totally missed (count of parameters less then should be) or omitted like ",,"?

Thanks for implementing it. I'll test it.
Sorry if spend your time on wrong table.

@tananaev
Copy link
Member

tananaev commented Oct 6, 2016

Both GL200 and GL300W have almost exactly the same example:

+RESP:GTINF,020102,135790246811220,,41,898600810906F8048812,16,0,0,0,,4.10,0,0,0,0,20100214013254,,,,+0800,0,20100214093254,11F0$
+RESP:GTINF,2C0204,135790246811220,,41,898600810906F8048812,16,0,0,0,,4.10,0,0,0,0,20100214013254,,,,+0800,0,20100214093254,11F0$

In the number of places they don't match documentation. The most obvious one is timezone; it shouldn't be there.

@Abyss777
Copy link
Collaborator Author

Abyss777 commented Oct 6, 2016

Nobodies like write documentation. Just copy-pasted. :)

https://github.com/tananaev/traccar/blob/master/src/org/traccar/protocol/Gl200ProtocolDecoder.java#L273 looks like debug string. It causes huge writes to logs started from:

2016-10-06 10:00:50  WARN: Unclosed group near index 5
(\).*
     ^ - PatternSyntaxException (... < PatternUtil:44 < Gl200ProtocolDecoder:287 < *:646 < ExtendedObjectDecoder:58 < ...)
2016-10-06 10:00:50  WARN: Unclosed character class near index 17
(\+RESP:GTINF,[).*
                 ^ - PatternSyntaxException (... < PatternUtil:44 < Gl200ProtocolDecoder:287 < *:646 < ExtendedObjectDecoder:58 < ...)
2016-10-06 10:00:50  WARN: Unclosed character class near index 18
(\+RESP:GTINF,[0).*
                  ^ - PatternSyntaxException (... < PatternUtil:44 < Gl200ProtocolDecoder:287 < *:646 < ExtendedObjectDecoder:58 < ...)
2016-10-06 10:00:50  WARN: Illegal character range near index 17
(\+RESP:GTINF,[0-).*
                 ^ - PatternSyntaxException (... < PatternUtil:44 < Gl200ProtocolDecoder:287 < *:646 < ExtendedObjectDecoder:58 < ...)
2016-10-06 10:00:50  WARN: Unclosed character class near index 20
(\+RESP:GTINF,[0-9).*
                    ^ - PatternSyntaxException (... < PatternUtil:44 < Gl200ProtocolDecoder:287 < *:646 < ExtendedObjectDecoder:58 < ...)

tananaev added a commit that referenced this issue Oct 6, 2016
@tananaev
Copy link
Member

tananaev commented Oct 6, 2016

Removed, thanks.

@tananaev
Copy link
Member

tananaev commented Nov 1, 2016

Added Prime AT Plus protocol to the mapping:

GTINF_comparison.xlsx

@onPointTracking
Copy link

onPointTracking commented Nov 3, 2016

Getting log errors / warnings with GV55VC on GTINF messages:

WARN Log.txt

@tananaev
Copy link
Member

tananaev commented Nov 3, 2016

@onPointTracking, the issue is already fixed.

@tananaev
Copy link
Member

Added GL300VC to the document.

GTINF_comparison.xlsx

@tananaev
Copy link
Member

tananaev commented Sep 4, 2017

Added CK300:

GTINF_comparison.xlsx

@tananaev
Copy link
Member

tananaev commented Sep 9, 2017

Uploaded to Google Docs:

Protocols

@tananaev
Copy link
Member

Adding GL300A documentation here:

GL300A @Track Air Interface Protocol R2.00.pdf

@tananaev
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants