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
Added code to huabao protocol to decode 0x0200 messages from mictrack B50 OBD trackers #4728
base: master
Are you sure you want to change the base?
Conversation
Added case for subtype 0xF3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments. We'll also need unit tests.
@@ -52,6 +52,8 @@ public HuabaoProtocolDecoder(Protocol protocol) { | |||
public static final int MSG_TERMINAL_REGISTER_RESPONSE = 0x8100; | |||
public static final int MSG_TERMINAL_CONTROL = 0x8105; | |||
public static final int MSG_TERMINAL_AUTH = 0x0102; | |||
public static final int MSG_TERMINAL_PARAM_QUERY_REPORT = 0x0107; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this one in the document.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The B50 device was sending the 0x0107 messages, but no position messages. I queried with the manufacturer. They replied with the following message, "0107 message type customers can not parse, but must reply to the generic answer, otherwise the device will think the server is abnormal and will not send location packets". The provided the following document,
0107 type message.pdf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case it probably makes sense to reorganize the code to reply to all messages with generic response.
Mictrack_Communication_Protocol_For_B50_V10.pdf
Added case for subtype 0xF3, based on attached protocol description.