Wellue Oxysmart 3785 import to OSCAR
The Wellue Oxysmart 3785 is a simple fingertip pulse oximeter. It has Bluetooth and can do overnight recording with the ViHealth smartphone app.
The file format produced by ViHealth is not directly supported by OSCAR, but I think it should be quite easy to get it working.
The format is very simple:
Filename: <UNIX timestamp of the start of the session>.dat
File contents:
A continuous series of 6-byte records containing metric samples encoded in binary as follows:
Byte 0: SpO2 %
Byte 1: PR
Byte 2: always 0 in my sample
Byte 3: PI expressed as percentage x10 (to avoid the need for floating point representation)
Byte 4: always 0 in my sample
Byte 5: battery level (?) expressed as multiple of 64 (?)
There is no file header, the file starts right with the first 6-byte record.
There is no delimiter between the 6-byte records.
There is no encoding of the sample rate, or any other parameters.
If I understand correctly, this is similar to the other Wellue formats except that those have a 40-byte header at the start of the file.
Can anyone share with me a Wellue binary file from ViHealth that successfully imports into OSCAR? I'd like to see what tweaks can be done to get this oximeter data into OSCAR too.
Thanks!
RE: Wellue Oxysmart 3785 import to OSCAR
Two of the entries in the 40-byte header are the file size and total duration. These entries allow for the calculation of the sample rate, currently all being 4-seconds. Knowing the byte size of each record, along with the file size, allows for the total number of samples to be calculated. Look at the OSCAR-code/oscar/SleepLib/loader_plugins/viatom_loader.cpp file for code structure.
Good luck!
- Red
RE: Wellue Oxysmart 3785 import to OSCAR
Thanks Red. My preferred approach is to start with a working known-good test, and modify while maintaining the test passing. Also it may be easier to massage the ViHealth .dat file rather than modify OSCAR code, especially since ViHealth can (and do) change their formats at whim.
So can anyone supply a Wellue oximeter file that is known to import correctly into OSCAR?
Thanks!
RE: Wellue Oxysmart 3785 import to OSCAR
Here you go. It is from a SleepU. Just don't try to get a loan from the bank with it.
https://www.dropbox.com/scl/fi/dfiwk9mnu...wrhvt&dl=0
-
Red
RE: Wellue Oxysmart 3785 import to OSCAR
Thanks a lot Red, I'll dig in and figure it out.
(BTW if US banks gave loans based on anonymous pulse oximeter recordings it's no wonder there was a banking crisis... Hey, just prove that someone had a pulse sometime and we'll lend you 100 grand!?)
RE: Wellue Oxysmart 3785 import to OSCAR
A pulse is not currently required to vote, here.
-
Red