Mobicom G102 Chines device protocol implementation

oyhan3 years ago

Hi
We are using the Mobicom G102 (http://www.mobicomtracking.com/productinfo/46804.html) device for our former clients and need to move to Traccar. So we need this type of device worked on the Traccar.
I don't know is there any implementation ready to use or similar protocols to adopt from.
I didn't find the documentation helpful enough for me to implement the protocol myself.
There are is "Login Message" and many types of commands provided by the vendor tracker document that should be for example some responses to be returned from server to the tracker and tracker starts to send position data to the server.
I don't know how to do it in Protocol and Decoder classes.
Thanks for your directions

Anton Tananaev3 years ago

A lot of protocols have a login and many other messages. Do you have protocol documentation?

oyhan3 years ago

Yes very good documentation is available

oyhan3 years ago
oyhan3 years ago

Can you provide a sample that has the similar handshakes and where to implement this logic

Anton Tananaev3 years ago

What you provided is a user manual, not protocol documentation.

oyhan3 years ago
Anton Tananaev3 years ago

It looks like KHD protocol. Have you already tried it?

oyhan3 years ago

Yeah !!
I checked the protocol it seems the same.
I'll try today.
Thank you Anton

oyhan3 years ago

There comes an error in halfway.
Here is the lifetime of connection

2021-07-31 08:28:07  INFO: [9a5686fb] connected
2021-07-31 08:28:07  INFO: [9a5686fb: khd < 5.124.204.193] HEX: 2929b10007258b8c100c880d
2021-07-31 08:28:07  INFO: [9a5686fb: khd > 5.124.204.193] HEX: 292921000588b10c110d
2021-07-31 08:28:32  INFO: [9a5686fb: khd < 5.124.204.193] HEX: 2929800028258b8c10210731035840031534240542120200000337fb000000ffff5a00000a0000000005005d0d
2021-07-31 08:28:32  WARN: [9a5686fb] error - class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap') - ClassCastException (CommandResultEventHandler:33 < BaseEventHandler:29 < BaseDataHandler:27 < ...)
2021-07-31 08:28:32  INFO: [9a5686fb] disconnected
Anton Tananaev3 years ago

Try version from master branch.

oyhan3 years ago

Still the error insists

Anton Tananaev3 years ago

Same error?

oyhan3 years ago

Is it possible that the Chinese vendor has changed the protocol a bit?

oyhan3 years ago
error - class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap') - ClassCastException (CommandResultEventHandler:33 < BaseEventHandler:29 < BaseDataHandler:27 < ...)