Apnea Board Forum - CPAP | Sleep Apnea
FlashAir tests [failure and success] - Printable Version

+- Apnea Board Forum - CPAP | Sleep Apnea (https://www.apneaboard.com/forums)
+-- Forum: Public Area (https://www.apneaboard.com/forums/Forum-Public-Area)
+--- Forum: Software Support Forum (https://www.apneaboard.com/forums/Forum-Software-Support-Forum)
+--- Thread: FlashAir tests [failure and success] (/Thread-FlashAir-tests-failure-and-success)



FlashAir tests [failure and success] - Jeff8356 - 10-22-2020

I was curious as to why some users have failures with their FlashAir cards and if there may be a common cause.  So I took my working FlashAir card and did some experimenting.  Your results may vary....
I don't recommend anyone try this as there is always the potential to ruin the card!  And these are not instructions how to setup the card to work with your xPAP machine!!!  But the results here may or may not help someone along the way.

The TL;DR version:  I ruined my FlashAir Card using an external card reader.  I got it working again using my laptops internal card reader.

First my basic setup for testing:
  • FlashAir W-04 64GB card (purchased June 2020). I had it formatted as 32GB, FAT32
  • My Mac (see my sig for details)
  • Internal card reader on my Mac
  • An external card reader (Ugreen, 4 slot reader with USB 3.0 cord)
  • SD card formatter (free) from SD Association (https://www.sdcard.org/downloads/formatter/)
  • Mac's built in Disk Utility
  • Mac's terminal (for running diskutil and dd from CLI)
  • BBedit (free version) for modifying the config file
  • Toshiba FlashAirTool.app
Obviously I had a backup image of a working copy of my card and a copy of all my xPAP data!

I've listed things in different subsections below....

First thing was to restore the card to its original 64GB ExFAT glory.  I used the SD card formatter mentioned above which gave me a blank slate to start.

External card reader (Ugreen):

  1. Using the FlashAirTool.app I initialized the card.  Following the series of the eject/insert prompts, it finished without issues.
  2. Next step was to change the network settings using the FATool.  I left the default "flashair" and added the password "12345678" and applied the changes.  Followed the prompts for remove/insert card.  Seems to have gone well, but no signs of WiFi yet.
  3. Double check that "Wireless Lan Startup Mode" was set to Automatic and left the default 5 minute timeout.  Still no signs of wifi
  4. Used the FATool for "FlashAir Drive" setting to enable that feature.  Followed the remove/insert prompts. The tool would try to write to the card but eventually failed.
I noticed my Mac was leaving its usual hidden files (dot files) on the card during each process.  After the first try, I started deleting those files at every step along the way just in case.
I reformatted the card and started from scratch again.  Each time trying a different variation of removing the card from the external reader when instructed, disconnecting the external reader from the computer, and a combination of both.  I reformatted 4 times (Disk Utility) and each time I tried to get the card to a working state it failed!  Never got the WiFi or networking to run.
I was still able to read/write/copy to the FlashAir card using Finder, just could not get the WiFi/Networking running, period.  It was just an expensive SD card at this point.

On to the next part of my experiment.....

Internal SD card reader (Mac):

  1. Reformat the card (Disk Utility) 
  2. Use FlashAirTool.app to initialize the card.  Follow prompts, all went well so far
  3. Changed network setting using FATool.  Left the default "flashair" and added "12345678" as password and applied changes. Followed prompts.  The tool finished what it was doing.  No "flashair" in my Wifi at this point.
  4. Using FATool for FlashAir Drive" setting to enable the feature.  Followed the prompts.  It failed again.
  5. Having realized I forgot to delete the hidden dot files this time around, I started at step 1 again.  This time deleting the hidden dot files at each step along the way.
  6. Then the magic happened.  I had "flashair" in my WiFi and was able to connect to it.
Just to make sure it wasn't some fluke that it started working again, I reformatted the card using the internal card reader 3 more times (using a combo of Disk Utility app, and diskutil from CLI) and followed the procedure each time (including deleting the dot files).  And each time it worked!
Using BBedit I modified the config file to make it the same as it would be in my xPAP machine, and that I would be able to mount it properly to copy the data.  All worked well!

Now that I was done tinkering I had a working 64GB ExFAT FlashAir card with a static IP that I could mount on my network.  I needed to turn it back into a 32GB FAT32 for my xPAP machine.  So one more format, insert into xPAP, initialize, etc, etc,. Copy all my xPAP data back to the card using rsync.  Put it back into my xPAP and it recorded last nights data without missing a beat.

If your keeping count, that's 10 times the card was formatted (11 if you include the last time I restored it to a 32GB card and copied data back to it)



Conclusion:

The FlashAirTool.app seems to have an issue with my external SD card reader.  Not sure if it's my particular make/model or if it's all external readers, or the combo of Mac and the external reader, maybe a driver issue.  But using my laptops internal reader did the trick for me.

FlashAirTool.app also seems to have an issue with the hidden dot files Mac insists on putting onto everything it comes into contact with.  (Windows writes the hidden files also, but I can't confirm if it might be an issue).  So try deleting those as they popup.

So if you have a seemingly bricked FlashAir card, you might be able to resurrect it by using an internal (or different) card reader and/or deleting the hidden dot files your OS creates on the card.  No guarantees though....

The FlashAirTool.app contains all the necessary files that get placed onto the SD card.  Although I'm not sure how FATool can tell that it is a FlashAir card after it has been formatted.  Some type of identifier/serial number burned into the card somewhere? Didn't dig that deep into it....

On a side note:  I had a moment of lucidity during all of this and made an image of the 64GB card with basic WiFi working Smile


RE: FlashAir tests [failure and success] - Crimson Nape - 10-22-2020

As far as to how the FlashAir Tool knows it a FlashAir card; The FlashAir cards use an Airoha Wi-Fi chip.  Others, like the Voorca, use the USI (Avnet) 850101 chipset and Voorca use an Atheros chip.


The 850101 is a combination wireless module (Broadcom BCM43362) and micro controller (ST Microelectronics STM32F205).