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).