通过API为Olympus Air设置GPS属性

通过API为Olympus Air设置GPS属性,gps,olympus-camerakit,olympus-air,Gps,Olympus Camerakit,Olympus Air,我正在尝试使用奥林巴斯Air和API为每张照片添加GPS标签。 但我甚至无法打开GPS。(我处于录制模式)相机没有响应命令。 我试过一篇帖子: http://192.168.0.10/set_camprop.cgi?com=setlist 标题 Content-type: text/xml User-Agent: OlympusCameraKit Content-Length: 74 Host: 192.168.0.10 Connection: Keep-Alive 身体 ON 我的shel

我正在尝试使用奥林巴斯Air和API为每张照片添加GPS标签。 但我甚至无法打开GPS。(我处于录制模式)相机没有响应命令。 我试过一篇帖子:

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

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

ON

我的shell脚本在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
curl-v\
-H'用户代理:奥林匹亚梅拉基特'\
-H'主机:192.168.0.10'\
'http://192.168.0.10/get_connectmode.cgi'
回声
回声
旋度-v\
-H'用户代理:奥林匹亚梅拉基特'\
-H'主机:192.168.0.10'\
'http://192.168.0.10/switch_commpath.cgi?path=wifi'
回声
回声
旋度-v\
-H'用户代理:奥林匹亚梅拉基特'\
-H'主机:192.168.0.10'\
'http://192.168.0.10/start_pushevent.cgi?port=65000'
回声
回声
旋度-v\
-H'用户代理:奥林匹亚梅拉基特'\
-H'主机:192.168.0.10'\
'http://192.168.0.10/switch_cameramode.cgi?mode=standalone'
睡眠2
回声
回声
旋度-v\
-H'用户代理:奥林匹亚梅拉基特'\
-H'主机:192.168.0.10'\
'http://192.168.0.10/switch_cameramode.cgi?mode=rec&lvqt=0320x0240'
睡眠2
回声
回声
旋度-v\
-H'用户代理:奥林匹亚梅拉基特'\
-H'主机:192.168.0.10'\
'http://192.168.0.10/exec_takemisc.cgi?com=startliveview&port=5555'
回声
回声
旋度-v\
-H'用户代理:奥林匹亚梅拉基特'\
-H'主机:192.168.0.10'\
'http://192.168.0.10/get_state.cgi'
回声
回声
旋度-v\
-H'内容类型:文本/xml'\
-H'用户代理:奥林匹亚梅拉基特'\
-H'主机:192.168.0.10'\
-d'ON'\
'http://192.168.0.10/set_camprop.cgi?com=setlist'
回声
回声
旋度-v\
-H'用户代理:奥林匹亚梅拉基特'\
-H'主机:192.168.0.10'\
'http://192.168.0.10/get_camprop.cgi?com=get&propname=GPS'
回声
回声
旋度-v\
-H'用户代理:奥林匹亚梅拉基特'\
-H'主机:192.168.0.10'\
'http://192.168.0.10/switch_cameramode.cgi?mode=standalone'
睡眠2
回声
回声
结果如下:

*   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>
*正在尝试192.168.0.10。。。
*TCP_节点集
*连接到192.168.0.10(192.168.0.10)端口80(#0)
>GET/GET_connectmode.cgi HTTP/1.1
>主机:192.168.0.10
>接受:*/*
>用户代理:奥林匹亚梅拉基特
> 
GET/switch_commpath.cgi?path=wifi HTTP/1.1
>主机:192.168.0.10
>接受:*/*
>用户代理:奥林匹亚梅拉基特
> 
GET/start\u pushevent.cgi?端口=65000 HTTP/1.1
>主机:192.168.0.10
>接受:*/*
>用户代理:奥林匹亚梅拉基特
> 
GET/switch_cameramode.cgi?mode=standalone HTTP/1.1
>主机:192.168.0.10
>接受:*/*
>用户代理:奥林匹亚梅拉基特
> 
GET/switch_cameramode.cgi?mode=rec&lvqt=0320x0240 HTTP/1.1
>主机:192.168.0.10
>接受:*/*
>用户代理:奥林匹亚梅拉基特
> 
GET/exec_takemisc.cgi?com=startiveview&port=5555http/1.1
>主机:192.168.0.10
>接受:*/*
>用户代理:奥林匹亚梅拉基特
> 
GET/GET_state.cgi HTTP/1.1
>主机:192.168.0.10
>接受:*/*
>用户代理:奥林匹亚梅拉基特
> 
POST/set_camprop.cgi?com=setlist HTTP/1.1
>主机:192.168.0.10
>接受:*/*
>内容类型:text/xml
>用户代理:奥林匹亚梅拉基特
>内容长度:73
> 
*上传已完全发送:73个字节中的73个
GET/GET_camprop.cgi?com=GET&propname=GPS HTTP/1.1
>主机:192.168.0.10
>接受:*/*
>用户代理:奥林匹亚梅拉基特
> 
GET/switch_cameramode.cgi?mode=standalone HTTP/1.1
>主机:192.168.0.10
>接受:*/*
>用户代理:奥林匹亚梅拉基特
> 
我希望它能帮助你

*   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>