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

Added code to huabao protocol to decode 0x0200 messages from mictrack B50 OBD trackers #4728

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kcsj17
Copy link

@kcsj17 kcsj17 commented Aug 24, 2021

Mictrack_Communication_Protocol_For_B50_V10.pdf

Added case for subtype 0xF3, based on attached protocol description.

@kcsj17 kcsj17 changed the title Added code to decode 0x0200 messages from mictrack B50 OBD trackers Added code to huabao protocol to decode 0x0200 messages from mictrack B50 OBD trackers Aug 24, 2021
Copy link
Member

@tananaev tananaev left a 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.

src/main/java/org/traccar/model/Position.java Outdated Show resolved Hide resolved
@@ -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;
Copy link
Member

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.

Copy link
Author

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

Copy link
Member

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.

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

Successfully merging this pull request may close these issues.

None yet

2 participants