-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
(Bugfix-T800X Protocol) Fix messages response for 0x2323 #5192
Conversation
…sponse-for-0x2323 (Bugfix-T800X Protocol) Fix messages response for 0x2323
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.
You have to provide a description.
I have updated the PR. lemme know if you need more clarification. |
sendResponse(channel, header, type, index, imei, 0); | ||
|
||
if (header == 0x2323) { | ||
sendResponse(channel, header, type, 0x0001, imei, 0); |
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.
Can we send 1 for other devices as well?
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.
according the official documentation of the manufacturer, we believe that all devices use header 0x2323 will need to receive the serial 1
.
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 meant devices with other headers?
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 guess no, starting from header 0x2525 the serial will be computed depending on device info
We are testing some devices and I can confirm that it will not be the case in the following headers:
0x2525 gen 1 and gen 2
0x2626
0x2727
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.
Hello Anton, it's not possible; it only applies to devices with header 0x2323
. In other cases, you need to respond with the serial number that comes in the device's payload. The documentation regarding other headers from Topflytech can be found in the description of this pull request.
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.
OK, can we do something like this then: header == 0x2323 ? 1 : index
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.
Yeah sure, I'll add it
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.
done 👍
Description
The problem
The devices that use header
0x2323
can't establish a stable TCP connection which can lead to unexpected behavior because the devices don't receive the correct response from the server for login/heartbeat messages.The solution
According to the attached document, the devices of header
0x2323
are expecting the response to have the serial bytes to be0x00 0x01
in response messages.steps:
232301001500030[IMEI]150208625020
232301000f00010[IMEI]
which is the same message that the device sent. note that the serial bytes are0x00 0x01
232303000f00b50[IMEI]
232303000f00010[IMEI]
which is the same message that the device sent. note that the serial bytes are0x00 0x01
, the correct response has to be sent other wise the device will store cache of GPS/ALARM messages and send them again. (this will dramatically increase the telemetry data usage)notes:
0x2323
is EOL and we are not expecting new devices to use it. so, we are not expecting any side effects from this change.PR Checklist
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
References
TOPFLYTECH T880X Protocol V6.2
Credits
Jaime Duardo - Hardware Engineer
Abdelrahman Mousa - Software Engineer