Checksum calculation


Closed Thread
Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2008
    Posts
    11

    Default Checksum calculation

    I'm unable to calculate the checksum hoping for help!
    I have a hex string with 12 byte in this first byte tells starting point of the data, then 7 bytes are data, byte 9 tell channel countiniously sending data or start/stop, byte 10 tell chanel no. ie. A or B and byte no. 11 & 12 are the checksum values. I'm unable to calculate it. some of the data are as follows
    7a:30:30:30:30:36:33:34:31:41:1f:36:
    7a:30:30:30:30:36:33:33:33:41:67:1f:
    7a:30:30:30:30:36:32:39:33:41:1f:1f:
    7a:30:30:30:30:36:32:38:33:41:1f:1f:
    7a:30:30:30:30:36:33:30:33:41:3e:1f:
    7a:30:30:30:30:36:33:32:33:41:50:1f:
    7a:30:30:30:30:36:33:32:33:41:50:1f:
    7a:30:30:30:30:36:33:34:33:41:1f:54:
    7a:30:30:30:30:36:33:30:33:41:3e:1f:
    7a:30:30:30:30:36:33:33:33:41:67:1f:

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    I think it is not possible to just guess how the checksum is calculated.

    It might be just a plain addition of all terms, an XORing, addition of all terms (except the checksum bytes) and then subtraction from FFFF, CRC calculation on 8 byte or 16 byte polynomial and the options keep on...

    Ioannis

  3. #3
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    I have tryed to process three lines of your data set, applying the CRC16 algorithm but the results don't combine. Here the results:

    Code:
    7a:30:30:30:30:36:33:34:31:41:1f:36:  8E:E5
    7a:30:30:30:30:36:33:33:33:41:67:1f:  6D:17
    7a:30:30:30:30:36:32:39:33:41:1f:1f:  DC:62
    So, now you know is not the classic CRC16 (IEEE recommendation) but some other form of chechsum.

    Al.
    Last edited by aratti; - 31st March 2010 at 10:40.
    All progress began with an idea

  4. #4
    Join Date
    Jan 2008
    Posts
    11


    Did you find this post helpful? Yes | No

    Default Thanks

    Thanks for your efforts. It is quite dificult to find out.

  5. #5
    Join Date
    Jan 2008
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    Can some one else help in it?

  6. #6
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Can you modify your transmitter to send a checksum you create? Or are you stuck with existing hardware?

  7. #7
    Join Date
    Jan 2008
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    Thanks for reply. I'm stuck with the existing hardware. I need to send same checksum value wihch earlier hardware is sending.

  8. #8
    Join Date
    Jan 2008
    Posts
    11


    Did you find this post helpful? Yes | No

    Default Re: Checksum calculation

    Hi, Everyone I'm again here. Till today I have not come out from this problem. Now I have more proper data which is appended below. Can anyone help me.

    000001 20:25:44.659 7A 30 30 32 37 32 36 32 31 41 AB 77 z00272621A«w
    000002 20:25:45.668 7A 30 30 32 36 36 35 32 33 41 9A 6F z00266523Ašo
    000003 20:25:46.674 7A 30 30 32 36 32 38 38 33 41 ED 2E z00262883Aí.
    000004 20:25:47.684 7A 30 30 32 35 31 33 39 33 41 E4 33 z00251393Aä3
    000005 20:25:48.691 7A 30 30 32 36 36 35 30 33 41 F4 0F z00266503Aô.
    000006 20:25:49.699 7A 30 30 32 36 38 36 38 33 41 09 DA z00268683A.Ú
    000007 20:25:50.706 7A 30 30 32 36 39 30 37 33 41 A8 23 z00269073A¨#
    000008 20:25:51.714 7A 30 30 32 33 33 34 30 33 41 E2 ED z00233403Aâí

    000090 20:44:14.224 7A 31 32 39 36 37 39 31 31 41 6F 94 z12967911Ao”
    000091 20:44:15.230 7A 31 32 39 36 38 38 31 33 41 1A BB z12968813A.»
    000092 20:44:16.241 7A 31 32 39 36 39 31 34 33 41 A8 6D z12969143A¨m
    000093 20:44:17.246 7A 31 32 39 36 37 33 38 33 41 FF CC z12967383AÿÌ
    000094 20:44:18.252 7A 31 32 39 36 38 31 37 33 41 5B 6C z12968173A[l
    000095 20:44:19.260 7A 31 32 39 36 38 30 33 33 41 F1 18 z12968033Añ.
    000096 20:44:20.267 7A 31 32 39 36 37 32 35 33 41 CB 29 z12967253AË)
    000097 20:44:21.275 7A 31 32 39 36 39 30 30 33 41 02 19 z12969003A..
    000098 20:44:22.283 7A 31 32 39 36 37 30 38 33 41 64 10 z12967083Ad.
    000099 20:44:23.292 7A 31 32 39 36 39 33 33 33 41 C0 95 z12969333AÀ•
    000100 20:44:24.299 7A 31 32 39 36 37 36 30 33 41 EA 28 z12967603Aê(

    000161 20:45:25.764 7A 31 34 35 30 30 33 31 33 41 59 C8 z14500313AYÈ
    000162 20:45:26.769 7A 31 34 35 30 30 37 35 33 41 4F F9 z14500753AOù
    000163 20:45:27.777 7A 31 34 35 30 31 36 38 33 41 D1 4D z14501683AÑM
    000164 20:45:28.786 7A 31 34 35 30 30 37 33 33 41 FD 59 z14500733AýY
    000165 20:45:29.794 7A 31 34 35 30 30 31 38 33 41 2A 31 z14500183A*1
    000166 20:45:30.799 7A 31 34 35 30 30 39 38 33 41 AF F2 z14500983A¯ò
    000167 20:45:31.807 7A 31 34 35 30 31 33 38 33 41 6D 08 z14501383Am.
    000168 20:45:32.815 7A 31 34 35 30 31 31 38 33 41 80 60 z14501183A€`
    000169 20:45:33.824 7A 31 34 35 30 30 31 35 33 41 68 60 z14500153Ah`
    000170 20:45:34.832 7A 31 34 34 39 39 37 32 33 41 92 96 z14499723A’–

  9. #9
    Join Date
    Jan 2008
    Posts
    11


    Did you find this post helpful? Yes | No

    Default Re: Checksum calculation

    Hi everyone,

    The appended data have firstly serial no. then date and time after that from 7A data started upto 41, data then 2 bytes are checksum. from z it is ASCII value of data + checksum.

    Can anyone help on it to calulate the checksum value. If anyone want to charge for it then pls let me know.

    BR

    D.K.Singh

  10. #10
    Join Date
    Jan 2008
    Posts
    11


    Did you find this post helpful? Yes | No

    Default Re: Checksum calculation

    Quote Originally Posted by aratti View Post
    I have tryed to process three lines of your data set, applying the CRC16 algorithm but the results don't combine. Here the results:

    Code:
    7a:30:30:30:30:36:33:34:31:41:1f:36:  8E:E5
    7a:30:30:30:30:36:33:33:33:41:67:1f:  6D:17
    7a:30:30:30:30:36:32:39:33:41:1f:1f:  DC:62
    So, now you know is not the classic CRC16 (IEEE recommendation) but some other form of chechsum.

    Al.
    Can u pls refer new data and pls suggest about checksum.

    000001 20:25:44.659 7A 30 30 32 37 32 36 32 31 41 AB 77 z00272621A«w
    000002 20:25:45.668 7A 30 30 32 36 36 35 32 33 41 9A 6F z00266523Ašo
    000003 20:25:46.674 7A 30 30 32 36 32 38 38 33 41 ED 2E z00262883Aí.
    000004 20:25:47.684 7A 30 30 32 35 31 33 39 33 41 E4 33 z00251393Aä3
    000005 20:25:48.691 7A 30 30 32 36 36 35 30 33 41 F4 0F z00266503Aô.
    000006 20:25:49.699 7A 30 30 32 36 38 36 38 33 41 09 DA z00268683A.Ú
    000007 20:25:50.706 7A 30 30 32 36 39 30 37 33 41 A8 23 z00269073A¨#
    000008 20:25:51.714 7A 30 30 32 33 33 34 30 33 41 E2 ED z00233403Aâí

    000090 20:44:14.224 7A 31 32 39 36 37 39 31 31 41 6F 94 z12967911Ao”
    000091 20:44:15.230 7A 31 32 39 36 38 38 31 33 41 1A BB z12968813A.»
    000092 20:44:16.241 7A 31 32 39 36 39 31 34 33 41 A8 6D z12969143A¨m
    000093 20:44:17.246 7A 31 32 39 36 37 33 38 33 41 FF CC z12967383AÿÌ
    000094 20:44:18.252 7A 31 32 39 36 38 31 37 33 41 5B 6C z12968173A[l
    000095 20:44:19.260 7A 31 32 39 36 38 30 33 33 41 F1 18 z12968033Añ.
    000096 20:44:20.267 7A 31 32 39 36 37 32 35 33 41 CB 29 z12967253AË)
    000097 20:44:21.275 7A 31 32 39 36 39 30 30 33 41 02 19 z12969003A..
    000098 20:44:22.283 7A 31 32 39 36 37 30 38 33 41 64 10 z12967083Ad.
    000099 20:44:23.292 7A 31 32 39 36 39 33 33 33 41 C0 95 z12969333AÀ•
    000100 20:44:24.299 7A 31 32 39 36 37 36 30 33 41 EA 28 z12967603Aê(

    000161 20:45:25.764 7A 31 34 35 30 30 33 31 33 41 59 C8 z14500313AYÈ
    000162 20:45:26.769 7A 31 34 35 30 30 37 35 33 41 4F F9 z14500753AOù
    000163 20:45:27.777 7A 31 34 35 30 31 36 38 33 41 D1 4D z14501683AÑM
    000164 20:45:28.786 7A 31 34 35 30 30 37 33 33 41 FD 59 z14500733AýY
    000165 20:45:29.794 7A 31 34 35 30 30 31 38 33 41 2A 31 z14500183A*1
    000166 20:45:30.799 7A 31 34 35 30 30 39 38 33 41 AF F2 z14500983A¯ò
    000167 20:45:31.807 7A 31 34 35 30 31 33 38 33 41 6D 08 z14501383Am.
    000168 20:45:32.815 7A 31 34 35 30 31 31 38 33 41 80 60 z14501183A€`
    000169 20:45:33.824 7A 31 34 35 30 30 31 35 33 41 68 60 z14500153Ah`
    000170 20:45:34.832 7A 31 34 34 39 39 37 32 33 41 92 96 z14499723A’–

    In this fistly we have logging S.No., time then from 7A to 41 ten byte data, then 2 byte checksum. From z to end, ASSCII value of data and checksum.

    Thanks in advance.

    BR

    D.K.Singh

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts