Checksum MVT380 GPRS Protocol

Help
Anonymous
2012-11-11
2013-06-12

  • Anonymous
    2012-11-11

    Hi!, i'm working for an template for mvt380 Meitrack GPS, but I have a doubt with checksum calc, if you can read GPRS protocol  http://www.meitrack.net/images/protocols/MEITRACK_GPRS_PROTOCOL_V1.26.pdf , you can see this information:

    2 bytes. Indicating the sum of all data (exclude checksum itself and the ending character). It is in HEX
    String.
    $$<package
    flag><L>,<IMEI>,<command>,<data><*checksum>\r\n

    But I can't calc the correct checksum for this sample:

    @@Q25,353358017784062,A10*6A\r\n

    Why the checksum value is 6A, somebody can give me a hint for this calc please?

    Thanks is advance
    Pablo

     
  • Hi Pablo,

    From what I understand, you basically have to do the following:
    1. Find the ASCII code of all the characters from the first @ all the way to the * before the checksum
    2. Add all the ASCII codes together and convert to hex
    3. Take the two rightmost digits of the hex number, and that will be your checksum

    Here is a walk through of the sample you provided:

    @ 64
    @ 64
    Q 81
    2 50
    5 53
    , 44
    3 51
    5 53
    3 51
    3 51
    5 53
    8 56
    0 48
    1 49
    7 55
    7 55
    8 56
    4 52
    0 48
    6 54
    2 50
    , 44
    A 65
    1 49
    0 48
    * 42
    Total 1386 -> 56A (hex). Therefore, the checksum is 6A.
    

    Hope it helped.

    Kaashif