Functionality Issues with the Topflytech T880X Protocol on Various Devices (e.g., TLW2-12BL)

Jaime Duardoa year ago

Hey everyone on Traccar!

I've noticed that the T880X protocol by Topflytech in Traccar could benefit from some improvements. We've had occasional issues with connection loss, and certain devices aren't compatible.

Topflytech provides a tool to test the protocol and simulate all messages, which you can find in the "Programs & Tools/TOPFLYtech Integration Checker/" directory. Access the tool here. They also offer server examples where protocol changes are updated, available here. These resources could help us understand and enhance the T880X protocol.

Has anyone else encountered these issues or have specific suggestions for improving the T880X protocol? Please share your ideas!

Thanks for your attention.

Best regards,

Anton Tananaeva year ago

What specifically is not working correctly?

Jaime Duardoa year ago

Topflytech has changed and extended several functionalities in its protocol, and I believe that's why there may be issues. For example, TLW2-BL series devices using protocol 0x25 seem to be confusing the "power" parameter with the "battery" parameter, and the latter is never displayed. Additionally, these devices connect and disconnect from the platform almost constantly, causing a high consumption of data from the SIM card. Devices like the TLD2-D, on the other hand, are decoded correctly but use protocol 0x26. T8808+ devices, which also use protocol 0x25, work correctly. Devices using protocol 0x23, such as T8808A, similarly connect and disconnect excessively, causing data consumption as high as 100MB in just a couple of days. Furthermore, there appear to be errors in the server log related to the protocol in some way.

2023-09-22 15:26:28  INFO: [T94bb4383] error - For input string: "005b" - NumberFormatException (... < T800xProtocolDecoder:394 < *:171 < ExtendedObjectDecoder:75 < ... < WrapperContext:102 < ...)
2023-09-22 15:26:28  INFO: [T94bb4383] error - For input string: "002d" - NumberFormatException (... < T800xProtocolDecoder:394 < *:171 < ExtendedObjectDecoder:75 < ... < WrapperContext:102 < ...)
Anton Tananaeva year ago

Do you have a HEX sample and the protocol documentation?

Jaime Duardoa year ago

Here is all the official documentation for the Topflytech protocol, provided by the manufacturer and you can see all the documents in Excel format. Additionally, this is the official Topflytech GitHub repository where you can find codecs in various programming languages, such as Java. There is also an online decoder on their website for analyzing payloads in hexadecimal format.

The tool "TOPFLYtech Integration Checker V1.1.exe," available on the FTP link provided by the manufacturer, allows you to test different device models as well as each of the messages (e.g., login, hbt, location, alarm, etc.).

Jaime Duardoa year ago

TLW2-12BL 0x25 protocol:

25251300594a1b0869738060144917003c0e101e03e85a2dc8c00005070000410000000000000000000000005b000003a5b45e00230919102252e3a5094288fabfc0e98b15420000010403921352ffff0000001cffffffffff25251300594a1c0869738060144917003c0e101e03e85a2ac7c00005070000410000000000000000000000002d000003a5b48b002309191023522d320642abfebfc0e98b15420000010c03921345ffff0000001bffffffffff25251300594a1d0869738060144917003c0e101e03e85a1ac9c000050700004100000000000000000000000024000003a5b4af00230919102452b81ef9410002c0c0ec8b15420108011403911345ffff0000001dffffffffff25251300594a1e0869738060144917003c0e101e03e85a3ec7c00005070000410000000000000000000000000e000003a5b4bd002309191025060ad7ec41da02c0c0058c15420084016303921345ffff0000001cffffffffff25251300594a1f0869738060144917003c0e101e03e85a3ec7c020050700004100000000000000000000000005000003a5b4c2002309191025090e2deb410203c0c0108c15420089014303921338ffff0000001dffffffffff25251300594a200869738060144917003c0e101e03e85a1ec5c000050700004100000000000000000000000020000003a5b4e20023091910260948e1bc412205c0c0458c15420040013603921355ffff0000001bffffffffff25251300594a210869738060144917003c0e101e03e85a00c5c020050700004100000000000000000000000000000003a5b4e20023091910270948e1bc412205c0c0458c15420040013603911332ffff0000001dffffffffff

TLD2-D 0x26 protocol:

2626020053d59d0867730054055722001404b01e00c800644ac000050000c840040004001b7e150023092216254968918ac102c48ec057c41242006400c713470000000000e0ffffffffffffffffffffffffff

T8808-B 0x23 protocol:

232304004200080351905060226920001e0e101e03e80000488000050100c840000120012019000171e87a002309221635096aa01fc246c48ec022c41242000000c9

Regarding protocol 0x23, it's important to note that after responding to the login message, you need to reply to a preceding heartbeat message. If you don't do this, it will disconnect and attempt the process again.

Jaime Duardoa year ago

Password for all protocol documents is "topflytech"

Anton Tananaeva year ago
Jaime Duardoa year ago

Thank you for your time, Anton. I will try the changes and provide you with feedback as soon as possible.

Jaime Duardoa year ago

Hello again, the issue with the "power" and "battery" parameters persists in Topflytech devices using the 0x2525 protocol. As mentioned before, there are two groups of devices that share the 0x2525 header. The first series devices (such as T8808+ and TLW1) use a message type for position of type 02, while the more recent series (like TLW2, PioneerX100, etc.) use a message type for position of type 13.
Example of TLW1 series with message location type 02. In this case, it can be seen that the last 4 bytes match the external power supply voltage in mV, which is 1249.

25250200441b940865284040333704003c02581e07d03c6448c00005010064002000000000000004eeae80002309270914060000000059dd9dc075081242000000001249

Example of TLW2 series with message location type 13. In this case, the segment of the frame, 03680462 corresponds to the "battery" parameter, with 0368 representing 3.68 mV, and the "power" parameter corresponding to the voltage of the external source, with 0462 representing 4.62 mV in this instance.

252513005915190869738060133985001404b00a0064005048c0000400000080010000ffffffffffff0000000000000011d3e217230927091704c5205e41bfcd8dc05dd412420000009403680462ffff00000023ffffffffff
Jaime Duardoa year ago

¿Will this be fixed at some point? Not to mention that devices with the 0x23 protocol from topflytech, such as T8808-A or T8808-B, don't work at all since they can exceed 100MB in just a couple of days.

Anton Tananaeva year ago

At some point probably.

Jaime Duardoa year ago

This is an example with a device using protocol 0x23 where you can see the login message and the incorrect response sent by the server. The two bytes in the response corresponding to the login serial number should always be 0001 according to the manufacturer's documentation (page 0x230x230x01). It is clear from the server's response that it is 0005. The documentation also states that as long as the login is not responded to correctly, the device will keep trying to connect indefinitely, potentially causing high mobile data usage.

2023-09-30 20:17:09  INFO: [Te244f85e: t800x < 95.129.20.22] 232301001500050351905060226920150208625020
2023-09-30 20:17:09  INFO: [Te244f85e: t800x > 95.129.20.22] 232301000f00050351905060226920
Jaime Duardoa year ago

Well, we will try to solve it, thank you anyway.

Anton Tananaeva year ago

Send us a pull request if you do.