+ Post New Thread
Results 1 to 7 of 7
  1. #1
    Newbie level 6
    Points: 2,071, Level: 10

    Join Date
    Feb 2005
    Posts
    14
    Helped
    0 / 0
    Points
    2,071
    Level
    10

    Hex string checksum calculation

    17 FE B3 50 02 B1 DE A8 0D E9 B6 D1 73
    17 70 B3 50 02 B8 DE BB 0D CA B6 57 42
    Both lines are Hex strings.The last two bytes are checksum values.Anybody can tell me the method how to calculate for that value.
    Thanks

    •   AltAdvertisement

        
       

  2. #2
    Full Member level 5
    Points: 3,715, Level: 14
    Achievements:
    7 years registered
    _Eduardo_'s Avatar
    Join Date
    Aug 2009
    Location
    Argentina
    Posts
    287
    Helped
    116 / 116
    Points
    3,715
    Level
    14

    Re: Hex string checksum calculation

    Only the last byte seem a checksum.

    byte13 = 3F ^ byte1 ^ byte2 ^ ..... ^ byte12

    ^ mean exclusive OR


    73 = 3F ^ 17 ^ FE ^ B3 ^ 50 ^ 02 ^ B1 ^ DE ^ A8 ^ 0D ^ E9 ^ B6 ^ D1


    2 members found this post helpful.

    •   AltAdvertisement

        
       

  3. #3
    Newbie level 6
    Points: 2,071, Level: 10

    Join Date
    Feb 2005
    Posts
    14
    Helped
    0 / 0
    Points
    2,071
    Level
    10

    Re: Hex string checksum calculation

    Thanks for reply.
    From where you get the 3F.



    •   AltAdvertisement

        
       

  4. #4
    Full Member level 5
    Points: 3,715, Level: 14
    Achievements:
    7 years registered
    _Eduardo_'s Avatar
    Join Date
    Aug 2009
    Location
    Argentina
    Posts
    287
    Helped
    116 / 116
    Points
    3,715
    Level
    14

    Hex string checksum calculation

    The checksums are arbitrary operations. For example a XOR between the characters and a mask.

    In this case the sample is very small (two lines of 13 characters), using XOR 0x3F (mask) verify these two cases, but it does not assure the solution.



  5. #5
    Newbie level 6
    Points: 2,071, Level: 10

    Join Date
    Feb 2005
    Posts
    14
    Helped
    0 / 0
    Points
    2,071
    Level
    10

    Re: Hex string checksum calculation

    I understand.Yes it is perfect with 3F.Thanks a lot.



    •   AltAdvertisement

        
       

  6. #6
    Newbie level 2
    Points: 490, Level: 4

    Join Date
    Mar 2010
    Posts
    2
    Helped
    0 / 0
    Points
    490
    Level
    4

    Re: Hex string checksum calculation

    I have the same type problem and hoping for help!
    I think the second to last hex is a checksum, but I can't figure out how to calculate it...
    F0 0 61 0 0 7F 8 6F F7
    F0 0 61 0 0 7F 9 70 F7
    F0 0 61 0 0 7F A 6D F7
    F0 0 61 0 0 7F B 6E F7
    F0 0 61 0 0 7F 1B 7E F7
    F0 0 61 0 0 7F 1C 7B F7
    F0 0 61 0 0 7F 1D 7C F7
    F0 0 61 0 0 7F 44 33 F7
    F0 0 61 0 0 7F 7F 1A F7
    F0 0 61 0 0 0 0 1A F7
    F0 0 61 0 0 0 1 19 F7
    F0 0 61 0 0 0 3C 36 F7
    F0 0 61 0 0 0 78 72 F7
    F0 0 61 0 0 1 11 A F7
    F0 0 61 0 0 4 1F 13 F7
    F0 0 61 0 0 4 2B 47 F7
    F0 0 61 0 0 5 5E 53 F7
    F0 0 61 0 0 7 68 7 F7

    I think these would be calculated the same way, but can't be 100% sure:
    F0 7F 61 00 09 03 08 75 F7
    F0 7F 61 00 09 03 09 76 F7
    F0 7F 61 00 09 3F 7E 2F F7
    F0 7F 61 00 09 03 4C 31 F7



  7. #7
    Newbie level 2
    Points: 490, Level: 4

    Join Date
    Mar 2010
    Posts
    2
    Helped
    0 / 0
    Points
    490
    Level
    4

    Re: Hex string checksum calculation

    I think the first and last values are start and stop markers..
    Any ideas?



--[[ ]]--