GPS 103 clone from Ningmore

kolaf3 years ago

Hi,

I just ordered and received a 4G tracking device from Ningmore through Alibaba, https://www.alibaba.com/product-detail/4G-GPS-Tracker-TK10C-Super-Magnetische_1600112099013.html?spm=a2756.order-detail-ta-bn-b.0.0.75352fc2nT5gml

It is branded as an TK970 or LK970, none of which seem to have very good documentation. It turns out that although the protocol is initially recognised by traccar as h02, there is a difference somewhere that breaks parsing. This is an example position report:

2a48512c353937303030303032362c56312c3136303832382c412c363032332e313533302c4e2c313131362e303735382c452c3030302e31362c3138322c3033313232302c46464646464246462c3234322c30312c313135313230302c346565392c3623

as ascii:  *HQ,5970000026,V1,160828,A,6023.1530,N,1116.0758,E,000.16,182,031220,FFFFFBFF,242,01,1151200,4ee9,6#

Has anyone seen this device before and are working on supporting it? It looks like it should not be very difficult to add support for it, I have already received the protocol specification from the supplier. I foresee some difficulties since the start of the message is identical to h02, but maybe it is possible to expand the existing protocol to support this one as well? Parsing throws a unexpected length error:

2020-12-03 16:09:29  INFO: [cfa99126: gps103 < 77.18.60.16] HEX: 2a48512c353937303030303032362c56312c3136303932372c412c363032332e313436382c4e2c313131362e303732332c452c3030302e31382c313930
2c3033313232302c46464646464246462c3234322c30312c313135313230302c346565392c3623
2020-12-03 16:09:29  WARN: [cfa99126] error - String index out of range: 24 - StringIndexOutOfBoundsException (... < Gps103ProtocolDecoder:413 < ExtendedObjectDecoder:52 < ... < WrapperContext:102 < ...)

It would be great if it is a quick fix to add support for this. If this is something that is triple for someone to do on my behalf than I am happy to send you the protocol specification. Otherwise, I can try to build support for it myself, but some hints as to how I should go about dealing with the protocol similarities would be a good start.

Thanks

Anton Tananaev3 years ago

It looks like you correctly identified the protocol, but then for some reason providing a log with the wrong port. I'm confused.

kolaf3 years ago

I'm not sure what you mean about the wrong port? I configured the device to connect to my server on port 5001, and it seems to have connected fine. Should I have used a different port?

Anton Tananaev3 years ago

Yes, of course. Each protocol has its own dedicated port:

https://www.traccar.org/devices/

Protocol H02 uses port 5013, protocol GPS103 uses port 5001.

kolaf3 years ago

I see. I will change the port and report back. Thanks.

kolaf3 years ago

Brilliant, I now see it on the map. Shame on me for not reading the documentation carefully enough.

Peter3 years ago

I have such a clone too, marked as TK970. I'm trying to set the adminip, but it keeps telling me "invalid cmd!". I'm using: adminip123456 1.2.3.4 5001

How did you manage to get this to work?

Sending "param1" as SMS tells me:
LK970_4G_ZX_V26,20201123,id,XXXXX,IP,a.lkgps.net:7700,domain,a.lkgps.net:7700,apn:XXXX user: password:,S01,F2,vib:222
(where XXXX is replaced because of sensitive info)

netomx3 years ago

I would also like to know how, Peter.

Peter3 years ago

I've found it:

SZCS,pin,DOMAIN=ip,port

for example:

SZCS,123456,DOMAIN=1.2.3.4,7700

The device itself has giving me headaches getting to work properly though. I would like to have it send a "hello" every day (86400 secs) and start sending when movement is detected en stopping when movement stops.

I've tried settings these settings with "upload" and "sleep" commands but it still does not do what it want it to do...

netomx3 years ago

On mine doesnt work. I have sent a message to the seller, I hope he answers.

netomx3 years ago

@peter, are you sure you are talking about the same tracker?

netomx3 years ago

@Peter and everyone else:

The correct param is:

SZCS,pin,DOMAIN=ip:port

Example:

SZCS,123456,DOMAIN=mytracker.tld:5013