Post Reply 
SDHC Flashair card in PAPs
Author Message
JJJ Offline

Advisory Members

Posts: 751
Joined: Apr 2012

Machine: ResMed S9 Autoset
Mask Type: Nasal mask
Mask Make & Model: Most recent: Wisp, Pilairo, Mirage Vista
Humidifier: ResMed S9 Autoset
CPAP Pressure: 17-20
CPAP Software: SleepyHead

Other Comments:

Sex: Male
Location: USA 97217

Post: #21
RE: SDHC Flashair card in PAPs
I ordered a 16 GB Flashair card with the intent to see if I could get it working on Linux. I have sort of succeeded, although there are some rough edges yet, and I can't get SleepyHead to see the data. That is, I downloaded last night's data from the Flashair into a folder /home/jjj/CPAP/Resmed/DATALOG/ (eight files), but regardless of which folder I point SleepyHead at it does not import last night's data.

There is another problem: Apparently the Flashair times out after a short time and no longer appears in my list of wifi connections. To get it reappear I have to remove and reinsert the card into the S9 Autoset. This is a significant PITA that I hope I can resolve.

Toshiba ships the Flashair with WPA2 encryption and the default password 12345678. Considering the very limited range of the Flashair I find this ridiculous. I entered the Startup menu once I connected to the Flashair and deleted the password. Now it appears as an open network. If the NSA wants my CPAP data they're welcome to send someone to stand in my front yard and download it.

It didn't take me too long to write a bash script to download the data:

#!/bin/bash
wget -qO - http://192.168.0.1/DATALOG | grep 'DATALOG.*fname' | sed -e "s/^.*fname\"\:\"//" -e "s/\", \"fsize.*//" | while read line; do cd /home/jjj/CPAP/Resmed/DATALOG; wget "http://192.168.0.1/DATALOG/$line";done

If a Linux user wants to use this script just copy and paste it into your favorite text editor (Gedit, Kate, Mousepad, Vi, etc.) and save the file. Make the file executable in the Permissions menu. But note that you will need to change '/home/jjj/CPAP/Resmed/DATALOG' to the folder where you want to save the data. And note that the script copies the files in the DATALOG folder on the Flashair but not the DATALOG folder itself, so you need to create a DATALOG folder to place them in, as I did.

One rough edge is that wget will copy every file that it finds in the DATALOG folder on the Flashair, and if the file already exists in the DATALOG folder on your computer, it will recreate it, appending -1, -2, etc. to the copies. I need to figure out how to tell wget, 'if the file already exists, skip it,' else the DATALOG folder on my computer will soon become horribly cluttered with copies of files.

I'm off to study the documentation for wget. Meantime, any suggestions and comments are welcome.
11-17-2014 09:20 PM
Find all posts by this user Post Reply Quote this message in a reply

Donate to Apnea Board
Galactus Online

Advisory Members

Posts: 1,388
Joined: Jan 2014

Machine: Phillips Respironics System One PRS1 DS760P Auto BiPAP
Mask Type: Nasal pillows
Mask Make & Model: ResMed Airfit P10 Nasal Pillow
Humidifier: System One Heated Humidifier + Climate Line
CPAP Pressure: E/I 13/20 PS 4/7 BiFlex 3
CPAP Software: SleepyHead EncoreBasic

Other Comments: Sleep can be a good thing.

Sex: Male
Location: USA

Post: #22
RE: SDHC Flashair card in PAPs
(11-17-2014 09:20 PM)JJJ Wrote:  I ordered a 16 GB Flashair card with the intent to see if I could get it working on Linux. I have sort of succeeded, although there are some rough edges yet, and I can't get SleepyHead to see the data. That is, I downloaded last night's data from the Flashair into a folder /home/jjj/CPAP/Resmed/DATALOG/ (eight files), but regardless of which folder I point SleepyHead at it does not import last night's data.

There is another problem: Apparently the Flashair times out after a short time and no longer appears in my list of wifi connections. To get it reappear I have to remove and reinsert the card into the S9 Autoset. This is a significant PITA that I hope I can resolve.

Toshiba ships the Flashair with WPA2 encryption and the default password 12345678. Considering the very limited range of the Flashair I find this ridiculous. I entered the Startup menu once I connected to the Flashair and deleted the password. Now it appears as an open network. If the NSA wants my CPAP data they're welcome to send someone to stand in my front yard and download it.

It didn't take me too long to write a bash script to download the data:

#!/bin/bash
wget -qO - http://192.168.0.1/DATALOG | grep 'DATALOG.*fname' | sed -e "s/^.*fname\"\:\"//" -e "s/\", \"fsize.*//" | while read line; do cd /home/jjj/CPAP/Resmed/DATALOG; wget "http://192.168.0.1/DATALOG/$line";done

If a Linux user wants to use this script just copy and paste it into your favorite text editor (Gedit, Kate, Mousepad, Vi, etc.) and save the file. Make the file executable in the Permissions menu. But note that you will need to change '/home/jjj/CPAP/Resmed/DATALOG' to the folder where you want to save the data. And note that the script copies the files in the DATALOG folder on the Flashair but not the DATALOG folder itself, so you need to create a DATALOG folder to place them in, as I did.

One rough edge is that wget will copy every file that it finds in the DATALOG folder on the Flashair, and if the file already exists in the DATALOG folder on your computer, it will recreate it, appending -1, -2, etc. to the copies. I need to figure out how to tell wget, 'if the file already exists, skip it,' else the DATALOG folder on my computer will soon become horribly cluttered with copies of files.

I'm off to study the documentation for wget. Meantime, any suggestions and comments are welcome.

Hey there,

I believe the data must be in a main directory for sleepyhead to see it, it can't be buried in a sub folder.

The Flashair time out can be set using the software for it, check the website they have a config for it and it allows the time out setting to be modified.

Why not just set the copy to overwrite? Sleepyhead imports the data and saves it elsewhere anyway.

Lmk if I can help in any other way.

If everyone thinks alike, then someone isn't thinking.
Everyone knows something, together we could know everything.
11-17-2014 09:30 PM
Find all posts by this user Post Reply Quote this message in a reply
JJJ Offline

Advisory Members

Posts: 751
Joined: Apr 2012

Machine: ResMed S9 Autoset
Mask Type: Nasal mask
Mask Make & Model: Most recent: Wisp, Pilairo, Mirage Vista
Humidifier: ResMed S9 Autoset
CPAP Pressure: 17-20
CPAP Software: SleepyHead

Other Comments:

Sex: Male
Location: USA 97217

Post: #23
RE: SDHC Flashair card in PAPs
(11-17-2014 09:30 PM)Galactus Wrote:  I believe the data must be in a main directory for sleepyhead to see it, it can't be buried in a sub folder.
The Flashair time out can be set using the software for it, check the website they have a config for it and it allows the time out setting to be modified.
Why not just set the copy to overwrite? Sleepyhead imports the data and saves it elsewhere anyway.

SleepyHead problem solved. It turns out that the S9 Autoset writes four files to the root of the SD card as well as the eight daily data files to the DATALOG folder:

Identification.tgt
Identification.crc
Str.edf
Str.crc
[DATALOG]

I created the DATALOG folder and put the eight files in it from the Flashair, but I didn't copy the other four files to the root of the folder. After I copied the four files over SleepyHead was happy to import the data. I assume these four files just identify the machine and won't change. I'll find out tomorrow morning if that assumption was right or not. Smile

As for wget (web-get), it is an extremely robust command line utility generally used to grab files from ftp servers. I am sure it can be convinced not to bother downloading files that already exist. I just have to find some time to read the man page.

I also discovered that you can set the Flashair timeout in milliseconds, or if you enter 0 it will never time out. Now I just have to figure out how to change the configurations when I can't run the graphical utility that Toshiba provides.
11-18-2014 12:29 AM
Find all posts by this user Post Reply Quote this message in a reply

Donate to Apnea Board
Galactus Online

Advisory Members

Posts: 1,388
Joined: Jan 2014

Machine: Phillips Respironics System One PRS1 DS760P Auto BiPAP
Mask Type: Nasal pillows
Mask Make & Model: ResMed Airfit P10 Nasal Pillow
Humidifier: System One Heated Humidifier + Climate Line
CPAP Pressure: E/I 13/20 PS 4/7 BiFlex 3
CPAP Software: SleepyHead EncoreBasic

Other Comments: Sleep can be a good thing.

Sex: Male
Location: USA

Post: #24
RE: SDHC Flashair card in PAPs
I believe you can configure the card from a smartphone or tablet. The info and apps/drivers etc can be found here (I think) http://www.toshiba-components.com/FlashAir/tools.html

If everyone thinks alike, then someone isn't thinking.
Everyone knows something, together we could know everything.
11-18-2014 12:44 AM
Find all posts by this user Post Reply Quote this message in a reply
Jack_Russell_Fan Offline

Preferred Members

Posts: 81
Joined: Nov 2014

Machine: PRS1 760P
Mask Type: Nasal pillows
Mask Make & Model: Tap Pap
Humidifier: PRS1 heated hose
CPAP Pressure: 15.5 - 6.5
CPAP Software: SleepyHead

Other Comments: Sleep Master wireless data transfer

Sex: Male
Location: Ellijay, GA

Post: #25
RE: SDHC Flashair card in PAPs
(11-18-2014 12:29 AM)JJJ Wrote:  
(11-17-2014 09:30 PM)Galactus Wrote:  I believe the data must be in a main directory for sleepyhead to see it, it can't be buried in a sub folder.
The Flashair time out can be set using the software for it, check the website they have a config for it and it allows the time out setting to be modified.
Why not just set the copy to overwrite? Sleepyhead imports the data and saves it elsewhere anyway.

SleepyHead problem solved. It turns out that the S9 Autoset writes four files to the root of the SD card as well as the eight daily data files to the DATALOG folder:

Identification.tgt
Identification.crc
Str.edf
Str.crc
[DATALOG]

I created the DATALOG folder and put the eight files in it from the Flashair, but I didn't copy the other four files to the root of the folder. After I copied the four files over SleepyHead was happy to import the data. I assume these four files just identify the machine and won't change. I'll find out tomorrow morning if that assumption was right or not. Smile

As for wget (web-get), it is an extremely robust command line utility generally used to grab files from ftp servers. I am sure it can be convinced not to bother downloading files that already exist. I just have to find some time to read the man page.

I also discovered that you can set the Flashair timeout in milliseconds, or if you enter 0 it will never time out. Now I just have to figure out how to change the configurations when I can't run the graphical utility that Toshiba provides.

You are missing copying the "journal.dat" file from the SD. It is a hidden file, I assume another one of Resmeds counter measures.
You can change the files attributes to "normal", and the S9 does not seem to care!

I will be releasing a new version of Sleep Master soon. It will run on "Ubuntu" with "Wine" windows program loader. Works around all of the xpap manufacturers counter measures.

Tom
11-18-2014 06:07 AM
Find all posts by this user Post Reply Quote this message in a reply

Donate to Apnea Board
Eurika Offline

Preferred Members

Posts: 92
Joined: Nov 2014

Machine: Airsense10 Autoset
Mask Type: Nasal pillows
Mask Make & Model: P10 & Nuance Gel
Humidifier: Intergrated
CPAP Pressure: 5 to 11.4
CPAP Software: ResScan SleepyHead

Other Comments:

Sex: Male
Location: Singapore

Post: #26
RE: SDHC Flashair card in PAPs
Hi
Does this WiFi transfer card work with the AS10, it would be great if it does.
I'm only semi literate when it comes to tech stuff I'm afraid, but I'm trying to learnOh-jeez

Failure is NOT an option.
11-18-2014 07:13 AM
Find all posts by this user Post Reply Quote this message in a reply
Jack_Russell_Fan Offline

Preferred Members

Posts: 81
Joined: Nov 2014

Machine: PRS1 760P
Mask Type: Nasal pillows
Mask Make & Model: Tap Pap
Humidifier: PRS1 heated hose
CPAP Pressure: 15.5 - 6.5
CPAP Software: SleepyHead

Other Comments: Sleep Master wireless data transfer

Sex: Male
Location: Ellijay, GA

Post: #27
RE: SDHC Flashair card in PAPs
(11-18-2014 07:13 AM)Eurika Wrote:  Hi
Does this WiFi transfer card work with the AS10, it would be great if it does.
I'm only semi literate when it comes to tech stuff I'm afraid, but I'm trying to learnOh-jeez

That is an unknown at this time. If someone could send me a zip copy of their AS10 data card I will try to add and/or verify compatibility to the program!

Tom - Sleep Master Wireless Data Transfer author.
11-18-2014 07:25 AM
Find all posts by this user Post Reply Quote this message in a reply

Donate to Apnea Board
archangle Offline
Wiki Editor
Advisory Members

Posts: 3,159
Joined: Feb 2012

Machine: ResMed S9 AutoSet
Mask Type: Nasal pillows
Mask Make & Model: ResMed Swift FX
Humidifier: ResMed S9 H5i
CPAP Pressure: 16-20
CPAP Software: ResScan SleepyHead EncoreBasic

Other Comments: Happy PAPper

Sex: Undisclosed
Location: USA

Post: #28
RE: SDHC Flashair card in PAPs
(11-18-2014 12:29 AM)JJJ Wrote:  SleepyHead problem solved. It turns out that the S9 Autoset writes four files to the root of the SD card as well as the eight daily data files to the DATALOG folder:

Identification.tgt
Identification.crc
Str.edf
Str.crc
[DATALOG]

I created the DATALOG folder and put the eight files in it from the Flashair, but I didn't copy the other four files to the root of the folder. After I copied the four files over SleepyHead was happy to import the data. I assume these four files just identify the machine and won't change. I'll find out tomorrow morning if that assumption was right or not. Smile

As for wget (web-get), it is an extremely robust command line utility generally used to grab files from ftp servers. I am sure it can be convinced not to bother downloading files that already exist. I just have to find some time to read the man page.

I also discovered that you can set the Flashair timeout in milliseconds, or if you enter 0 it will never time out. Now I just have to figure out how to change the configurations when I can't run the graphical utility that Toshiba provides.

Good to hear you've got it working.

Why not just copy the entire SD card to a different folder each time you want to download?

Does the S9 keep the SD card powered up all the time? i.e. if you turn the machine off, can you read the FlashAir card card an hour later (assuming you set the FlashAir not to time out)?

Does your FlashAir card require configuration files on the SD card? I thought earlier versions of FlashAir did, and this caused problems with S9 machines. What version of FlashAir card do you have?

Do you have to connect directly from the PC to the FlashAir, or can you make the FlashAir connect to a home router and access it that way?

Get the free SleepyHead software here.
Useful links.
Click here for information on the main alternative to CPAP.
If it's midnight and a DME tells you it's dark outside, go and check it yourself.
11-18-2014 03:29 PM
Find all posts by this user Post Reply Quote this message in a reply
JJJ Offline

Advisory Members

Posts: 751
Joined: Apr 2012

Machine: ResMed S9 Autoset
Mask Type: Nasal mask
Mask Make & Model: Most recent: Wisp, Pilairo, Mirage Vista
Humidifier: ResMed S9 Autoset
CPAP Pressure: 17-20
CPAP Software: SleepyHead

Other Comments:

Sex: Male
Location: USA 97217

Post: #29
RE: SDHC Flashair card in PAPs
(11-18-2014 03:29 PM)archangle Wrote:  Good to hear you've got it working.
Why not just copy the entire SD card to a different folder each time you want to download?
Does the S9 keep the SD card powered up all the time? i.e. if you turn the machine off, can you read the FlashAir card card an hour later (assuming you set the FlashAir not to time out)?
Does your FlashAir card require configuration files on the SD card? I thought earlier versions of FlashAir did, and this caused problems with S9 machines. What version of FlashAir card do you have?
Do you have to connect directly from the PC to the FlashAir, or can you make the FlashAir connect to a home router and access it that way?

This morning there are all kinds of problems.

1) I cannot view it with either my computer or my phone. Admittedly the connection is poor because I'm stretching the distance, but my phone and my laptop (downstairs) both see it and connect to it. Opening a Firefox tab and entering 192.168.0.1 in the URL bar displayed the contents yesterday, but today all I get is "page not available."

2) In desperation I took the phone upstairs and tried to view the files while sitting on the bed, but still all I get is "page not available."

3) I popped the card out of the S9 and put it back in again, wondering if it was a timeout issue. The S9 said "invalid SD card" and wanted to format it. I didn't let it format the card lest I lose last night's data. Instead I popped it out again, took it downstairs and inserted it into my laptop. The laptop automatically mounted it and my file browser can see the contents. Apparently the S9 wrote one file 'Journal.dat' to the root of the folder. Opening it in a text editor it contains one line with ÿ (that's a y with an umlaut, Unicode hex 00ff) repeated a gazillion times. Not very informative. And it failed to write eight new files to the DATALOG folder as I expected it to.

The card is a class 10 card, version PFW016U-1BCW.

The card needs power, so if you turn off the CPAP machine you will see no access point or anything else. I never turn my S9 off (unless I ever have a zero night and it gets stuck), so the card's wifi should always be available. And it did appear this morning and both my phone and my laptop could connect. It's just that neither could see the files like they could last night.

Regarding home routers, I think you can make the card go through the router, but I can't understand the instructions from Toshiba. I'm not much of a whiz at networking.

I'm going to go for a walk and forget about it for a while. Smile
11-18-2014 04:46 PM
Find all posts by this user Post Reply Quote this message in a reply

Donate to Apnea Board
Galactus Online

Advisory Members

Posts: 1,388
Joined: Jan 2014

Machine: Phillips Respironics System One PRS1 DS760P Auto BiPAP
Mask Type: Nasal pillows
Mask Make & Model: ResMed Airfit P10 Nasal Pillow
Humidifier: System One Heated Humidifier + Climate Line
CPAP Pressure: E/I 13/20 PS 4/7 BiFlex 3
CPAP Software: SleepyHead EncoreBasic

Other Comments: Sleep can be a good thing.

Sex: Male
Location: USA

Post: #30
RE: SDHC Flashair card in PAPs
(11-18-2014 03:29 PM)archangle Wrote:  Good to hear you've got it working.

Why not just copy the entire SD card to a different folder each time you want to download?

Having it overwrite and or amend keeps us from having to manually delete the duplications.

(11-18-2014 03:29 PM)archangle Wrote:  Does the S9 keep the SD card powered up all the time? i.e. if you turn the machine off, can you read the FlashAir card card an hour later (assuming you set the FlashAir not to time out)?

The card needs power to act as a hot spot, and to transmit or receive, so it must be powered. They built in a time out function as it was designed to be used in a camera where it would transmit pictures, and when done if it did not shut down it would keep using power and kill the battery camera. In our cases we don't worry about the power out time out because the cpap units are on. So shutting the flashair time out off keeps the card powered all the time so it will always be available.

(11-18-2014 03:29 PM)archangle Wrote:  Does your FlashAir card require configuration files on the SD card? I thought earlier versions of FlashAir did, and this caused problems with S9 machines. What version of FlashAir card do you have?

The latest versions of the card, the class 10 16GB and class 10 32gb have no such issues.

(11-18-2014 03:29 PM)archangle Wrote:  Do you have to connect directly from the PC to the FlashAir, or can you make the FlashAir connect to a home router and access it that way?

I don't believe there is a way to get the flashair to connect to the router. However there is an internet pass through on the flashair so you could use that to access the card through a computer on the internet on your connection.

(11-18-2014 04:46 PM)JJJ Wrote:  This morning there are all kinds of problems.

1) I cannot view it with either my computer or my phone. Admittedly the connection is poor because I'm stretching the distance, but my phone and my laptop (downstairs) both see it and connect to it. Opening a Firefox tab and entering 192.168.0.1 in the URL bar displayed the contents yesterday, but today all I get is "page not available."

JR mentioned something about not taking the card back out and putting it in the S9 after configuring it. Just to config it then insert it and leave it there. I don't have the S9 to check with but that is one of the things he mentions.

(11-18-2014 04:46 PM)JJJ Wrote:  3) I popped the card out of the S9 and put it back in again, wondering if it was a timeout issue. The S9 said "invalid SD card" and wanted to format it. I didn't let it format the card lest I lose last night's data. Instead I popped it out again, took it downstairs and inserted it into my laptop. The laptop automatically mounted it and my file browser can see the contents. Apparently the S9 wrote one file 'Journal.dat' to the root of the folder. Opening it in a text editor it contains one line with ÿ (that's a y with an umlaut, Unicode hex 00ff) repeated a gazillion times. Not very informative. And it failed to write eight new files to the DATALOG folder as I expected it to.

I believe this is what JR is talking about. If you check his site he has an email link, he may well be able to help you.

I wish I could help you more, trying my best!

If everyone thinks alike, then someone isn't thinking.
Everyone knows something, together we could know everything.
11-18-2014 06:10 PM
Find all posts by this user Post Reply Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Flashair SD poor connection to router after power failure Roy289 5 276 08-06-2016 12:54 PM
Last Post: Crimson Nape
  Easiest way to connect to FlashAir SD card using a static IP in Windows shawn42 13 1,224 07-20-2016 01:58 PM
Last Post: AlanE
  POLL - CPAP vs. all other PAPs OMyMyOHellYes 16 1,055 07-01-2016 09:50 AM
Last Post: justMongo
  Info guide to use flashair sd card? IDRIck 6 595 06-09-2016 11:49 PM
Last Post: chill
  ResMed S9 SD Card "Invalid SD Card, erase card data?" MAPnea 28 27,491 03-18-2016 07:32 PM
Last Post: palerider
  Configuring FlashAir Cards. kimgh 5 1,420 08-02-2015 09:29 PM
Last Post: kimgh
  FlashAir SD Card Failure? WSHenry 4 959 08-02-2015 01:01 PM
Last Post: eseedhouse

Forum Jump:

Who's Online (Complete List)