New XPAP Wifi Transfer Software - Mac/Linux (for FlashAir)

General Discussion on any topic relating to CPAP and/or Sleep Apnea.
sleepy tinkerer
Posts: 6
Joined: Sun Feb 01, 2015 11:07 am

New XPAP Wifi Transfer Software - Mac/Linux (for FlashAir)

Post by sleepy tinkerer » Thu Feb 05, 2015 10:39 am

I was inspired by the work done with Sleep Manager, but can't run it on my Mac. I decide to write a quick, crude little script to do it, and some have suggested that it's a bit complicated to use. I put a little bit of time into cleaning that up, and would appreciate feedback for improvement. Thus far, it's been tested on one xPAP machine -- PRS1 System 50 -- on my Mac. However, it should work with other CPAP machines, so please test it out and let me know.

It should also run just fine (the Perl script version) from the command line, as long as you have 'curl' installed. I can consider adding an option to use 'wget' if that's a problem (or could do the socket I/O natively in Perl)

Anyway, here's v1 of my code. This includes a README file (included below), cpapfetch.pl (script for use from command line on OS X or Linux), and CPAPfetch.app (clickable application that just runs the script).

The files will be put into a directory called "cpap" in your home directory; you will then need to tell SleepyHead to look at that path for the files. The script simply downloads all files off the SD card (and then downloads newer ones if they show up the next time you run it).

Here's the download link: https://www.dropbox.com/s/onnrc4kk93giq ... tch_v1.zip

Here's the included README.txt:

Code: Select all

Preparing the card before first use:

Place the FlashAir inside the CPAP machine and allow it to reformat the card
(if necessary, depends on CPAP model). Once done, remove the FlashAir from
the CPAP machine and place it in your computer.

Edit the included SD_WLAN/CONFIG file to match your Wifi network name and
password, and then copy it onto the FlashAir over the existing CONFIG file
in the SD_WLAN directory.

Testing the configuration:

Remove the card from your computer, and then reinsert it.  Wait about one
minute, then confirm that you can see the card at http://cpap.local
If so, you can remove the card and insert it into your CPAP machine.

Running the program:
This program should run on OS X or Linux; either run CPAPfetch.app (OS X)
or cpapfetch.pl from a Terminal.  If you receive a message about an
unknown developer on OS X, right click CPAPfetch.app and select "Open".

The program will make a directory called 'cpap' in your home directory
and copy all of the files there (it can take about a minute).  If you want
it to place the files elsewhere, edit the first line of the script ($dest).

User avatar
Hosehead4ever
Posts: 422
Joined: Thu Mar 03, 2011 7:53 am
Location: USA

Re: New XPAP Wifi Transfer Software - Mac/Linux (for FlashAir)

Post by Hosehead4ever » Thu Feb 05, 2015 10:56 am

Since I'm not a programmer and the one I share a bed with is more familiar with C++ than Perl, I got around this problem by running Parallels on my Mac. I like your ingenuity, but wouldn't Parallels be easier for the average Mac user than running a cmd line script?

_________________
Mask: AirFit™ P10 For Her Nasal Pillow CPAP Mask with Headgear
Additional Comments: Auto 5-7 cmpw, EPR 3; Climateline heated hose; Snugglehose cover; Airsense 10 Autoset apap backup machine; off grid
Full-time off-grid hosehead living in a converted school bus with on-board solar power system consisting of 480 watts solar panels combined with 340 Ah LifePo4 batteries.

sleepy tinkerer
Posts: 6
Joined: Sun Feb 01, 2015 11:07 am

Re: New XPAP Wifi Transfer Software - Mac/Linux (for FlashAir)

Post by sleepy tinkerer » Thu Feb 05, 2015 11:03 am

KatyDidAgain wrote:Since I'm not a programmer and the one I share a bed with is more familiar with C++ than Perl, I got around this problem by running Parallels on my Mac. I like your ingenuity, but wouldn't Parallels be easier for the average Mac user than running a cmd line script?
That's why I now include a double-clickable CPAPfetch.app. (And a cmd line script, they do the same thing.)
(I also tried Sleep Manager in Parallels, but that seems a bit overkill and I never got the software to work properly.)

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

Re: New XPAP Wifi Transfer Software - Mac/Linux (for FlashAir)

Post by Krelvin » Thu Feb 05, 2015 1:32 pm

Only time I've played with a Mac was my daughters Powerbook. She left it behind while shopping one time and I immediately jumped in to it's terminal mode as it was originally based on FreeBSD. Very Unix like.... had support for just about anything I would do without the graphic front end.

ssh, Perl etc..

Using Parallels would be a bit of an overkill, if a simple Perl script can do the same thing.
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
Sir NoddinOff
Posts: 4190
Joined: Mon May 14, 2012 5:30 pm
Location: California

Re: New XPAP Wifi Transfer Software - Mac/Linux (for FlashAir)

Post by Sir NoddinOff » Thu Feb 05, 2015 6:05 pm

I love to see everybody getting creative with remote data xfer. Very creative, I'm going to have to stop yakking about it and give it a try.

_________________
Mask: AirFit™ F10 Full Face Mask with Headgear
Additional Comments: Sleepyhead software v.0.9.8.1 Open GL and Encore Pro v2.2.
I like my ResMed AirFit F10 FFM - reasonably low leaks for my ASV therapy. I'm currently using a PR S1 AutoSV 960P Advanced. I also keep a ResMed S9 Adapt as backup. I use a heated Hibernite hose. Still rockin' with Win 7 by using GWX to stop Win 10.