Ask a question

3519 questions

4011 answers

2985 comments

29023 members

Ask a question
0 votes
62 views
in Vehicle tracking by

Hello,

(Device FMB640, but we guess it might be the same for all devices)

We've had some uncertainty parsing ,,Next calibration date" AVL parameter value.
In documentation it is written that value comes in 4 bytes and each byte represents different values separately. Image from docs in comments (because of character limiting...).

However, we found this to be incorrect. 
Real life example: 
We receive value for this parameter : 01100110 01100100 11110000 10000000.
By documentation, date values would be

  • Month (first byte): 01100110 (102 converted to decimal)
  • Day (second byte): 01100100 (100 converted to decimal)
  • Year (third byte): 01100100 (128 converted to decimal)

As You can see, it already does not make any sense. Neither 102 as a month or 100 as a day makes a legit value.

Then, we tried converting whole 4 byte value to unsigned 32-bit value and we got this number - 1717891200.
This number is already suspicious, because it looks like Unix timestamp in seconds. We tried converting that into Human readable time and got this date: 2024-06-09, which seems to be a legit value for ,,Next calibration date" parameter. 

In conclusion, we think that the value is not defined by bytes separately but by whole 4 byte unsigned integer as Unix timestamp. Can You confirm this theory? Maybe there should be an update of documentation too?


 

by

Image from documentation:

1 Answer

0 votes
by
Hello

Thank for your question

The information in Wiki is correct, but thank to your question we understand it may lead to misunderstoods about how to parse it properly. The way you parsed the data is correct, we will update our wiki page accordingly in order to avoid confussions.

So thanks again for your comment, we really appreciate it.

Best regads