2017-01-24 2 views
0

Ich versuche, GPS-Tag zu jedem Foto mit der Olympus Air und der API hinzuzufügen. Aber ich kann nicht einmal das GPS einschalten (Ich bin im Aufnahmemodus) Die Kamera reagiert nicht auf den Befehl. habe ich versucht, einen Beitrag mit:Legen Sie eine GPS-Eigenschaft über API für Olympus Air

http://192.168.0.10/set_camprop.cgi?com=setlist 

Headers

Content-type: text/xml 
User-Agent: OlympusCameraKit 
Content-Length: 74 
Host: 192.168.0.10 
Connection: Keep-Alive 

Körper

<?xml version="1.0"?><set><prop name="GPS"><value>ON</value></prop> 
</set> 

Antwort

0

Mein Shell-Skript arbeitet korrekt auf macOS.

curl -v \ 
    -H 'User-Agent: OlympusCameraKit' \ 
    -H 'Host: 192.168.0.10' \ 
    'http://192.168.0.10/get_connectmode.cgi' 
echo 
echo 
curl -v \ 
    -H 'User-Agent: OlympusCameraKit' \ 
    -H 'Host: 192.168.0.10' \ 
    'http://192.168.0.10/switch_commpath.cgi?path=wifi' 
echo 
echo 
curl -v \ 
    -H 'User-Agent: OlympusCameraKit' \ 
    -H 'Host: 192.168.0.10' \ 
    'http://192.168.0.10/start_pushevent.cgi?port=65000' 
echo 
echo 
curl -v \ 
    -H 'User-Agent: OlympusCameraKit' \ 
    -H 'Host: 192.168.0.10' \ 
    'http://192.168.0.10/switch_cameramode.cgi?mode=standalone' 
sleep 2 
echo 
echo 
curl -v \ 
    -H 'User-Agent: OlympusCameraKit' \ 
    -H 'Host: 192.168.0.10' \ 
    'http://192.168.0.10/switch_cameramode.cgi?mode=rec&lvqt=0320x0240' 
sleep 2 
echo 
echo 
curl -v \ 
    -H 'User-Agent: OlympusCameraKit' \ 
    -H 'Host: 192.168.0.10' \ 
    'http://192.168.0.10/exec_takemisc.cgi?com=startliveview&port=5555' 
echo 
echo 
curl -v \ 
    -H 'User-Agent: OlympusCameraKit' \ 
    -H 'Host: 192.168.0.10' \ 
    'http://192.168.0.10/get_state.cgi' 
echo 
echo 
curl -v \ 
    -H 'Content-type: text/xml' \ 
    -H 'User-Agent: OlympusCameraKit' \ 
    -H 'Host: 192.168.0.10' \ 
    -d '<?xml version="1.0"?><set><prop name="GPS"><value>ON</value></prop></set>' \ 
    'http://192.168.0.10/set_camprop.cgi?com=setlist' 
echo 
echo 
curl -v \ 
    -H 'User-Agent: OlympusCameraKit' \ 
    -H 'Host: 192.168.0.10' \ 
    'http://192.168.0.10/get_camprop.cgi?com=get&propname=GPS' 
echo 
echo 
curl -v \ 
    -H 'User-Agent: OlympusCameraKit' \ 
    -H 'Host: 192.168.0.10' \ 
    'http://192.168.0.10/switch_cameramode.cgi?mode=standalone' 
sleep 2 
echo 
echo 

Ein Ergebnis ist folgende:

* Trying 192.168.0.10... 
* TCP_NODELAY set 
* Connected to 192.168.0.10 (192.168.0.10) port 80 (#0) 
> GET /get_connectmode.cgi HTTP/1.1 
> Host: 192.168.0.10 
> Accept: */* 
> User-Agent: OlympusCameraKit 
> 
< HTTP/1.1 200 OK 
< Content-Type: text/xml 
< Content-Length: 55 
< Connection: close 
< 
<?xml version="1.0"?> 
<connectmode>OPC</connectmode> 
* Curl_http_done: called premature == 0 
* Closing connection 0 


* Trying 192.168.0.10... 
* TCP_NODELAY set 
* Connected to 192.168.0.10 (192.168.0.10) port 80 (#0) 
> GET /switch_commpath.cgi?path=wifi HTTP/1.1 
> Host: 192.168.0.10 
> Accept: */* 
> User-Agent: OlympusCameraKit 
> 
< HTTP/1.1 200 OK 
< Content-Length: 0 
< Connection: close 
< 
* Curl_http_done: called premature == 0 
* Closing connection 0 


* Trying 192.168.0.10... 
* TCP_NODELAY set 
* Connected to 192.168.0.10 (192.168.0.10) port 80 (#0) 
> GET /start_pushevent.cgi?port=65000 HTTP/1.1 
> Host: 192.168.0.10 
> Accept: */* 
> User-Agent: OlympusCameraKit 
> 
< HTTP/1.1 200 OK 
< Content-Type: www/unknown 
< Content-Length: 0 
< Connection: close 
< 
* Curl_http_done: called premature == 0 
* Closing connection 0 


* Trying 192.168.0.10... 
* TCP_NODELAY set 
* Connected to 192.168.0.10 (192.168.0.10) port 80 (#0) 
> GET /switch_cameramode.cgi?mode=standalone HTTP/1.1 
> Host: 192.168.0.10 
> Accept: */* 
> User-Agent: OlympusCameraKit 
> 
< HTTP/1.1 200 OK 
< Content-Type: text/xml 
< Content-Length: 40 
< Connection: close 
< 
* Curl_http_done: called premature == 0 
* Closing connection 0 
<?xml version="1.0"?><result>OK</result> 

* Trying 192.168.0.10... 
* TCP_NODELAY set 
* Connected to 192.168.0.10 (192.168.0.10) port 80 (#0) 
> GET /switch_cameramode.cgi?mode=rec&lvqt=0320x0240 HTTP/1.1 
> Host: 192.168.0.10 
> Accept: */* 
> User-Agent: OlympusCameraKit 
> 
< HTTP/1.1 200 OK 
< Content-Type: text/xml 
< Content-Length: 40 
< Connection: close 
< 
* Curl_http_done: called premature == 0 
* Closing connection 0 
<?xml version="1.0"?><result>OK</result> 

* Trying 192.168.0.10... 
* TCP_NODELAY set 
* Connected to 192.168.0.10 (192.168.0.10) port 80 (#0) 
> GET /exec_takemisc.cgi?com=startliveview&port=5555 HTTP/1.1 
> Host: 192.168.0.10 
> Accept: */* 
> User-Agent: OlympusCameraKit 
> 
< HTTP/1.1 200 OK 
< Content-Type: text/xml 
< Content-Length: 405 
< Connection: close 
< 
* Curl_http_done: called premature == 0 
* Closing connection 0 
<?xml version="1.0"?><funcidlist><funcid name="framesize"/><funcid name="afframeinfo"/><funcid name="mntmediainfo"/><funcid name="rotation"/><funcid name="maxtakenum"/><funcid name="shutspeedvalue"/><funcid name="focalvalue"/><funcid name="expcomp"/><funcid name="isospeedvalue"/><funcid name="expphotowarning"/><funcid name="focusinfo"/><funcid name="zoominfo"/><funcid name="maxmovietime"/></funcidlist> 

* Trying 192.168.0.10... 
* TCP_NODELAY set 
* Connected to 192.168.0.10 (192.168.0.10) port 80 (#0) 
> GET /get_state.cgi HTTP/1.1 
> Host: 192.168.0.10 
> Accept: */* 
> User-Agent: OlympusCameraKit 
> 
< HTTP/1.1 200 OK 
< Content-Type: text/xml 
< Content-Length: 426 
< Connection: close 
< 
* Curl_http_done: called premature == 0 
* Closing connection 0 
<?xml version="1.0"?><response><cardstatus>normal</cardstatus><cardremainnum>425</cardremainnum><cardremainsec>1123</cardremainsec><cardremainbyte>3709501440</cardremainbyte><lensmountstatus>normal</lensmountstatus><imagingstate>normal</imagingstate><focallength>14</focallength><widefocallength>14</widefocallength><telefocallength>42</telefocallength><electriczoom>OK</electriczoom><macrosetting>NG</macrosetting></response> 

* Trying 192.168.0.10... 
* TCP_NODELAY set 
* Connected to 192.168.0.10 (192.168.0.10) port 80 (#0) 
> POST /set_camprop.cgi?com=setlist HTTP/1.1 
> Host: 192.168.0.10 
> Accept: */* 
> Content-type: text/xml 
> User-Agent: OlympusCameraKit 
> Content-Length: 73 
> 
* upload completely sent off: 73 out of 73 bytes 
< HTTP/1.1 200 OK 
< Content-Type: text/xml 
< Content-Length: 59 
< Connection: close 
< 
* Curl_http_done: called premature == 0 
* Closing connection 0 
<?xml version="1.0"?><response><notset></notset></response> 

* Trying 192.168.0.10... 
* TCP_NODELAY set 
* Connected to 192.168.0.10 (192.168.0.10) port 80 (#0) 
> GET /get_camprop.cgi?com=get&propname=GPS HTTP/1.1 
> Host: 192.168.0.10 
> Accept: */* 
> User-Agent: OlympusCameraKit 
> 
< HTTP/1.1 200 OK 
< Content-Type: text/xml 
< Content-Length: 49 
< Connection: close 
< 
* Curl_http_done: called premature == 0 
* Closing connection 0 
<?xml version="1.0"?><get><value>ON</value></get> 

* Trying 192.168.0.10... 
* TCP_NODELAY set 
* Connected to 192.168.0.10 (192.168.0.10) port 80 (#0) 
> GET /switch_cameramode.cgi?mode=standalone HTTP/1.1 
> Host: 192.168.0.10 
> Accept: */* 
> User-Agent: OlympusCameraKit 
> 
< HTTP/1.1 200 OK 
< Content-Type: text/xml 
< Content-Length: 40 
< Connection: close 
< 
* Curl_http_done: called premature == 0 
* Closing connection 0 
<?xml version="1.0"?><result>OK</result> 

Ich hoffe, es wird Ihnen helfen.

Verwandte Themen