このブログは、株式会社フィックスターズのエンジニアが、あらゆるテーマについて自由に書いているブログです。
curl (かーる) という,Webアクセスのためのコマンドラインツールがあります.
今回はこのcurlを使って,FlashAir Developersのチュートリアルを再現してみます.
以下,お使いの環境にcurlをインストールし,FlashAirを用意してお楽しみください.
$ curl "http://flashair/command.cgi?op=100&DIR=/DCIM/100__TSB"
WLANSD_FILELIST
/DCIM/100__TSB,FA000001.JPG,128751,33,17181,18432
$
$ curl --get "http://flashair/DCIM/100__TSB/FA000001.JPG" -o FA000001.JPG
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 125k 100 125k 0 0 116k 0 0:00:01 0:00:01 --:--:-- 595k
$ ls
FA000001.JPG
$
$ curl --get "http://flashair/thumbnail.cgi?/DCIM/100__TSB/FA000001.JPG" -o thumbnail.jpg
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5163 100 5163 0 0 5368 0 --:--:-- --:--:-- --:--:-- 48707
$ ls
FA000001.JPG thumbnail.jpg
$
$ curl --get "http://flashair/command.cgi?op=102"
1
$ curl --get "http://flashair/command.cgi?op=102"
0
$
$ curl --get "http://flashair/config.cgi?MASTERCODE=0123456789AB&APPSSID=myflashair&APPNETWORKKEY=12345678"
SUCCESS
$
$ curl --get "http://flashair/upload.cgi?WRITEPROTECT=ON"
SUCCESS
$ curl --get "http://flashair/upload.cgi?FTIME=0x00210000"
SUCCESS
$ curl --get "http://flashair/upload.cgi?UPDIR=/DCIM"
SUCCESS
$ curl --form "file=@FA000001.JPG" "http://flashair/upload.cgi"
<html xmlns="http://www.w3.org/1999/xhtml"><head><META http-equiv="Content-Type" CONTENT="text/html; charset=utf-8"/><h1>Success</h1><br>
<form action=/upload.cgi method=post enctype=multipart/form-data>
<input name=file type=file size=50><br>
<input type=submit value=submit ></form>
</body></html>
$ curl "http://flashair/command.cgi?op=100&DIR=/DCIM"
WLANSD_FILELIST
/DCIM,100__TSB,0,16,17181,18432
/DCIM,FA000001.JPG,128751,32,33,15
$
おしまい.
curlは,FlashAirとの相性抜群ですね!
詳しいことはFlashAir Developersをご覧ください!
keisuke.kimura in Livox Mid-360をROS1/ROS2で動かしてみた
Sorry for the delay in replying. I have done SLAM (FAST_LIO) with Livox MID360, but for various reasons I have not be...
Miya in ウエハースケールエンジン向けSimulated Annealingを複数タイルによる並列化で実装しました
作成されたプロファイラがとても良さそうです :) ぜひ詳細を書いていただきたいです!...
Deivaprakash in Livox Mid-360をROS1/ROS2で動かしてみた
Hey guys myself deiva from India currently i am working in this Livox MID360 and eager to knwo whether you have done the...
岩崎システム設計 岩崎 満 in Alveo U50で10G Ethernetを試してみる
仕事の都合で、検索を行い、御社サイトにたどりつきました。 内容は大変参考になりま...
Prabuddhi Wariyapperuma in Livox Mid-360をROS1/ROS2で動かしてみた
This issue was sorted....