ResMed smart card - any further info?

General Discussion on any topic relating to CPAP and/or Sleep Apnea.
User avatar
turbosnore
Posts: 293
Joined: Wed Nov 05, 2008 7:00 am
Location: Nokia (town), Finland

ResMed smart card - any further info?

Post by turbosnore » Sat Jul 18, 2015 7:57 am

I know this is not quite a question that belongs here, but the smart card is specific and probably only sleep apnea people have had anything to do with it, so:
Does anyone have any info about it?

It works fine on my windows machine (with ARC32U-reader), but I haven't yet found any other program that accepts that card. Most of the programs indicate that the card is not powered.
When it's in use by ResScan, the Windows driver shows properties 'MCU' and 'T0 / T1'.
So far I haven't found a single Linux program that could make a contact with the card.

_________________
Mask: AirFit™ F10 Full Face Mask with Headgear
Additional Comments: Not sure about the gear yet, SW used is SleepyHead
De-bugging is for sissies, real men do de-monstrations.

PoolQ
Posts: 498
Joined: Sat Jul 11, 2015 10:41 am
Location: Silicon Valley

Re: ResMed smart card - any further info?

Post by PoolQ » Sat Jul 18, 2015 10:06 am

Windows here, but explorer sees the files fine-so the format is standard. Data structure on the other hand is custom. You might check out sleepyhead OPEN SOURCE software to see how it handles the card and format. Make sure you write protect the card as I hear that any system writes to the card will kill your data. maybe causing you to start over with compliance.
Sleeping MUCH better now

User avatar
Pugsy
Posts: 64094
Joined: Thu May 14, 2009 9:31 am
Location: Missouri, USA

Re: ResMed smart card - any further info?

Post by Pugsy » Sat Jul 18, 2015 10:21 am

PoolQ wrote:Windows here, but explorer sees the files fine-so the format is standard. Data structure on the other hand is custom. You might check out sleepyhead OPEN SOURCE software to see how it handles the card and format. Make sure you write protect the card as I hear that any system writes to the card will kill your data. maybe causing you to start over with compliance.
Smart cards aren't the same as the SD card in your machine and SleepyHead won't work with Smart Cards.
Smart cards were used on the ResMed S8 and older machines which is what OP is talking about here.
A very special card reader is needed to get the data from the smart card to the software on the computer.

Smart cards look like this
https://www.cpap.com/productpage/resmed ... -card.html
and are only compatible with ResScan software. Mark was attempting to make SleepyHead compatible but I think that project got tabled.
There is a way to make your own smart card but it involves again a very special type of smart card.

To Turbosnore.....I don't know much about the smart cards other than what I just mentioned. I know even less about the readers themselves. Sorry.

_________________
Machine: AirCurve™ 10 VAuto BiLevel Machine with HumidAir™ Heated Humidifier
Additional Comments: Mask Bleep Eclipse https://bleepsleep.com/the-eclipse/
I may have to RISE but I refuse to SHINE.

If you want to try the Eclipse mask and want a special promo code to get a little off the price...send me a private message.

User avatar
Jay Aitchsee
Posts: 2936
Joined: Sun May 22, 2011 12:47 pm
Location: Southwest Florida

Re: ResMed smart card - any further info?

Post by Jay Aitchsee » Sat Jul 18, 2015 10:47 am

Hi, not sure exactly what you're trying to accomplish, but ResScan is a Windows program and the data on the card is meant to be read by ResScan. That said, I would think you would be able to open/examine the card with another program/OS given the proper query, but that's beyond my expertise.
If you put acr38 in the search box above, you'll find several threads which discuss the card and reader. Might be some help in one of them. Additionally, Advanced Card Systems, the manufacturer, has a pretty good website, http://www.acs.com.hk/en/driver/4/acr38 ... rd-reader/, with info on the readers and cards suitable for advanced users and developers which you might find helpful.

_________________
Mask: AirFit™ P10 Nasal Pillow CPAP Mask with Headgear
Additional Comments: S9 Auto, P10 mask, P=7.0, EPR3, ResScan 5.3, SleepyHead V1.B2, Windows 10, ZEO, CMS50F, Infrared Video

PoolQ
Posts: 498
Joined: Sat Jul 11, 2015 10:41 am
Location: Silicon Valley

Re: ResMed smart card - any further info?

Post by PoolQ » Sat Jul 18, 2015 11:01 am

Pugsy wrote:
PoolQ wrote:Windows here, but explorer sees the files fine-so the format is standard. Data structure on the other hand is custom. You might check out sleepyhead OPEN SOURCE software to see how it handles the card and format. Make sure you write protect the card as I hear that any system writes to the card will kill your data. maybe causing you to start over with compliance.
Smart cards aren't the same as the SD card in your machine and SleepyHead won't work with Smart Cards.
Smart cards were used on the ResMed S8 and older machines which is what OP is talking about here.
A very special card reader is needed to get the data from the smart card to the software on the computer.

Smart cards look like this
https://www.cpap.com/productpage/resmed ... -card.html
and are only compatible with ResScan software. Mark was attempting to make SleepyHead compatible but I think that project got tabled.
There is a way to make your own smart card but it involves again a very special type of smart card.

To Turbosnore.....I don't know much about the smart cards other than what I just mentioned. I know even less about the readers themselves. Sorry.
Yep, I missed that, was focusing on Linux and not the card itself
Sleeping MUCH better now

User avatar
turbosnore
Posts: 293
Joined: Wed Nov 05, 2008 7:00 am
Location: Nokia (town), Finland

Re: ResMed smart card - any further info?

Post by turbosnore » Sat Jul 18, 2015 11:20 am

With a example (windows-)application from ACS' page I managed to dump the first 256 bytes of the contents.
That was, unfortunately, not enough to figure out the format.
I thought, with Linux I might be able to dump the whole contents, but no SW (I found) this far hasn't been able
to connect to the card, even if the reader itself works fine.

I discussed the possibility of smart card support with jedimark quite some time ago, but then the Linux infrastructure for smart card readers changed and the reader stopped working in Linux. I become interested again now that a new driver supporting the new Linux smart card infrastructure is available.

I know there are people that know about these kinds of HW. Maybe someone happens to know...

_________________
Mask: AirFit™ F10 Full Face Mask with Headgear
Additional Comments: Not sure about the gear yet, SW used is SleepyHead
De-bugging is for sissies, real men do de-monstrations.

User avatar
billbolton
Posts: 2266
Joined: Wed Jun 07, 2006 7:46 pm
Location: Sydney, Australia

Re: ResMed smart card - any further info?

Post by billbolton » Sat Jul 18, 2015 3:56 pm

turbosnore wrote:So far I haven't found a single Linux program that could make a contact with the card.
Smartcards can be used for all sorts of data related purposes, however, most of the common software libraries which offer Smartcards support assume that a card is being used for a financial service related purpose, or a security/identity related purpose.

The device standards used by Resmed are for more general purposes. It been quite a while now since I used an S8, so I can't remember off hand what standards the Resmed implementation was based on, but they were nothing particularly exotic

_________________
MachineMask
Additional Comments: Airmini, Medistrom Pilot 24, CMS 60C Pulse Oximeter, ResScan 6

PoolQ
Posts: 498
Joined: Sat Jul 11, 2015 10:41 am
Location: Silicon Valley

Re: ResMed smart card - any further info?

Post by PoolQ » Sat Jul 18, 2015 4:18 pm

You may have already checked this thread
viewtopic/t70575/viewtopic.php?f=1&t=64 ... 38#p603330
http://www.acs.com.hk/en/products/26/ac ... rt-floppy/
I2C smart card with standard serial EEPROM on board
Betting a small arduino could interface with it and convert to USB
is there a Linux i2C bit banger driver?
Sleeping MUCH better now

User avatar
turbosnore
Posts: 293
Joined: Wed Nov 05, 2008 7:00 am
Location: Nokia (town), Finland

Re: ResMed smart card - any further info?

Post by turbosnore » Sun Jul 19, 2015 5:54 am

Well, nothing there about my problem, and I don't quite get the relevance of the smart floppy.
My reader is ARC38U-SPC-R, and it works fine with ResScan.

My problem is to figure out about the card so that the contents could be dumped out as binary data.
The first thing would be accessing the card in Linux. I guess it would help if I got some info about
the smart card. Maybe it's really one of the supported SLE-cards?

Both Windows and Linux identify the reader right.

_________________
Mask: AirFit™ F10 Full Face Mask with Headgear
Additional Comments: Not sure about the gear yet, SW used is SleepyHead
De-bugging is for sissies, real men do de-monstrations.

PoolQ
Posts: 498
Joined: Sat Jul 11, 2015 10:41 am
Location: Silicon Valley

Re: ResMed smart card - any further info?

Post by PoolQ » Sun Jul 19, 2015 8:03 am

According to that link, your card reader just handles the I2C interface. That smart card is just a serial EEPROM, so just plain old memory that requires a low level interface to access. No security, no special registers or anything. The web site has a list of cards that the reader will work with so you should be able to go get a spec sheet that will tell you how to read the entire card. Arduino's have I2C interfaces and drivers AND USB interfaces and drivers, would be easy to code up the Arduino to dump the card and pass it to the USB port, so to your computer. Just saying. Your card reader should have zero problem with the smart card. It sounds like either the driver or the app you are using is expecting the card to be formatted and when it discovers that the expected format is not on the card it is throwing an error.

Right now I am programming an Arduino to control my espresso machine.
Sleeping MUCH better now

User avatar
turbosnore
Posts: 293
Joined: Wed Nov 05, 2008 7:00 am
Location: Nokia (town), Finland

Re: ResMed smart card - any further info?

Post by turbosnore » Sun Jul 19, 2015 8:26 am

PoolQ wrote:According to that link, your card reader just handles the I2C interface.
???
That smart card is just a serial EEPROM, so just plain old memory that requires a low level interface to access. No security, no special registers or anything. The web site has a list of cards that the reader will work with so you should be able to go get a spec sheet that will tell you how to read the entire card.
I don't know. It doesn't seem to identify itself with ATR. The Linux SW (tried several) report that the card is not powered.
Some windows programs do the same.
Arduino's have I2C interfaces and drivers AND USB interfaces and drivers, would be easy to code up the Arduino to dump the card and pass it to the USB port, so to your computer. Just saying. Your card reader should have zero problem with the smart card. It sounds like either the driver or the app you are using is expecting the card to be formatted and when it discovers that the expected format is not on the card it is throwing an error.
The card contains S8 Autoset recorded data - ResScan read it without any problems.
Right now I am programming an Arduino to control my espresso machine.
I've been trying to write a standalone gdb-stub for RPi 2B - and I'm getting totally frustrated with Cortex A7 instruction set. (Single stepping.)

_________________
Mask: AirFit™ F10 Full Face Mask with Headgear
Additional Comments: Not sure about the gear yet, SW used is SleepyHead
De-bugging is for sissies, real men do de-monstrations.

PoolQ
Posts: 498
Joined: Sat Jul 11, 2015 10:41 am
Location: Silicon Valley

Re: ResMed smart card - any further info?

Post by PoolQ » Sun Jul 19, 2015 9:43 am

If this is indeed just a memory card, there is no ATR. It is a dumb serial EEPROM, not smart at all. This is old tech

http://www.best-microcontroller-project ... orial.html
this is what the card reader implements, it's just the hardware handshake with the card so you as the programmer does not have to mess with it. Think of it as a driver implemented in hardware.
Here is a "smart card" that is really serial EEPROM just on a card
http://www.atmel.com/Images/doc1661.pdf
this is what the reader does to the card to talk with it.
Think of it as a USB memory stick with a different physical format. It could be formatted with FAT32, but doubt it is.

Your problem is not really knowing how to talk with the card reader driver and it sounds like your app is looking for a "real" smart card and not seeing one.

What are the commands that the card reader understands and how are they formatted? Anyway to discover what the reader driver supports on the application side? Reset, Erase, Read, Write...

If/when you do dump the card you will get a whole bunch of bytes that you don't know the format of: single, double, integer..dates, pressures. The road is not easy, but can be done.
We don't really know the card type, memory type, memory size, format, data contained. The "smart card" may also have a micro processor on board and then it's another story

"ResScan read it without any problems" they own it and know what it is, how to communicate with the driver and what format the data is in.
Sleeping MUCH better now

User avatar
Krelvin
Posts: 1977
Joined: Tue Jun 06, 2006 5:23 pm
Location: Metro Phx Area - Dry Heat!

Re: ResMed smart card - any further info?

Post by Krelvin » Sun Jul 19, 2015 9:58 am

turbosnore wrote:The card contains S8 Autoset recorded data - ResScan read it without any problems.
Yeah well ResScan is made by the Maker of the S8 and they know what the proprietary format is. I pretty sure they have never published it though. There would be little incentive for them to do that.

The newer series formats are known though, they have been figured out several times by various people including Mark that makes SleepyHead. You can find that format in many locations if you want to look at it, but I have no idea if the formats are similar or 100% different. And the source code for SleepyHead is open source so you could look at that if you wanted.

As for accessing the data on an S8, you will just have to figure it out on your own. I doubt there is much interest in doing so by others since that series has been superseded by two newer series which is where the bulk of the users are now. Most people don't even have the hardware to read that type of card to bother with it as well.

Nice project to spend a lots of time on if you have nothing else to do.
Current Settings PS 4.0 over 10.6-18.0 (cmH2O) - Resmed S9 VPAP Auto w/h5i Humidifier - Quattro Air FFM
TNET Sleep Resource Pages - CPAP Machine Database
Put your equip in your Signature - SleepyHead v1.0.0-beta-1
Kevin... alias Krelvin

User avatar
turbosnore
Posts: 293
Joined: Wed Nov 05, 2008 7:00 am
Location: Nokia (town), Finland

Re: ResMed smart card - any further info?

Post by turbosnore » Sun Jul 19, 2015 10:29 am

To my understanding, there still should be ATR, like

Code: Select all

3B 04 92 23 10 91
	Siemens SLE 4432/42 card

3B B2 11 00 10 80 00 02
	Atmel memory card AT88SC0204C (Atmel memory card)
	http://www.atmel.com/dyn/resources/prod_documents/doc5211.pdf
What are the commands that the card reader understands and how are they formatted?
I really don't know. pcscd handles it, and I haven't found many smart card handling applications.
With gscriptor you should be able to send APDUs, and I think they go to the reader.
It's just that both on Linux and on Windows, the scanner reports that the inserted card is not powered.
Some other "excercisers" reported that it doesn't respond to reset.

My first goal is to figure out what should I send down to make the communication between the reader and the card to work.
That's why I wondered if it's one of the SLE-cards or something.

_________________
Mask: AirFit™ F10 Full Face Mask with Headgear
Additional Comments: Not sure about the gear yet, SW used is SleepyHead
De-bugging is for sissies, real men do de-monstrations.

User avatar
palerider
Posts: 32300
Joined: Wed Dec 16, 2009 5:43 pm
Location: Dallas(ish).

Re: ResMed smart card - any further info?

Post by palerider » Sun Jul 19, 2015 11:49 am

I haven't figured out why turbosnore approaches subjects obliquely as he does, (witness his approach to finding out how people in finland, but not him, could buy machines at lower costs), instead of just coming out and saying his end goal, but it is what it is.

his goal here is to get sleepyhead working with the s8.

mark has said that he's not interested in working on that unless he can get linux and mac to read the data, and doesn't want to have to custom code everything.

if turbosnore can figure out how to get the data off the card in linux, that might translate into doing it on mac, and that could very well open up getting the data everywhere, and open up the possibility of having the s8 machines be supported in sleepyhead.

turbosnore, I suggest you ping jay, the guy that wrote the posts linked above, he's still around, he's a nice guy, and he's clever, he may have some info that'd help you.

_________________
Mask: Bleep DreamPort CPAP Mask Solution
Additional Comments: S9 VPAP Auto
Get OSCAR

Accounts to put on the foe list: dataq1, clownbell, gearchange, lynninnj, mper!?, DreamDiver, Geer1, almostadoctor, sleepgeek, ajack, stom, mogy, D.H., They often post misleading, timewasting stuff.