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

Oximetry - Do any of the pulse oximeters work with linux?
#31
RE: Oximetry - Do any of the pulse oximeters work with linux?
Greg's command is a much better choice:
$ sudo lsusb -v -d10C4:|grep iProduct

Here is the page that has the SiLabs doc on USB bridges:

https://www.silabs.com/support/pages/doc...%20Bridges

There are a batch of App Notes that I downloaded and haven't read yet. I hope to get to them before my CMS50F arrives.
Post Reply Post Reply
#32
RE: Oximetry - Do any of the pulse oximeters work with linux?
I have to make a retraction of my statement that the driver code would not compile on my machine. I can build the driver. However, I cannot build the test program that is included with the driver. Still, I'm not sure I want to replace my driver, unless it is pretty sure it is going to work.

Maybe it is just operator error. How did you connect your CMS50F to SH?
Post Reply Post Reply
#33
RE: Oximetry - Do any of the pulse oximeters work with linux?
I discovered a few things about the interface to my Veridian 11-50DP oximeter:
  1. The USB cable is not a standard USB cable. I discovered this the hard way by switching it for one of those retractable USB cables, losing the original cable, and then calling up customer service to complain. When customer service said they had never heard of my problems, I threatened to return it to Costco for a refund. Fortunately I thought I should find and try the original cable before getting my refund. The original cable worked, none of the other more standard mini-USB cables I tried worked.
  2. Last night I managed to confuse myself about whether the oximeter was plugged in or not. I was typing 'lsusb -d10C4:' and checking whether it depended on whether the screen was powered on or not. Then it dawned on me that the CP2102 chip is in the cable, not the oximeter body: It makes a big difference which end of the cable is disconnected.
  3. Most of the time dmesg was showing that the cp10x driver was connecting then almost immediately disconnecting when I disconnected then connected the cable. Every once in a while it didn't disconnect. I wondered if it mattered which end of the cable I connected first, whether the oximeter screen was black or not, what file in /sys/bus/usb/ I had just accessed.
(12-03-2015, 12:38 PM)GregLawson Wrote:
(11-28-2015, 10:34 AM)happydreams Wrote: Or things to look for?
$ screen /dev/ttyUSB0
You may have to change permissions on /dev/ttyUSB0 (e.g. add self to the dialout group) and guess the baud rate (9600 or max?)
Be sure to read 'man screen' for the arcane exit command key sequence.
I enterred:
$ screen /dev/ttyUSB0 115200
And I got a constant stream of circular blobs with white question marks on them.
If I let the oximeter screen timeout and go black the characters quit streaming. If I turned the oximeter back on the characters returned.
My interpretation is that
  1. the driver is at least partially working
  2. I guessed the wrong speed (or possibly wrong parity or stop bits or binary values that are not valid printable characyters) causing the garbage character display,
  3. No command is required to get the oximeter to transmit
The path forward includes:
  1. Trying different baud rates, etc. (or search the code for this info),
  2. read file /dev/ttyUSB0 (which is streaming something) and dump in hex, see what values correspond to the oximeter display (or search the code for this info),
Unfortunately but coincidentally my favorite Linux system hangs a few minutes after booting up; I think I should have been much more careful about letting Gnome upgrade. So I'll be posting from my Acer Switch under Windows (it's a nightmare to install Linux on these 32/64 bit hybrids) while I fix my Debian installation. The positive side is that I should be able to test my oximeter on the presumably working Windows SleepyHead.
If I post quickly, I'm likely to say something stupid, if I wait till I can't say something stupid, I may never post.
If you are reading this I hope that I''ve achieved the right trade-off between signal and noise.
Post Reply Post Reply
#34
RE: Oximetry - Do any of the pulse oximeters work with linux?
(12-06-2015, 09:33 PM)GregLawson Wrote: I discovered a few things about the interface to my Veridian 11-50DP oximeter: . . .
. . . The USB cable is not a standard USB cable.

FYI:
The newer CMS-50 "F" and "I" models with version 3.7 firmware use a standard USB cable for their connection.
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
#35
RE: Oximetry - Do any of the pulse oximeters work with linux?
(12-04-2015, 08:51 AM)GregLawson Wrote: I have yet another new project:
  1. Move a Windows computer into my bedroom.
  2. Record a night with CPAP and oximeter.
  3. Automatically? align data in SH.
When I tried the Windows version of SleepyHead, I was disappointed to learn that it didn't work any better for my Veridian 11-50DP oximeter than the Linux version. In fact it was a little worse, the first time I ran SH it crashed; so far in a few days of SH on Linux it hasn't crashed at all.
Using the Windows SH oximeter import wizard:
  1. The 'record attached to a computer' option is dimmed and not clickable.
  2. If I click 'Import directly from a recording on a device', it searches for an oximeter ('Scanning for compatible oximeters'), but doesn't recognize the Veridian 11-50DP. The cancel button does nothing; the only way out is to click the close window box and confirm you want to kill SleepyHead (and possibly lose data). If the oximeter's display is black when I hit enter the wizard, I got slightly farther to a message 'Connecting to oximeter', but that seemed to hang also.
(12-04-2015, 08:51 AM)GregLawson Wrote: I think the short term solution to the time-alignment problem (see start page of SH oximeter wizard) is to use the SH oximeter import wizard button to "Record attached to computer overnight (provides plethysomogram)".
I guess I was wrong here. The only working short term solution to the time-alignment problem is the all manual approach.
(12-04-2015, 08:51 AM)GregLawson Wrote:
  1. Export aligned data to a csv file.
  2. Import data into my favorite statistical analysis program (open source R anyone?)
  3. Somehow statistically correlate CPAP apnea scoring with SPO2 desaturation scoring.
  4. Hopefully feel relatively confident that SPO2 desaturation is the unambiguous metric of success for CPAP treatment.
SleepyHead's csv export function is less detailed than I had hoped. SH seems to be exporting summary data, not the data behind the squiggly graphs. Presumably all the squiggly data is in the binary files SH has been helpfully collecting.
If I post quickly, I'm likely to say something stupid, if I wait till I can't say something stupid, I may never post.
If you are reading this I hope that I''ve achieved the right trade-off between signal and noise.
Post Reply Post Reply
#36
RE: Oximetry - Do any of the pulse oximeters work with linux?
Bump. Anyone make progress? Is there a way I could monitor the unit's output? I see the use of screen. I am not getting any output, this may be due to permissions. No activity. I have set the serial port /dev/ttyUSB0 according to the code in serialoximeter.cpp (excerpted below) to 19200, odd parity, 8 data bit, 1 stop bit, and no flow control.

bool SerialOximeter::openDevice()
{
if (port.isEmpty()) {
if (!scanDevice("",m_vendorID, m_productID))
return false;
}
serial.setPortName(port);
if (!serial.open(QSerialPort::ReadWrite))
return false;

// forward this stuff

// Set up serial port attributes
serial.setBaudRate(QSerialPort::Baud19200);
serial.setParity(QSerialPort::OddParity);
serial.setStopBits(QSerialPort::OneStop);
serial.setDataBits(QSerialPort:Big Grinata8);
serial.setFlowControl(QSerialPort::NoFlowControl);

m_streaming = true;
m_abort = false;
m_importing = false;

// connect relevant signals
connect(&serial,SIGNAL(readyRead()), this, SLOT(dataAvailable()));

return true;
}

Nothing showing on gtkterm Sad Even if I run as sudo gtkterm. More importantly, nothing showing up in SleepyHead.

Am I missing something like I need to be in a certain menu of the CMS50F? Or something equally simple? Or is this unit a dud?

Post Reply Post Reply
#37
RE: Oximetry - Do any of the pulse oximeters work with linux?
@ HappyDreams - Take a look at SleepLib/loader_plugins/cms50f37_loader.cpp - you will see that it uses 115200 baud, among other things... the plugin overloads the openDevice method, and most of the others.
I also have enabled debug output on the sleepyhead command line; it shows a whole bunch of stuff going back and forth. I'm afraid I have to do the holiday cleanup routine, and I will get back at this after Christmas.
Post Reply Post Reply
#38
RE: Oximetry - Do any of the pulse oximeters work with linux?
(12-18-2015, 03:37 PM)pholynyk Wrote: @ HappyDreams - Take a look at SleepLib/loader_plugins/cms50f37_loader.cpp - you will see that it uses 115200 baud, among other things... the plugin overloads the openDevice method, and most of the others.
I also have enabled debug output on the sleepyhead command line; it shows a whole bunch of stuff going back and forth. I'm afraid I have to do the holiday cleanup routine, and I will get back at this after Christmas.

Thanks for taking a look at this. I appreciate your efforts and others in this thread.
How do I enter the debug flag? I would like to know this for future issues.

I hate to mark this issue closed, but, after issuing a few break commands to the CMS50F, (via gtkterm) I reconnected the oximeter to SH. Much to my surprise, I was able to connect! I can't tell what I did different from last time, but I was able to import the old data I collected on 11/27. This morning, I was able to collect data from last night and review it in SleepyHead. What I found is the subject of a different thread.

Thanks again.

Post Reply Post Reply
#39
RE: Oximetry - Do any of the pulse oximeters work with linux?
Oh boy, I did that so long ago I had to double check. Apparently debug mode is the standard build for Linux, as I don't recall changing the build file. Somewhere near your source code directory you should find a directory called build-SleepyHeadQT-Desktop-Debug - if you do, you have debug mode enabled. Then all you have to do is start SleepyHead from a shell, or edit your launch menu for SleepyHead to check off the 'Launch from Terminal' box that should be there. That should result in much output which you can save by doing a 'select-all' Ctrl-A and 'copy' Ctrl-C, and then 'paste' Ctrl-V into an empty edit window.
Post Reply Post Reply
#40
RE: Oximetry - Do any of the pulse oximeters work with linux?
I use this one with Linux to download recorded data from my cms50d+ (ver 4.6) which uses 115200 baud:

Code:
https:// github.com/airikka/spo2cms50dplus


Maybe it works with other models?
Does not support live data.
Post Reply Post Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Is there a solution to read out the newer versions of the Contect CMS50F under Linux? Mast04 10 806 03-25-2024, 08:46 PM
Last Post: Pierelly
  Questions about the Oximetry Preferences setting.... Lucky7 4 144 03-23-2024, 04:35 PM
Last Post: croc297
  OSCAR v1.5.2 - Linux Versions Crimson Nape 3 120 03-17-2024, 02:35 PM
Last Post: Crimson Nape
  Importing Oximetry data billmelk 1 133 03-10-2024, 02:27 PM
Last Post: Crimson Nape
  python file converter for EMAY sleep pulse oximeter joeblough 1 611 03-04-2024, 10:26 PM
Last Post: ElectricalPaul
Sad Oscar 1.5.1 Doesn't work on Somoma 14.3.1 biyahero 9 378 02-28-2024, 02:00 AM
Last Post: biyahero
Question Is there a way of formatting a 64gb SD card to work with the AirCurve 10? niurefine 4 607 01-09-2024, 05:28 PM
Last Post: Crimson Nape


New Posts   Today's Posts


About Apnea Board

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