Toshiba FlashAir quickly hacked togethor syncronisation script

, posted: 3-Feb-2014 21:23

The Toshiba FlashAir is one of those nifty wifi-enabled sdcards.  If you don't know what that is, well, it's an sdcard, which has a teeny tiny computer inside it complete with a wifi connection (isn't miniaturisation incredible), inserted into a camera it means you can connect to your camera wirelessly and download your pictures.

Anyway, it's a cool little device, and while (unfortunately) it doesn't expose an FTP or Samba server (all access is over HTTP), Toshiba does publish an API ( at ).

Using this I cobbled together a quick hack of a synchronisation script (using PHP), it checks to see if the card is online (I put the card into AP Client mode and have my wifi router assign it a reserved IP address, so it's just a matter of pinging that IP, if it replies, it's online), if it is then it checks if any new images have been added and downloads them, and checks the download directory to see if any images were deleted and deletes them from the camera if so.

I take a lot of product photos and such for the electronics stuff I sell ( ) and it was always a real pain to take a photo, plug my camera in (which can't take photos when connected by USB), re-mount the camera as a drive, navigate to the photos, find the one I want, download it....  now, I can take a photo and bam it's there on my PC's local drive.

Should you want the code, it's here:

No support, it is what it is, a real quick hack to get the job done.

More information

Other related posts:
Equivalent Parallel Resistor Network Finder Using Your Personal Stock List
Stuff: "Beside Vigil"
Stripping Signature Images from IMAP

Comment by Matthew, on 3-Feb-2014 23:47

That is nice!

Comment by clicknz, on 8-Feb-2014 10:38

Nice work on optimising the technology even more than it was intended. As a professional photographer I spent some time trying to get the early Eye-Fi cards (also wifi enabled SD cards) to work efficiently in my DSLR and send jpegs to my laptop so I could do away with the USB cable. They worked to a point, but were always flaky enough that I didn't feel confident using them while a client was present on a shoot.
I then tested some iOS apps on an iPhone that looked a promising way to allow a third party to be previewing the results of a shoot. These apps still required a laptop to be in the mix so it defeated the purpose of the exercise.
Last year I purchased a Canon 6D DSLR with it's own fairly robust on-board wifi radio that can set up it's own access point to connect a smartphone, tablet, computer or TV to. I've used it on assignments where the client can happily see the images being shot while sitting on a couch holding an iPad, instead of trying to peer at the back of my camera or stumble over cables to a laptop.
Works brilliantly - I have medium sized jpegs popping up on the iPad (using the app Shuttersnitch) in about 2 seconds, with the RAW files being saved to the card in the camera for later editing. With a radio slave triggering the studio lights I've finally got a way to cut the cords entirely!

Comment by Dynamic, on 4-Mar-2014 22:28

I had a mate in the US bring me an EYE-FI card (htp:// which is in the Mrs Prosumer-level camera.  I think these guys were the original wifi SD card producers...  or perhaps just the first one to make it big.  Just brilliant for us with no hacks involved.  Software on our desktop listens for the eye-fi card's connections and I have it set to leave the card 25% full...  i.e. all photos download to the computer (and are automatically sorted into year/month folders based on the cate the photo was taken), but the most recent photos stay on the SD card so they can be reviewed or shown to rellies when we are out and about.

Your hack script is ultimately more flexible, but not for n00bs.  :)

Cloud Backup software takes a copy of our photos into the Cloud, and I burn a copy to DVD (now BluRay 50Gb disc) annually.

Comment by gnfb, on 3-Apr-2014 13:09

Ok I just got my flashair card plugged it into my nex7 and connected it within minutes with my ipad

Now the hard part that you seem to have overcome
I have a dgnd3700 that i want to connect to the card that can then fed the pc connected

Ohh i just thought I wonder if it is easier to connect to my macpro? damm cause ity would then i can access over network DUH!

If you ever develop a stupidman app for my desktop pc let me know!

one question

"I put the card into AP Client mode" how did you do this or how do you do this

Author's note by sleemanj, on 3-Apr-2014 16:16

FlashAir Operating Mode FlashAir cards normally operate in host mode, that is, they appear as a Wifi Network to which you connect.
However they can also operate in Client mode (aka Station mode), that is they connect to your existing network and you can access them by IP address if you have your existing wifi router/api assign a fixed IP to them.
See the extrud3d link, and for details.
In order to delete files on the card (when they are deleted on the destination directory), UPLOAD must be enabled in the FlashAir config file also to turn on the upload.cgi API.
Sample config which puts card in wifi client mode (so it connects to your existing wifi router/access point), with upload enabled the config file is SD_WLAN/CONFIG on the sdcard, just edit then turn off and on the card to reload.


sleemanj's profile

James Sleeman
New Zealand

PHP Programmer Extraordinaire

All views expressed are held by the poster, not necessarily any person or organisation associated therewith.