Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

CR1000 program checksum


marmander Feb 15, 2013 12:41 PM

How do I calculate the checksum (presented in the table header in the data logger file), if I have the CR program? What kind of checksum algorith is used? I need this in order to validate that the program hasn't been tampered with.


kirving Feb 15, 2013 06:29 PM

I 'borrowed' the code for this from the python PyPak project and use it as a stand-alone executable. We also include the signature value, obtained as status.ProgSignature, as an output field in logged records, so there's no ambiguity in what program version generated the data.


Sam Feb 15, 2013 10:46 PM

As Ken pointed out you can use the ProgSignature and RunSignature from the Status table to identify if the program has changed. The ProgSignature is the signature of the program as you know it in CRBasic with all the comments, etc. The RunSignature is the compiled, running, code.

You can find information about "Generation of Signature" in the CR10X manual. We seem to have omitted it from the CR1000 manual.

https://s.campbellsci.com/documents/us/manuals/cr10x.pdf


marmander Mar 28, 2013 10:47 AM

Thank's for your answers. I found the code that generates signatures, but it seems to me that it generates signatures for network packet transfers. Is the same algorithm used to generate the signature that I can read in the table header? In the manual you posted Sam, it says that the signature is 2 bytes, which makes sense for packet transfers, but the signature in the table header is more than 2 bytes.

Log in or register to post/reply in the forum.