Apnea Board Forum - CPAP | Sleep Apnea
thumbdrive-oximeter-format-analysis - Printable Version

+- Apnea Board Forum - CPAP | Sleep Apnea (https://www.apneaboard.com/forums)
+-- Forum: Public Area (https://www.apneaboard.com/forums/Forum-Public-Area)
+--- Forum: Software Support Forum (https://www.apneaboard.com/forums/Forum-Software-Support-Forum)
+--- Thread: thumbdrive-oximeter-format-analysis (/Thread-thumbdrive-oximeter-format-analysis)



thumbdrive-oximeter-format-analysis - capman - 03-08-2024

here i'm looking at binary formats, based on 8 bit sequences.
(for reading them manually, one could open the file with a hex-editor
and then look for the 8-bit value for the cursor position).
these are also used by many polysomnography devices.
maybe it could somehow lead to oscar importing more stuff.


the oximeter-file has the following structure:

it starts with 12 * 32
0
1,1,id,1,10
6 * 0
oxigen, pulse, oxigen, pulse, ..
0
1,1,id,1,10
6 * 0
oxigen, pulse, oxigen, pulse, ..
...
0
1,1,id,1,10
6 * 0
oxigen, pulse, oxigen, pulse, ..
end of file


id is a number between 0 and 9.


if the device cant read the value pair
(for instance due to movement),
it writes 127 for oxygen and -1 for pulse.

the device probably starts a new block
(where the id is repeated),
if there are many errors (eg. due to movement).


there are cases in which the device malfunctions
such that between blocks there is only a "0" and a "1".


now my questions:

why this twelve times 32 fileheader ?
why the stuff around id ?
it does not change with oximeter settings.
does anybody have an oximeter with a similar format ?


RE: thumbdrive-oximeter-format-analysis - Crimson Nape - 03-08-2024

There is no standard for an oximeter's data file, and is proprietary to each manufacturer. The first bytes you describe are probably a header, describing the starting date and time, total recording duration or sampling frequency. Beside the SpO2 and pulse data, you basically need a starting date and time, the length of the recording session or a sampling interval, or a timestamp on each entry.

Good luck!
- Red


RE: thumbdrive-oximeter-format-analysis - capman - 03-08-2024

yes, the blanks might be for extendability.

actually, i had some luck and wrote a csv-converter
for the newgen medicals nx-8462.

it's structured as a toolchain utility, so regarding an oscar importer,
one could be better of starting from scratch.

a reason more for generic csv imports ? ;-)


RE: thumbdrive-oximeter-format-analysis - capman - 03-10-2024

this oximeter-model does not have a rtc.
every 10 heartbeats it records spo2 in % and heartrate in bpm.
for converting it into oscar one would have to manually enter
a starttime for each session. then the timestamps could be calculated.


RE: thumbdrive-oximeter-format-analysis - Crimson Nape - 03-10-2024

Based on your other posts, I've never heard of the oximeter brand that you are using being sold in the North American market. If it only records a sample every 10 heartbeats, then that would require a complete new loader with logic that I can not begin to fathom as to how to address the time variance. I believe that you have your life's work ahead of you on this project.

Good luck!
- Red


RE: thumbdrive-oximeter-format-analysis - capman - 03-14-2024

sounds like the rest of the oximeter-world
would have a chance of being covered by oscar,
if china sells the format in the us, too.
that could happen ;-)

oscar suggests to sync the oximetry
to the beginning of a cpap session anyway,
so i could try something with the values
(the led pulsing and the displaying speed
indicates them being averages instead of samples).

could you support me with a bare loader,
where i only have to insert my code ?

to avoid confusion about the format i made a sample,
containing the data of another sample.


RE: thumbdrive-oximeter-format-analysis - capman - 03-15-2024

there is my shellscript, which reads the custom csv-format of my converter
and converts it further into a somnopose-csv.