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

Is there a solution to read out the newer versions of the Contect CMS50F under Linux?
#1
Is there a solution to read out the newer versions of the Contect CMS50F under Linux?
It is a known problem that the newer versions of the Contec CMS50F pulse oximeter cannot be read out by Oscar 1.40 for Linux and also not by Myoxi. But I think there must be a way to fix this problem in a future release of Oscar for Linux.

Version CMS50F:
Hardware: 2.0.0
Software: 2.0.7

My Linux PC:

Linux Kernel by using the uname -r command in the Linux Terminal:
5.15.0-71-generic

OS: Linux Mint 20.3 Xfce

This device is indeed detected by my Linux system, after connecting CMS50F onto my PC and after powering it up, the device /dev/hidraw3 appears in the /dev directory.

Output lsusb -v after connecting CMS50F onto my PC and after powering it:

Bus 004 Device 002: ID 28e9:028a          Pulse Oximeter
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x28e9
  idProduct          0x028a
  bcdDevice            1.00
  iManufacturer           1         
  iProduct                2 Pulse Oximeter
  iSerial                 3 Pulse Oximeter
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0029
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              300mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      39
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

When I run Myoxi by using the /dev/hidraw3 device which appears after connecting and powering up the CMS50F, I get the following output:

sudo ./myoxi -d --port /dev/hidraw3 device
INFO[0000] Using device port: /dev/hidraw3              
ERRO[0000] Failed to open device port                    error="invalid argument" port=/dev/hidraw3
invalid argument

Why does this happen and can the developers of Oscar use this information to make Oscar recognising the newer versions of the Contec CMS50F?
Post Reply Post Reply
#2
RE: Is there a solution to read out the newer versions of the Contect CMS50F under Linux?
Hi Mast04! - Welcome
No one that is currently contributing to the OSCAR project owns a new model. This prevents obtaining the new communication protocol in order to write a viable loader based on the revised firmware.


If you understand C++ and Qt, the development suite used to build OSCAR, you can download the source code and help develop a loader for the newer CMS-50's. Both OSCAR and Qt are free. We are currently using Qt version 5.12.xx, even though the newer releases are in the 6.xx range.

- Red
Crimson Nape
Apnea Board Moderator
Project Manager for OSCAR - Open Source CPAP Analysis Reporter
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
#3
RE: Is there a solution to read out the newer versions of the Contect CMS50F under Linux?
I have no knowledge of C++, Qt and developing of any loader, but I think that the contributors of Oscar should buy a newer model of the CMS50F, in order to write a viable loader in Oscar, which is based upon the revised firmware of this device.
Post Reply Post Reply
#4
RE: Is there a solution to read out the newer versions of the Contect CMS50F under Linux?
I, for one, lack the financial resources to throw my money into something I will not use.  Since you appear not to be constrained with this disability, I purpose that you offer to purchase one and provide it to someone willing to take the time to develop a loader for it.

Sorry!  Confused  - That's the best I can offer.

- Red
Crimson Nape
Apnea Board Moderator
Project Manager for OSCAR - Open Source CPAP Analysis Reporter
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: Is there a solution to read out the newer versions of the Contect CMS50F under Linux?
Is donating to the Apnea Board via the Donate button enough to financially support the development of Oscar, so that (one of) the contributors can buy a newer Contec CMS50F?

I have bought my CMS50F to check my oxygen levels during sleeping, because I still suffer from some daytime fatigue even with consistently using my RsMed AirSense 10 Elite Cpap during sleeping. Pressure is 8 cm/H2O.
Post Reply Post Reply
#6
RE: Is there a solution to read out the newer versions of the Contect CMS50F under Linux?
Your offer is very kind indeed, but the Apnea Board and OSCAR are totally separate.  The Apnea Board graciously provides server space for OSCAR's contributors forum and download bandwidth.  The OSCAR contributors are usually apnea suffers that volunteer their time and effort in developing a free analysis software.   Many of us are retired old fogies, that have other interests in life that detract from full time development.  

Again, thank you for the offer.  It wouldn't hurt our feelings if you wish to donate to the Apnea Board to help support operational costs.  We are just a bunch of sleep apnea suffers trying to help each other.  Big Grin

- Red
Crimson Nape
Apnea Board Moderator
Project Manager for OSCAR - Open Source CPAP Analysis Reporter
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: Is there a solution to read out the newer versions of the Contect CMS50F under Linux?
Are there any other command line tools for Linux which can read out data from the newer versions of the CMS50F and save it to an SPO2 file? If possible, preferably precompiled binary tools which can be run from the command line without the need of compiling them before use.
Post Reply Post Reply
#8
RE: Is there a solution to read out the newer versions of the Contect CMS50F under Linux?
I too am a Linux user that is interested in downloading SpO2 data from a CMS50F (hardware version 2.0.0, software version 2.0.5) for direct import into OSCAR without using the Smart Device Assistant 3.1.0.1 software, which requires Windows.  A number of searches turned up nearly two dozen projects on github, but I did not investigate enough to determine which, if any, were compatible with the newer protocol used by version 2.0.0 of the hardware.  I did find a command line tool on the codeberg.org site which does work for me.  It is listed as pulseoxdl under the klimd user. (Note: I am unable to post the link directly)


Although it was created for the CMS50E, it worked fine with my CMS50F.  It does have to be compiled from code, but it was a simple process that was easily accomplished with Linux Mint.  One caveat noted is:   "The device has to have the "Auto" mode set at the "Record Menu", meaning that it will automatically start to record when it detects inserted finger and stop when the finger is out."  It is not known why this is a limitation, but it performed well when using this mode.  Setting up the udev rules also made it easier to use.  Make sure the user is a member of the "plugdev" group or sudo will have to be used to download the data.  Once downloaded, the SpO2 data was easy to import into OSCAR with the Oximetry Wizard.

The author stated: "[It was] written to liberate the user of the device from the need to use the proprietary software for downloading records."  And further: "It may be used standalone, but would be much more useful in sleep tracking and analysis free software, like OSCAR" so he obviously had that application in mind when creating the program.  Perhaps the devs could use the information from the source code to integrate it into OSCAR.
Post Reply Post Reply
#9
RE: Is there a solution to read out the newer versions of the Contect CMS50F under Linux?
@Stew51 03-05-2024, 07:27 PM:

Thanks for your reply about reading out the CMS50F under Linux Mint.
Post Reply Post Reply
#10
RE: Is there a solution to read out the newer versions of the Contect CMS50F under Linux?
aha, I joined here yesterday, and the 4 post before links, I can get around it. replace (dot) with a period/fullstop.
I registered with this board just to say thanks to @Stew , never too easy with Linux, but this page
codeberg(dot)org/klimd/pulseoxdl
helped to get it to download the data with reasonable instructions.
sudo ./pulseoxdl /dev/hidraw3 copy
(from the directory I installed it to)
Oscar could then pick it up from the files .csv and .SPO2
next level is for udev to get oscar to pick up the device. same CMS50F

( and a side note, I had one of these years ago, like more than 10 maybe 15, and by golly the runner thingy over the finger, how they have shrunk. not solid at all. probably wont last too long. also there is only one usb port from the unit, so I gather a 'live ' one is not possibly with pulseoxdl . also mine came in as /dev/hidraw3 and only when the unit was powered up.
and finally whilst the manufacturer Contex did have a go at providing the drivers,
contec(dot)com/download/list/driver-software/
I could not get them to work their way, which was not clear in instructions. but a good attempt by Chenglish coders (I assume)
and another attempt at drivers here one might try (I did, and failed there)
github9Dot0com/MarkMLl/Contec_cms50dplus
downloaded CMS50F data again today. this thing came off the finger twice last night, I will need to tape it down . and oscar is a bit all over the place lining up the times, depending on zoom level, but good enough to see.
i did this one in my bash alias to make it easy
pulseoxydl='cd ~/Downloads/pulseoxdl/pulseoxdl; sudo ./pulseoxdl /dev/hidraw3 copy; ls'
again the oximeter needs to be powered on (and you have to be fairly quick before it auto powers off )
Post Reply Post Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Anybody get the newer O2Ring-S data into OSCAR? Craiggvt 4 331 10-11-2024, 07:51 AM
Last Post: Craiggvt
  Linux Mint 22 grioghair 18 1,004 08-27-2024, 12:44 AM
Last Post: untoutseul05
  CMS50F data won't load to OSCAR SpO2Res 14 3,345 08-17-2024, 03:21 PM
Last Post: BetterWorld
  Oscar 1.5.3 for Linux freezes after clicking on 'CPAP Importer'. Mast04 13 1,102 05-04-2024, 02:11 AM
Last Post: Mast04
  Cannot read SD Card in Oscar? Tman1966 4 624 05-02-2024, 01:03 PM
Last Post: somewherein413
  OSCAR v1.5.2 - Linux Versions Crimson Nape 3 570 03-17-2024, 02:35 PM
Last Post: Crimson Nape
  CMS50F Oximeter Device not Recognized. ThinMountainAir 20 3,539 03-07-2024, 05:13 PM
Last Post: capman


New Posts   Today's Posts


About Apnea Board

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