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

Viatom/Wellue Check Me O2 [interface cable]
#1
Viatom/Wellue Check Me O2 [interface cable]
I recently emailed Viatom to enquire how I might download  to my PC from the Viatom/Wellue Check Me O2 that I bought on Amazon a couple of years ago.

To my amazement, they sent  me a  free Viatom Checkme O2 Interface Cable by return!

This cable is availlble online here in the UK, but at a price of £96.00 ($122.00) !!!  Bug-eyed  Company name spelled like    "S*****D"   Avoid!!!


NB   I believe this proprietary cable - black in colour - may  come with the CheckMe O2 PRO - but the non-pro version, just comes with a charge-only cable, white in colour.
 “Men fight for liberty and win it with hard knocks. Their children, brought up easy, let it slip away again, poor fools. And their grandchildren are once more slaves.”   - DH  Lawrence

    
          oldman
Post Reply Post Reply
#2
RE: Viatom/Wellue Check Me O2 [interface cable]
I have the white colour cable, which came with my CheckMe O2 Max, and it connects with my computer without any issues.
Post Reply Post Reply
#3
RE: Viatom/Wellue Check Me O2 [interface cable]
For whatever it's worth, I purchased a "Wellue USB Charge Data Cable O2Ring and KidsO2, PC Data Cable" (it's essentially just a generic USB/Serial cable) for around $14 from Amazon, and it works flawlessly for importing from  my O2Ring, OxyLink, and WearO2 into the O2 Insight program.

Which is also how I discovered that the OSCAR code mistakenly treats the "File Format version" flag in the saved binary file header as some sort of model identifier  Dont-know
Post Reply Post Reply
#4
RE: Viatom/Wellue Check Me O2 [interface cable]
Muggzy - Please explain in detail what you are referring to in the statement, "OSCAR code mistakenly treats the "File Format version" flag in the saved binary file header as some sort of model identifier"

- Red
Crimson Nape
Apnea Board Moderator
www.ApneaBoard.com
___________________________________
Useful Links -or- When All Else Fails:
The Guide to Understanding OSCAR
OSCAR Chart Organization
Attaching Images and Files on Apnea Board
Apnea Helpful Tips

INFORMATION ON APNEA BOARD FORUMS OR ON APNEABOARD.COM SHOULD NOT BE CONSIDERED AS MEDICAL ADVICE. ALWAYS SEEK THE ADVICE OF A PHYSICIAN BEFORE SEEKING TREATMENT FOR MEDICAL CONDITIONS, INCLUDING SLEEP APNEA. INFORMATION POSTED ON THE APNEA BOARD WEB SITE AND FORUMS ARE PERSONAL OPINION ONLY AND NOT NECESSARILY A STATEMENT OF FACT.
Post Reply Post Reply
#5
RE: Viatom/Wellue Check Me O2 [interface cable]
In ViatomLoader.cpp in the ViatomFile:TonguearseHeader() function:
Code:
   const unsigned char* header = (const unsigned char*) data.constData();
   int sig   = header[0] | (header[1] << 8);
   int year  = header[2] | (header[3] << 8);
   int month = header[4];
   int day   = header[5];
   int hour  = header[6];
   int min   = header[7];
   int sec   = header[8];

The first byte of the header, called sig in this case, is later referred to in several places as if it identifies a "CheckMe O2 Max", such as here in ReadData():
Code:
if (m_sig == 5) {
   // Confirm that CheckMe O2 Max is a true 2s sample rate.
   CHECK_VALUE(all_are_duplicated, false);
} else {
   // Confirm that older models are actually a 4s sample rate.
   CHECK_VALUE(m_sig, 3);
   CHECK_VALUE(all_are_duplicated, true);
}

However, the first byte in the header file corresponds to the File Version in the O2 Insight database, regardless of model type as shown here: 






I have verified that the binary file formats are identical for the OxyLink, O2 Ring, and Wear O2 models from Viatom with variations on the following code:
Code:
[TestMethod]
public void ReadViatomBinaryFile()
{
    const int HEADER_SIZE = 40;
    const int RECORD_SIZE = 5;

    string path = @"[REDACTED, CHANGES ACCORDING TO WHICH FILE I WANT TO TEST]";

    Assert.IsTrue( File.Exists( path ) );

    using var file   = File.OpenRead( path );
    using var reader = new BinaryReader( file );

    int fileVersion = reader.ReadInt16();
    Assert.IsTrue( fileVersion is 3 or 5 ); // Never actually encountered FileVersion=5, but apparently someone else has and it's binary compatible

    int year = reader.ReadInt16();
    Assert.AreEqual( 2023, year );

    int month = reader.ReadByte();
    Assert.IsTrue( month >= 1 && month <= 12 );
            
    int day = reader.ReadByte();
    Assert.IsTrue( day is >= 1 and <= 31 );
            
    int hour = reader.ReadByte();
    Assert.IsTrue( hour is >= 0 and <= 24 );
            
    int minute = reader.ReadByte();
    Assert.IsTrue( minute is >= 0 and <= 60 );
            
    int second = reader.ReadByte();
    Assert.IsTrue( second is >= 0 and <= 60 );

    var expectedTimestamp = DateTime.Parse( "2023-10-04 03:17:47.000" );
    var headerTimestamp   = new DateTime( year, month, day, hour, minute, second );
    Assert.AreEqual( expectedTimestamp, headerTimestamp );

    // Read timestamp (NOTE: The filename also appears to be a timestamp. Do they always match?)
    var filenameTimestamp = DateTime.ParseExact( Path.GetFileName( path ), "yyyyMMddHHmmsss", CultureInfo.InvariantCulture );
    Assert.AreEqual( expectedTimestamp, filenameTimestamp );

    // Read and validate file size
    int fileSize = reader.ReadInt32();
    Assert.AreEqual( file.Length, fileSize );
            
    // Read duration of recording
    var duration = TimeSpan.FromSeconds( reader.ReadInt16() );
    Assert.AreEqual( TimeSpan.FromSeconds( 5316 ), duration );

    // Skip the rest of the header, as it doesn't provide any useful information for us.
    file.Position = HEADER_SIZE;
    
    // The rest of the file should be an exact multiple of RECORD_SIZE
    Assert.AreEqual( 0, (fileSize - HEADER_SIZE) % RECORD_SIZE );

    int    recordCount = (fileSize - HEADER_SIZE) / RECORD_SIZE;
    double frequency   = 1.0 / (duration.TotalSeconds / recordCount);

    for( int i = 0; i < recordCount; i++ )
    {
        var spO2      = reader.ReadByte();
        var pulse     = reader.ReadByte();
        var isInvalid = reader.ReadByte();
        var motion    = reader.ReadByte();
        var vibration = reader.ReadByte();
        
        Debug.WriteLine( $"OX: {spO2}, PULSE: {pulse}, MOT: {motion}, INVALID: {isInvalid}, VIB: {vibration}" );
    }
}
Post Reply Post Reply
#6
RE: Viatom/Wellue Check Me O2 [interface cable]
When the loader was first written, only the SleepU and O2Ring were on the market. At that time, this value was 0x02 until the Checkme arrived. It was using the 0x03 designator, but the prior two still carried the 0x02 value in all data files. I will look into updating the code.

Thanks!
- Red
Crimson Nape
Apnea Board Moderator
www.ApneaBoard.com
___________________________________
Useful Links -or- When All Else Fails:
The Guide to Understanding OSCAR
OSCAR Chart Organization
Attaching Images and Files on Apnea Board
Apnea Helpful Tips

INFORMATION ON APNEA BOARD FORUMS OR ON APNEABOARD.COM SHOULD NOT BE CONSIDERED AS MEDICAL ADVICE. ALWAYS SEEK THE ADVICE OF A PHYSICIAN BEFORE SEEKING TREATMENT FOR MEDICAL CONDITIONS, INCLUDING SLEEP APNEA. INFORMATION POSTED ON THE APNEA BOARD WEB SITE AND FORUMS ARE PERSONAL OPINION ONLY AND NOT NECESSARILY A STATEMENT OF FACT.
Post Reply Post Reply
#7
RE: Viatom/Wellue Check Me O2 [interface cable]
Gotcha. Makes sense.

I think it's worth reiterating that the right cable works for more models than just the ones that come with it. You can get an OxyLink and the cable for less money than an O2 ring, which I found helpful.
Post Reply Post Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Wellue data off since daylight savings change brainfoggysleeper 1 71 04-16-2024, 07:51 AM
Last Post: Crimson Nape
  OSCAR import of Viatom/Wellue data - DST time base SleeperAwake21 5 988 03-30-2024, 02:21 PM
Last Post: dfunk
  Uploading Wellue O2 Ring Data to Oscar ggs5 9 970 03-29-2024, 08:52 AM
Last Post: StuartC
Question Displaying more data from viatom/Wellue in the summary panel ? croc297 2 198 03-25-2024, 04:30 PM
Last Post: AlannaSantos
  OSCAR Export CSV Empty? Only Headers? Wellue/ViHealth PhadeL 0 262 03-05-2024, 12:04 AM
Last Post: PhadeL
  Caution: Wellue O2 Ring - Time Sync hybernate 9 1,475 03-04-2024, 01:31 PM
Last Post: Plmnb
  Viatom/WellUE data is different than OSCAR displayed data GordK 3 355 02-23-2024, 04:48 PM
Last Post: GordK


New Posts   Today's Posts


About Apnea Board

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