2

I am looking at a 32 byte sequence, the chksum I believe is either the 1st two bytes or last 2 bytes (I am leaning on the last 2 bytes). I think it is a straight 16bit xor but I can't find the crunch number to put against it. It could be crc or citt too, I can't say for sure.

Here are 3 packets to work with, any help will be greatly appreciated.

55 00 53 4D 34 34 51 49 00 00 00 00 00 00 4F 1F DF F1 00 00 00 00 00 00 00 00 00 00 00 00 C7 CC

16 02 53 4D 31 30 30 54 51 47 00 00 00 00 C8 7F A8 F4 00 00 00 00 00 00 00 00 00 00 00 00 41 F5

11 00 53 4D 34 38 44 00 00 00 00 00 00 00 69 DC 9C F3 00 00 00 00 00 00 00 00 00 00 00 00 F3 48

JGizmo
  • 21
  • 2
  • 2
    See http://reverseengineering.stackexchange.com/questions/12193/backblaze-16-bit-checksum-bzsanity/12195#comment17209_12195 and http://reverseengineering.stackexchange.com/questions/8303/rs-485-checksum-reverse-engineering-watlow-ez-zone-pm/8305#comment11791_8305 – Jason Geffner Apr 21 '16 at 01:50
  • Thank you Jason for the clues but neither seem to fit my case. I am trying to build custom sockets for my chip programmer system and the socket modules contains an EE with the code(s) above which identify the socket Is there a way I could send you the firmware from the unit to look at. I can be reached at geekygizmo aht yahoo. Thankx for your help! G – JGizmo Apr 21 '16 at 11:50

1 Answers1

2
unsigned int seed=0x3412;
unsigned int len=15;

unsigned int vec1[] = {
        0x5500,0x534D,0x3434,0x5149,0x0000,0x0000,0x0000,0x4F1F,0xDFF1,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
        // 0xC7CC
};

unsigned int vec2[] = {
        0x1602,0x534D,0x3130,0x3054,0x5147,0x0000,0x0000,0xC87F,0xA8F4,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
        // 0x41F5
};

unsigned int vec3[] = {
        0x1100,0x534D,0x3438,0x4400,0x0000,0x0000,0x0000,0x69DC,0x9CF3,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000
        // 0xF348
};


// poly = 0xffff

unsigned int fcalc(int len, unsigned int s, unsigned int *v)
{
        unsigned int ret, i;

        ret = s;
        for (i=0; i<len; i++)
                ret ^= *v++;

        return ret;
}

main()
{
        unsigned int c;

        c = fcalc(len, seed, vec1);
        printf("c = %04x\n", c);

        c = fcalc(len, seed, vec2);
        printf("c = %04x\n", c);

        c = fcalc(len, seed, vec3);
        printf("c = %04x\n", c);

}

enter image description here

0xec
  • 6,090
  • 3
  • 23
  • 33