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

SDHC Flashair card in PAPs
#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.
Post Reply Post Reply
#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.
Post Reply Post Reply
#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.
Post Reply Post Reply
#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.
Post Reply Post Reply
#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
Admin Note:
Jack_Russell_Fan passed away in June 2020
For his SleepMaster software, click here.

~ Rest in Peace ~
Post Reply Post Reply
#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.
Post Reply Post Reply
#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.
Admin Note:
Jack_Russell_Fan passed away in June 2020
For his SleepMaster software, click here.

~ Rest in Peace ~
Post Reply Post Reply
#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 OSCAR CPAP 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.
Post Reply Post Reply
#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
Post Reply Post Reply
#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.
Post Reply Post Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  paps & SS Sleepy1974 2 194 09-05-2024, 11:49 AM
Last Post: Jay51
  SD card backup on PC and new SD card snorin2 0 1,136 12-05-2022, 01:53 PM
Last Post: snorin2
  ResMed S9 SD Card "Invalid SD Card, erase card data?" MAPnea 41 52,414 04-29-2021, 03:42 AM
Last Post: Scobber
Angry [News] ELON MUSK TAKES CRAP FOR DELIVERING BI-PAPS srlevine1 2 1,147 04-16-2020, 03:01 AM
Last Post: sleepyp
  Please help me find an SDHC card reader that will work on Resmed cards EnsignRo 8 1,955 01-28-2020, 11:29 AM
Last Post: Jeff8356
  Helpful info re Toshiba Flashair Keljian 6 1,870 03-11-2018, 09:19 PM
Last Post: DariaVader
  Is SDHC suitable for REMSTAR System One DS56? asdftalk 6 1,645 08-21-2017, 05:06 PM
Last Post: asdftalk


New Posts   Today's Posts


About Apnea Board

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