04-27-2023, 10:10 AM
(This post was last modified: 04-27-2023, 10:14 AM by Mast04.)
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?
RE: Is there a solution to read out the newer versions of the Contect CMS50F under Linux?
Hi Mast04! -
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
04-27-2023, 10:31 AM
(This post was last modified: 04-27-2023, 10:37 AM by Mast04.)
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.
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! - That's the best I can offer.
- Red
04-27-2023, 12:41 PM
(This post was last modified: 04-27-2023, 12:49 PM by Mast04.)
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.
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.
- Red
04-28-2023, 01:09 AM
(This post was last modified: 04-28-2023, 01:11 AM by Mast04.)
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.
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.
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.
03-20-2024, 12:16 AM
(This post was last modified: 03-20-2024, 12:17 AM by Pierelly.
Edit Reason: name placement.
)
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 )
|