Computer Interfacing
Discussions about interfacing and electronics
 

Unable to decode the correct CRC check


 

       Computer Interfacing Forum Index -> Error detection and correction
Author Message
GVS0001
New User



Joined: 07 Dec 2007
Posts: 2


Dec 07, 2007 5:39 pm

I like to communicate with a Grundfus pump using the GENIbus protocol. The protocol uses a CRC16 error correction. Although I have the specifications I do not manage to find out how the CRC is really calculated.
The specifications are:
Cyclic redundancy checking 16 bit CCITT, polynomial is 0x1021, Start Delimiter excluded.
Initialised to 0xFFFF, CRC value bit inverted after calculation.
High order byte transmitted first.


I have f.i. these two datagrams:
Code:

Start Delimiter                     0x24
Length                              0x10
Destination Address                 0x01
Source Address                      0x20
Class 2: Measured Data              0x02
Ack=0, Length=12                    0x0C
Value example of i_rst INFO head    0x82
Value example of i_rst UNIT Index   0x3E
Value example of i_rst ZERO         0x00
Value example of i_rst RANGE        0x39
Value example of t_mo INFO head     0x82
Value example of t_mo UNIT Index    0x15
Value example of t_mo ZERO          0x00
Value example of t_mo RANGE         0x64
Value example of p_hi INFO head     0x82
Value example of p_hi UNIT Index    0x09
Value example of p_hi ZERO          0x00
Value example of p_hi RANGE         0xFA

CRC high                            0x91
CRC low                             0x0A


second example:
Code:

Start Delimiter                     0x27
Length                              0x07
Destination Address                 0x20
Source Address                      0x01
Class 2: Measured Data              0x02
OS=3 (INFO), Length=3               0xC3
i_rst = ID 2                        0x02
t_mo = ID 16                        0x10
p_hi = ID 26                        0x1A
 
CRC high                            0x90
CRC low                             0x1C


I thought when I put these hexcodes behind each other (without the start byte) I would get a correct result from Lammert's calculator. But no I don't.
The hexstring I enter are:
Code:
100120020C823E003982150064820900FA
07200102C302101A

Who knows what I am doing wrong? Or is it a special implementation of the CRC16CCITT?
Any help very much appreciated.

Geert
GVS0001
New User



Joined: 07 Dec 2007
Posts: 2


Dec 07, 2007 7:33 pm

After some more investigation I found out I have to invert the checksum the calculator gives for the 'CRC-CCITT (0xFFFF)' result. I then get the right checksum. Is this normal or am still doing something wrong?
Guest








Dec 07, 2007 10:52 pm

Who can and will generate a lookup table for me and post it here?
I am not familiar with the C examples. I tried to compile the examples but they gave me the wrong result.
regregex
Preferred Member



Joined: 30 Oct 2007
Posts: 184
Location: London, UK

Dec 10, 2007 11:55 am

I can tell you that the table you want begins 0x0000, 0x1021, 0x2042, 0x3063... and ends 0x1EF0. Plenty of examples online.

--G
regregex
Preferred Member



Joined: 30 Oct 2007
Posts: 184
Location: London, UK

Dec 11, 2007 10:09 pm

GVS0001 wrote:
After some more investigation I found out I have to invert the checksum the calculator gives for the 'CRC-CCITT (0xFFFF)' result. I then get the right checksum. Is this normal

Yes, as noted in the spec "CRC value bit inverted after calculation."

The algorithm corresponds to "CRC-16/I-CODE" (D64E).
benj72
New User



Joined: 11 Feb 2009
Posts: 1


Feb 11, 2009 11:37 pm

I am a postgraduate student considering doing my major project on interfacing some Genibus pump controllers with a Zigbee mesh. Can anyone supply some specifications for the Genibus protocol?

cheers, Ben
Raul
Guest







Feb 18, 2009 12:57 am

Hi Ben

Please, tell me what you need about Genibus to my email.

Cheers

rarranz at grundfos dot com

       Computer Interfacing Forum Index -> Error detection and correction
Page 1 of 1



Running on php BB © 2001, 2009 php BB Group
   Lammert Bies     Interfacing     Sitemap     Forum