Availability of setCameraFunction on HDR-AZ1 using

2019-07-31 17:22发布

问题:

If the camera (HDR-AZ1) is connected to my PC via the camera's built in access point, the "setCameraFunction" API is available. If however I use the Live setting where the camera connects to my router, "setCameraFunction" is conspicuously not available. With the camera and PC connected to the router I can perform almost all the functions I require, except for downloading images.

Questions:

  1. Is this by design and if so is there any way around it?
  2. Is there any way to transfer images from the camera without "setCameraFunction"?

回答1:

To answer your questions:

  1. Yes it is designed this way. I don't know the purpose but I have myself struggling with this design. To be able to download content from the camera you need to set camera mode to CONTENTS_TRANSFER using setCameraFunction

  2. There is one other way to download images from the camera. When you take a picture through actTakePicture call you actually get a url for the taken picture which you can use to download without setting to CONTENTS_TRANSFER. However for video this is not possible without setting the camera mode to CONTENTS_TRANSFER.



回答2:

Sony representative @MarlinSONY has made clear in a couple threads:

  1. There is something wrong with Sony QX1?
  2. Connecting to Multiple Cameras via Sony Remote Camera API

that using the Sony Camera Remote API via a router is not supported. Though in the first thread above @MarlinSONY mentions it is possible: "While you can use it over a router, the functionality is not tested or guaranteed."

Sony Camera Remote API functionality is only supported 1:1 (device:sonycamera), where the device connects to the Wifi Access Point created by the Sony Camera in Wifi mode.

I explain how I am talking to two Sony HDR-AZ1 cameras in the second thread above and I assign a static IP address to each Sony Camera with my router.

I have found that I can execute a decent amount of Sony Remote API methods with this setup but not Content Transfer. It's too bad, so close but no cigar.

Now how does the Sony Live View Remote do it then? Well, that remote becomes the Wifi Access Point and each Sony Action Cam Camera, up to 5 become clients that connect to the Sony Live View Remote access point. Watch in this video, the settting for the Remote kick off the access point, than you hold the Wifi button on each Sony Action Cam and they pair to the Access Point of the remote. This is how I think it is working anyways, from what I have studied.

So it makes a bit of sense that Sony does not support connecting to Sony Action Cams via a router and that it could produce unexpected results. They expect the API connect to be one camera via the Wifi Access Point of that camera, and they do not expect HTTP requests without the Wifi Access Point handshake first. It seems, that once there is a device to Sony camera connection via Wifi Access Point of the Sony camera, that handshake causes the camera to go into a certain mode, engage certain protocols and now it is ready, in full, for the Sony Remote API calls, all the calls.

Could Sony do this all over HTTP without Wifi Access Point connection, it would seem the case, would it take many changes to their firmware, who knows, it must be some level of a pain in the ass or I think Sony would have done it.

Perhaps Sony decided they want heavy sales of the Sony Live View Remote, for people that are using more than one camera.

Check out this thread, there is library that was put together, prior to Sony releasing their Camera Remote API, I believe, and they figured out how to get setCameraFunction, it looks like they were messing with the hash of the communication which might be part of the valid connection protocol Sony expects the supported Wifi Access Point 1:1 connection.

On this thread the discussion of limited API access is discussed. At some point is stated that the Sony Play Memories has access to "hidden" API methods and that a handshake is done between Play Memories and the Sony Camera and then subsequent authentication, it is this authentication that is missing, using a router and thus blocking or hiding a subset of methods from being accessed that are available on the Sony Action Cam, if only authentication were there. I think this library cracked that authentication.