Command result for H02 protocol

deepsheet3 years ago

Is there any way we can get command results for h02 (port 5013) protocol devices in Traccar? We can send commands using the UI, and responses (in hex) can be seen in the console, but it would be a lot easier if we could get the command output as a notification.

Anton Tananaev3 years ago

What does the result look like?

deepsheet3 years ago

Here are some examples:

Setting timezone with wrong password:

2022-05-16 19:11:36  INFO: [de31510b: h02 > 10.42.1.1] HEX: 38393631323334453033
2022-05-16 19:11:37  INFO: [de31510b: h02 < 10.42.1.1] HEX: 2a48512c313233343536373839302c34d532c534554204552524f5223

Setting timezone with correct password:

2022-05-16 19:15:32  INFO: [96013f72: h02 > 10.42.1.1] HEX: 38393630303030453033
2022-05-16 19:15:32  INFO: [96013f72: h02 < 10.42.1.1] HEX: 2a48512c313233343536373839302c34d532c534554204f4b23

It seems that some commands send more than one response. For example RCONF sends 3 of them. All responses seem to start with 2a48512c313233343536373839302c. Note that I have redacted the ID of my device from all the examples (replaced original 10-digit ID with 1234567890).

Hope that helps

Anton Tananaev3 years ago

Are you sure you didn't edit the log? Those are invalid HEXes.

deepsheet3 years ago

Sorry about that, I messed up the hexes. I can't edit the original message so here are the examples again:

Setting timezone with wrong password:

2022-05-16 20:31:07  INFO: [1b3a7045: h02 > 10.42.1.1] HEX: 38393631323334453033
2022-05-16 20:31:08  INFO: [1b3a7045: h02 < 10.42.1.1] HEX: 2a48512c313233343536373839302c534d532c534554204552524f5223

Setting timezone with correct password:

2022-05-16 20:33:00  INFO: [1b3a7045: h02 > 10.42.1.1] HEX: 38393630303030453033
2022-05-16 20:33:02  INFO: [1b3a7045: h02 < 10.42.1.1] HEX: 2a48512c313233343536373839302c534d532c534554204f4b23

They should decode fine now

Anton Tananaev3 years ago

Yeah, I don't think it's currently supported. The problem is also that it seems like the format depends on the command, so we would need to support all those commands.

Mubarak3 years ago

@deepsheet
Traccer mordern app display the result of commands as value of Status which you can find under more detail of a registered device. The command result is a 10 digit code that changes every time you send different command to the device. It is difficult to interpret the command result unless you have the protocol manual of your device. You can get the protocol manual from the manufacturer of your device or search it online.