Hello Guest, Welcome to Apnea Board !
As a guest, you are limited to certain areas of the board and there are some features you can't use.
To post a message, you must create a free account using a valid email address.

or Create an Account


New Posts   Today's Posts

Resmed CRC algorithm?
#1
Resmed CRC algorithm?
Out of curiosity, does anyone know what algorithm is used to generate the 64-bit CRC checksum files used for the EDF data on the S10 machines?  I ran RevEng against the 32-bit checksums for the TGT files and that turned out to be a pretty standard one.  But RevEng didn't find anything for the 64-bit checksums, and I got nosy.  Thanks!
Post Reply Post Reply
#2
RE: Resmed CRC algorithm?
Philip Koopman of Carnegie-Mellon has several web pages on CRC algorithms that may be useful: https://users.ece.cmu.edu/~koopman/crc/

I haven't looked into using the crc just yet. I did notice that each data record in an edf file has a crc16. It might be useful to crc check the identification.tgt as general check against a corrupt SD card, so I would be happy to have the crc32 polynomial that you discovered.

I hesitate to consider checking every edf file's crc64 because they are big, and there are a lot of them. It would be useful to check the STR.edf file because almost everything depends on it it, bur the STR.crc file was removed from the ten series machines.
Apnea Board Monitors are members who help oversee the smooth functioning of the Board. They are also members of the Advisory Committee which helps shape Apnea Board's rules & policies. Membership in the Advisory Members group does not imply medical expertise or qualification for advising Sleep Apnea patients concerning their treatment.
Post Reply Post Reply
#3
RE: Resmed CRC algorithm?
No problem.  The values I got for the 32-bit checksums are below.  (Though the polynomials may be standard for CRC-32/ISO-HDLC.  "Refin" and "refout" refer to reflecting the input and output values.

width=32  
poly=0x04c11db7  
init=0xffffffff  
refin=true  
refout=true  
xorout=0xffffffff  
check=0xcbf43926  
residue=0xdebb20e3  
name="CRC-32/ISO-HDLC"
Post Reply Post Reply
#4
RE: Resmed CRC algorithm?
FWIW, there was an interesting post here: http://www. a DME-owned forum .com/viewtopic/t93676/Data--Settings-on-ResMed-S9-Escape.html

"They might just be seeding the CRC start value or using a non standard root polynomial.. which doesn't take long to hack out on a modern computer.
It could also be in a different byte order depending on the devices CPU.

Could also be stringing together 2 phases of a CRC32 variant or similar, which is quite possible considering there is both 4 and 8 byte crc's.. (a fairly common practice when firmware space is limited)"
Post Reply Post Reply
#5
RE: Resmed CRC algorithm?
Thank you, Wayward, I will incorporate that into the resmed importer.
Apnea Board Monitors are members who help oversee the smooth functioning of the Board. They are also members of the Advisory Committee which helps shape Apnea Board's rules & policies. Membership in the Advisory Members group does not imply medical expertise or qualification for advising Sleep Apnea patients concerning their treatment.
Post Reply Post Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Question [re: PR Algorithm] SleepyHenry 5 1,059 05-05-2021, 10:07 AM
Last Post: sawinglogz


New Posts   Today's Posts


About Apnea Board

Apnea Board is an educational web site designed to empower Sleep Apnea patients.