macOS FlashAir SleepMaster

General Discussion on any topic relating to CPAP and/or Sleep Apnea.
grounded
Posts: 93
Joined: Sun May 17, 2020 1:19 pm

macOS FlashAir SleepMaster

Post by grounded » Sun Jun 07, 2020 6:47 pm

Hey folks,

There's a thread here titled "WiFi SD Connection for Mac - Start to Finish" but it's anything but. On macOS 10.15.5 I have installed:

- latest JRE 8
- latest JDK 14
- latest SleepMaster jar (6.0.0.3p BETA)

After loading the User Profile, I get this in Sleep Master:

SleepMaster 1.jpg
SleepMaster 1.jpg (395.69 KiB) Viewed 738 times

Then, when clicking on "Download Sleep Data" I get this:

SleepMaster 2.jpg
SleepMaster 2.jpg (190.32 KiB) Viewed 738 times

The progress bar repeats infinitely. Any ideas?

grounded
Posts: 93
Joined: Sun May 17, 2020 1:19 pm

Re: macOS FlashAir SleepMaster

Post by grounded » Sun Jun 07, 2020 6:50 pm

Note: I have not yet slept with the FlashAir installed. Could it be erroring out because there's no data to download?

User avatar
Dog Slobber
Posts: 4244
Joined: Thu Feb 15, 2018 2:05 pm
Location: Ontario, Canada

Re: macOS FlashAir SleepMaster

Post by Dog Slobber » Mon Jun 08, 2020 6:50 am

SleepMaster doesn't behave very elegantly when the downloader component doesn't deliver the data. I've seen it:
  • Continue indefinitely
  • Stop abruptly with a meaningless message

Three things come to mind for your problem:
  • The SD card doesn't have ResMed Data structures in place. You don't have to have slept yet, but you do have to have inserted the SD Card into your ResMed at least once. This should be resolved after you've used the card tonight.
  • Your AirSense is too far away from your wireless access point.
  • There could be too much congestion on your 2.4 Gig network
Battery Backup: EcoFlow Delta 2

grounded
Posts: 93
Joined: Sun May 17, 2020 1:19 pm

Re: macOS FlashAir SleepMaster

Post by grounded » Mon Jun 08, 2020 8:58 am

Dog Slobber wrote:
Mon Jun 08, 2020 6:50 am
Three things come to mind for your problem:
  • The SD card doesn't have ResMed Data structures in place. You don't have to have slept yet, but you do have to have inserted the SD Card into your ResMed at least once. This should be resolved after you've used the card tonight.
Slept with the FlashAir card installed. No change in SleepMaster. Same error.
  • Your AirSense is too far away from your wireless access point.
Nope. The ResMed is < 10' from the wap.
  • There could be too much congestion on your 2.4 Gig network
Really don't think so. No other devices have any issues. I can ping the FlashAir no prob.


If there was a fundamental communication problem, why does SleepMaster show this?

Found Card.png
Found Card.png (162.12 KiB) Viewed 702 times

User avatar
Dog Slobber
Posts: 4244
Joined: Thu Feb 15, 2018 2:05 pm
Location: Ontario, Canada

Re: macOS FlashAir SleepMaster

Post by Dog Slobber » Mon Jun 08, 2020 2:48 pm

grounded wrote:
Mon Jun 08, 2020 8:58 am
  • There could be too much congestion on your 2.4 Gig network
Really don't think so. No other devices have any issues. I can ping the FlashAir no prob.
I'm actually beginning to really lean in this direction. I've done some experiments below that demonstrate problems because of congestion on my 2.4 Gig network.

You can't compare other WiFi endpoint devices to the FlashAir. The FlashAir with its small antennae and low signal strength will exhibit communication problems well before more traditional endpoints.


If there was a fundamental communication problem, why does SleepMaster show this?


Image
Because, communication is not on or off, it is severely degraded to the point where some communication is occurring. In your case, it still allows enough traffic for the smaller files to get through. We know this because it has found the FlashAir and in you previous screen shot it was able to transfer enough files to get to TXC.LOG.

If you take a look in your data save area you should see some data transfer has occurred. A bunch of small files that are sufficiently small that they can get through the limited communication window.

The condo I live in has horrible congestion on the 2.4 Gig network, but the 5 Gig network is relatively empty. The FlashAir only works in the 2.4 Ghz range.

My ResMed is about 30 ft away and sometimes communication is fine, other times it doesn't work. When communication is poor sometimes SleepMaster finds the ResMed, other times it doesn't. Sometimes the transfer is so poor some files make it, but eventually none do, and the Progress dialog bar will endlessly loop until Sleep Master fails.

Some things to try:

Try to communicate with the FlashAir in your browser. Simply enter the IP Adrress into the URL. FlashAir should present the files. If it doesn't, or it's intolerably slow, this suggests poor communication.

Look at your ping reply times and success rates. Your ping icmp responses should be consistently in the milliseconds with no timeouts.

Look at the following graphic, the left side shows me successfully connecting to my FlashAir via a browser, and my ping replies OK. I was able to successfully transfer my CPAP data via SleepMaster.

Now compare that to the right. Safari could not connect to FlashAir's web server, and my ping replies were consistently failing, but the limited communication could sometimes allow enough data to establish that the FlashAir was there.

The successful side (left) was on channel 6 (2.4G) the unsuccessful was on channel 1. Much more congested.
flashair.png

I suggest you try the following:
  • In your Flashair /SD_WLAN/CONFIG file, ensure:
    • NOISE_CANCEL=2 // This can help improves connectivity
    • STA_RETRY_CT=0 // This sets retry count to unlimited
  • On your router:
    • Turn off Auto for Channel, instead set to Channel 1, then 6, then 11, after saving try pinging and look for consistent lower responses.
    • Set Channel Bandwidth to 20, not 40. To many this may seem intuitively wrong, but in congested networks, a narrower bandwidth has less chance of being interfered with or competing with neighbouring channels.
Last edited by Dog Slobber on Tue Sep 22, 2020 3:16 pm, edited 1 time in total.
Battery Backup: EcoFlow Delta 2

grounded
Posts: 93
Joined: Sun May 17, 2020 1:19 pm

Re: macOS FlashAir SleepMaster

Post by grounded » Mon Jun 08, 2020 3:45 pm

Dog Slobber wrote:
Mon Jun 08, 2020 2:48 pm
Try to communicate with the FlashAir in your browser. Simply enter the IP Adrress into the URL. FlashAir should present the files. If it doesn't, or it's intolerably slow, this suggests poor communication.
Ha! Didn't realize it had an embedded webserver lol. It loads up fine. Shows all files.

Question: is there a way to tell what rev FlashAir I have? I ended up getting it off ebay, "open box". I don't see any clear markings saying W4 or anything.

Dog Slobber wrote:
Mon Jun 08, 2020 2:48 pm
Look at your ping reply times and success rates. Your ping icmp responses should be consistently in the milliseconds with no timeouts.
Check:

PING 192.168.1.155 (192.168.1.155): 56 data bytes
64 bytes from 192.168.1.155: icmp_seq=0 ttl=255 time=2.356 ms
64 bytes from 192.168.1.155: icmp_seq=1 ttl=255 time=5.494 ms
64 bytes from 192.168.1.155: icmp_seq=2 ttl=255 time=5.934 ms
64 bytes from 192.168.1.155: icmp_seq=3 ttl=255 time=3.692 ms
64 bytes from 192.168.1.155: icmp_seq=4 ttl=255 time=4.652 ms
64 bytes from 192.168.1.155: icmp_seq=5 ttl=255 time=2.439 ms
64 bytes from 192.168.1.155: icmp_seq=6 ttl=255 time=3.280 ms
64 bytes from 192.168.1.155: icmp_seq=7 ttl=255 time=2.455 ms
64 bytes from 192.168.1.155: icmp_seq=8 ttl=255 time=3.706 ms
64 bytes from 192.168.1.155: icmp_seq=9 ttl=255 time=5.887 ms
64 bytes from 192.168.1.155: icmp_seq=10 ttl=255 time=3.658 ms
64 bytes from 192.168.1.155: icmp_seq=10 ttl=255 time=5.721 ms (DUP!)
64 bytes from 192.168.1.155: icmp_seq=11 ttl=255 time=1.925 ms
64 bytes from 192.168.1.155: icmp_seq=12 ttl=255 time=2.991 ms
64 bytes from 192.168.1.155: icmp_seq=13 ttl=255 time=2.257 ms
64 bytes from 192.168.1.155: icmp_seq=14 ttl=255 time=2.716 ms
64 bytes from 192.168.1.155: icmp_seq=15 ttl=255 time=3.774 ms
64 bytes from 192.168.1.155: icmp_seq=16 ttl=255 time=2.676 ms
64 bytes from 192.168.1.155: icmp_seq=17 ttl=255 time=1.783 ms
64 bytes from 192.168.1.155: icmp_seq=18 ttl=255 time=1.747 ms
64 bytes from 192.168.1.155: icmp_seq=19 ttl=255 time=1.813 ms
64 bytes from 192.168.1.155: icmp_seq=20 ttl=255 time=3.311 ms
64 bytes from 192.168.1.155: icmp_seq=21 ttl=255 time=2.405 ms


So now I've noticed some files definitely made it to the local machine:

FinderFiles.png
FinderFiles.png (343.52 KiB) Viewed 677 times

Many of the time stamps are 1:00a which confused me. Could there be a clock issue on the FlashAir ?

User avatar
Dog Slobber
Posts: 4244
Joined: Thu Feb 15, 2018 2:05 pm
Location: Ontario, Canada

Re: macOS FlashAir SleepMaster

Post by Dog Slobber » Mon Jun 08, 2020 4:16 pm

OK, your communication looks fine.

Not sure if this is related or not, but is your data directory an external drive?

All the files are being given an 8.3 short name, this shouldn't happen on an APFS, typically it happens on a FAT File system.

What FileSystem is your FlashAir? It should be FAT32, not extended FAT.

FlashAir's have the W-0 version below and to the right of the FlashAir, with the exception of version 1.

Flash_Air.jpg
Battery Backup: EcoFlow Delta 2

grounded
Posts: 93
Joined: Sun May 17, 2020 1:19 pm

Re: macOS FlashAir SleepMaster

Post by grounded » Tue Jun 09, 2020 7:12 am

So the card is formatted FAT32:

FAT32.png
FAT32.png (97.16 KiB) Viewed 653 times


Very strange: this is the card if connected directly:

CardContents.png
CardContents.png (287.47 KiB) Viewed 653 times



And here is the output of SleepMaster:

SleepMasterFolder.png
SleepMasterFolder.png (298.83 KiB) Viewed 653 times

grounded
Posts: 93
Joined: Sun May 17, 2020 1:19 pm

Re: macOS FlashAir SleepMaster

Post by grounded » Tue Jun 09, 2020 7:20 am

Importing the SleepMaster folder results in a mess:

6-9-20sm.png
6-9-20sm.png (100.18 KiB) Viewed 653 times

I seem to have the "W0" rev:
FlashAir.jpg
FlashAir.jpg (191.49 KiB) Viewed 653 times


Bizarre: why doesn't "Data > Advanced > Purge Currently Selected Day" do anything in Oscar? I now have corrupt data for today and can't seem to delete it...

User avatar
Dog Slobber
Posts: 4244
Joined: Thu Feb 15, 2018 2:05 pm
Location: Ontario, Canada

Re: macOS FlashAir SleepMaster

Post by Dog Slobber » Tue Jun 09, 2020 7:33 am

SleepMaster claims it only works with FlashAir W-02 or higher

http://www.sleepmaster.org/sleep-master-java.html
sleepmaster wrote:For wireless data transfer you will need a Class 10 Toshiba FlashAir SD card.

Must have "W-02", "W-03" or "W-04" in the upper right hand corner!
FlashPAP, another utility for transfer CPAP data from FlashAir, also states a requirement of FlashAir II or newer.

https://www.cognitial.com/apps/java-apps/flashpap/
Battery Backup: EcoFlow Delta 2

grounded
Posts: 93
Joined: Sun May 17, 2020 1:19 pm

Re: macOS FlashAir SleepMaster

Post by grounded » Tue Jun 09, 2020 10:35 am

Well.... hell. At least now I know. Thanks!

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

Re: macOS FlashAir SleepMaster

Post by Pugsy » Tue Jun 09, 2020 10:49 am

grounded wrote:
Tue Jun 09, 2020 10:35 am
Well.... hell. At least now I know. Thanks!
Don't you just hate it when after all that work this is the end result. :lol:
When I do stuff like that after a period cussing and discussing I say to myself..."well I learned something...wasn't what I wanted to learn but it was something"...and then pull up my big girl pants and move on.
I always learn...might not be what I wanted or expected or liked but I learned.

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

grounded
Posts: 93
Joined: Sun May 17, 2020 1:19 pm

Re: macOS FlashAir SleepMaster

Post by grounded » Tue Jun 09, 2020 10:57 am

And now pchub is out of stock :( Off to the ebay casino I go again....