User Tools

Site Tools


articles:pentax_k-1_wifi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
articles:pentax_k-1_wifi [2016/11/17 22:48] – created moritzarticles:pentax_k-1_wifi [2016/11/17 23:04] – [/v1/photos/...] moritz
Line 27: Line 27:
  
 The app talks HTTP to the camera. First, it gets general information about the camera's capabilities and then switches to a WebSocket connection to stream requests/responses. Here's an overview of the end points it exports. The app talks HTTP to the camera. First, it gets general information about the camera's capabilities and then switches to a WebSocket connection to stream requests/responses. Here's an overview of the end points it exports.
 +
 +==== /v1/props ====
  
   GET /v1/props HTTP/1.1   GET /v1/props HTTP/1.1
Line 67: Line 69:
  "model": "PENTAX K-1",  "model": "PENTAX K-1",
  "firmwareVersion": "01.40",  "firmwareVersion": "01.40",
- "macAddress": "AC:3F:A4:ERADICATED", + "macAddress": "AC:3F:A4:(hidden)", 
- "serialNo": "ERADICATED",+ "serialNo": "(hidden)",
  "channelList": [0,1,2,3,4,5,6,7,8,9,10,11],  "channelList": [0,1,2,3,4,5,6,7,8,9,10,11],
  "hot": false,  "hot": false,
Line 94: Line 96:
  }  }
  ],  ],
- "ssid": "PENTAX_ERADICATED", + "ssid": "PENTAX_(hidden)", 
- "key": "ERADICATED",+ "key": "(hidden)",
  "channel": "6",  "channel": "6",
  "slotMode": "reserve",  "slotMode": "reserve",
Line 101: Line 103:
 </code> </code>
  
 +==== /v1/changes ====
  
 +  GET /v1/changes HTTP/1.1
  
 +This command is used to upgrade the connection to websocket.
 +
 +==== /v1/photos ====
 +
 +  GET /v1/photos?storage=sd1 HTTP/1.1
 +List the photos on SD1.
 +<code javascript>
 +{"errCode": 200,
 + "errMsg": "OK",
 + "dirs": [
 + {
 + "name": "100_1112",
 + "files": [ "IMGP1774.JPG", "IMGP1774.PEF"]
 + },
 + {
 + "name": "101_1113",
 + "files": [ "IMGP1775.JPG", "IMGP1775.PEF"]
 + },
 + {
 + "name": "102_1117",
 + "files": [ "IMGP1856.JPG"]
 + }
 + ]
 +}
 +</code>
 +
 +==== /v1/photos/... ====
 +
 +  GET /v1/photos/102_1117/IMGP1856.JPG?size=thumb&storage=sd1 HTTP/1.1
 +Reads a specific thumbnail image from the SD card. The camera replies with a HTTP 200 OK and sends a jpeg encoded image.
 +
 +  GET /v1/photos/102_1117/IMGP1857.JPG?size=view&storage=sd1 HTTP/1.1
 +Reads a larger resolution image from the SD card.
 +
 +  GET /v1/photos/102_1117/IMGP1857.JPG/info?storage=sd1 HTTP/1.1
 +Get meta information on an image.
 +<code javascript>
 +{"errCode": 200,
 + "errMsg": "OK",
 + "captured": true,
 + "dir": "102_1117",
 + "file": "IMGP1857.JPG",
 + "av": "4.0",
 + "sv": "200",
 + "xv": "0",
 + "tv": "1.8",
 + "orientation": 1,
 + "cameraModel": "PENTAX K-1",
 + "latlng": "47.000000,8.000000",
 + "datetime": "2016-11-17T23:00:00"}
 +</code>
 +
 +==== /v1/liveview ====
 +
 +  GET /v1/liveview HTTP/1.1
 +Seems to initiate live viewing. It didn't really work in the app.
 +
 +==== /v1//lens/focus ====
 +
 +  POST /v1/lens/focus HTTP/1.1
 +Parameters are ''pos=52,52''. I think they refer to where the focus point is set. The camera sends the following reply:
 +<code javascript>
 +{"errCode": 200,
 + "errMsg": "OK",
 + "focused": true,
 + "focusCenters": [],
 + "focusEffectiveArea": [70,64]}
 +</code>
articles/pentax_k-1_wifi.txt · Last modified: 2016/11/17 23:16 by moritz

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki