TR02/GT02 Send Data Packet?

Anton Tananaev8 years ago

What is the command box? There is a "type" box where you need to select "custom command" from the dropdown menu, then you can enter actual command in the "custom command" box.

Neil Romig8 years ago

OK, perhaps we're getting somewhere! I am using Fedora 24 and Firefox browser, but when I click the command icon a box appears which I enter the command into. In 3.5 there was a drop-down selection for the predefined commands available which is now missing (though the drop-down arrow is still there). I presumed the absence of options implied custom command entry. Is this a bug in the interface?

Anton Tananaev8 years ago

Absence of any options means that no options are available for your device.

OK, I found and fixed the problem. The issue was that custom command was enabled only if protocol supported at least some commands.

Neil Romig8 years ago

Good news. Is there a build available to test?

Anton Tananaev8 years ago
Neil Romig8 years ago

I sent a command string &#x88&#x88&#x14&#x1c&#x12&#xff&#xff&#xff&#xffSTATUS,666666#&#x0d&#x0a and found the following in tracker-server.log:

2016-07-14 09:29:54 DEBUG: [80181E73: 5022 > 82.132.216.205]
2016-07-14 09:29:54  WARN: [80181E73] error - unsupported message type: class org.traccar.model.Command - IllegalArgumentException (...)
2016-07-14 09:29:54  INFO: [80181E73] disconnected
Anton Tananaev8 years ago

This one should work:

https://www.dropbox.com/s/cgmlansv32j3ii0/tracker-server.jar?dl=0

I have tested it locally. One thing to note, binary command should be in hex format.

Neil Romig8 years ago

Getting a 404 error on the above link.

Anton Tananaev8 years ago

Fixed the link.

Neil Romig8 years ago

I don't understand how to get this working!

I have sent the command string:

&#x88&#x88&#x14&#x1c&#x12&#xff&#xff&#xff&#xff&#x53&#x54&#x41&#x54&#x55&#x53&#x2c&#x38&#x33&#x33&#x36&#x36&#x34&#x23&#x0d&#x0a

and I get an error:

hexBinary needs to be even-length: ˆˆÿÿÿÿSTATUS,666666# - IllegalArgumentException (... < BaseProtocol:63 < ActiveDevice:61 < CommandResource:37 < ...)

If I add a character to the string (I added a hash on the end of the command) I get a different error:

contains illegal character for hexBinary: ˆˆÿÿÿÿSTATUS,666666## - IllegalArgumentException (... < BaseProtocol:63 < ActiveDevice:61 < CommandResource:37 < ...)

What am I doing wrong?

Anton Tananaev8 years ago

What you are sending is not HEX. It should look something like this:

8888141c12ff...
Neil Romig8 years ago

Success at last! But where does the result go to? I can see the return packet in the log file, but although I have ticked the box for "Send via Web" under "Notifications" I get no response.

Anton Tananaev8 years ago

Please provide fragment of tracker-server log file with request and response.

Neil Romig8 years ago

Here are a couple of samples:

2016-07-21 14:58:37 DEBUG: [96C6FA40: 5022 > 82.132.238.62] HEX: 8888151c1341504558414e474c455245502c4f4e2c3435230d0a
2016-07-21 14:58:41 DEBUG: [96C6FA40: 5022 < 82.132.238.62] HEX: 6868150000035889905895258400831c07415045584f4b210d0a

2016-07-21 13:41:50 DEBUG: [6A394DF4: 5022 > 82.132.222.186] HEX: 8888121c1041504558414e474c455245502c3330230d0a
2016-07-21 13:41:53 DEBUG: [6A394DF4: 5022 < 82.132.222.186] HEX: 68682d0000035889905895258400951c1f415045584572726f723a20506172616d65746572203120284f4e2f4f4646290d0a

If it is of any help, the units will ignore a command they don't understand (no reply is received at all), and if it disconnects before receiving the message again no reply is received. It is also possible to send a valid command which is ignored but I think this may be due to restrictions on reply length? e.g the PARAM, STATUS & URL commands are ignored. These are supposedly genuine Concox TR02 units using GT02 protocol, but I have my doubts!

Anton Tananaev8 years ago

I've added support for GT02 command responses. I guess you need to wait for next release because there were some changes to the database schema, so updating JAR file won't be enough.