FlashAir: cgi command request to file

191 Views Asked by At

I'm using old Toshiba FlashAir cards (version 2 and 3) for my environmental recordings. The problem I have looks pretty simple BUT I've been unable to solve it for a couple of days. What I need is infromation on files stored on the card. Althrough it is possible to use LUA scripts since version 3 of FlashAir cards, version 2 is not designed to run scripts at all. Futhermore version 3 is running a script BUT is getting slow and "out of memory". There is however a way to deal with it: a command.cgi

So using a web browser I can request: http://flashair/command.cgi?op=100&DIR=/DCIM and receive a list of files and sizes as output. The question is - as I'm using headless Raspberry to grab info from cards how to make a crontab task properly to save cgi response to txt file? I have made a try for some options like:

curl -K http://flashair/command.cgi?op=100&DIR=/DCIM >> file_list.txt

curl http://flashair/command.cgi?op=100&DIR=/DCIM -o file_list.txt

but aside txt file was created no data were stored.

0

There are 0 best solutions below