sony_camera_api icon indicating copy to clipboard operation
sony_camera_api copied to clipboard

scan_for_cameras.py not working for sony alpha 7r

Open ulkesh11 opened this issue 7 years ago • 5 comments

Hello,

I connected my sony alpha 7r camera to the laptop via wifi and then ran python src/example/scan_for_cameras.py But it is not able to detect the camera. Can this api work for the sony alpha 7r

Please help!

ulkesh11 avatar Jul 21 '17 19:07 ulkesh11

The Alpha 7r (and 7r MKII) should be supported: https://developer.sony.com/develop/cameras/

It might be a similar problem to that I had on the HX60, in that the returned 'file' giving camera capabilities and definitions is not quite as expected. https://github.com/Bloodevil/sony_camera_api/blob/master/src/pysony.py#L110

I'd suggest printing out the 'data' here: https://github.com/Bloodevil/sony_camera_api/blob/master/src/pysony.py#L127

and seeing if anything is obviously different/wrong. If you post it here, I can give it a look through and compare with the cameras I have. Simon.

mungewell avatar Jul 24 '17 20:07 mungewell

BTW you did installed the app (on the camera), didn't you....? https://www.playmemoriescameraapps.com/portal/usbspec.php?eid=IS9104-NPIA09014_00-F00002

mungewell avatar Jul 24 '17 20:07 mungewell

I have a a7r as well, this is the xml file for reference.

scalarwebapi_dd.xml.txt `

<major>1</major>

<minor>0</minor>
<deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType>

<friendlyName>ILCE-7R</friendlyName>

<manufacturer>Sony Corporation</manufacturer>

<manufacturerURL>http://www.sony.net/</manufacturerURL>

<modelDescription>SonyDigitalMediaServer</modelDescription>

<modelName>SonyImagingDevice</modelName>

<UDN>uuid:000000001000-1010-8000-12A5D0A66CB5</UDN>

<serviceList>

  <service>

    <serviceType>urn:schemas-sony-com:service:ScalarWebAPI:1</serviceType>

    <serviceId>urn:schemas-sony-com:serviceId:ScalarWebAPI</serviceId>

    <SCPDURL/>

    <controlURL/>

    <eventSubURL/>

  </service>

  <service>

    <serviceType>urn:schemas-sony-com:service:DigitalImaging:1</serviceType>

    <serviceId>urn:schemas-sony-com:serviceId:DigitalImaging</serviceId>

    <SCPDURL>/DigitalImagingDesc.xml</SCPDURL>

    <controlURL>/upnp/control/DigitalImaging</controlURL>

    <eventSubURL/>

  </service>

</serviceList>

<av:X_ScalarWebAPI_DeviceInfo xmlns:av="urn:schemas-sony-com:av">

  <av:X_ScalarWebAPI_Version>1.0</av:X_ScalarWebAPI_Version>

  <av:X_ScalarWebAPI_ServiceList>

    <av:X_ScalarWebAPI_Service>

      <av:X_ScalarWebAPI_ServiceType>guide</av:X_ScalarWebAPI_ServiceType>

      <av:X_ScalarWebAPI_ActionList_URL>http://192.168.122.1:8080/sony</av:X_ScalarWebAPI_ActionList_URL>

      <av:X_ScalarWebAPI_AccessType/>

    </av:X_ScalarWebAPI_Service>

    <av:X_ScalarWebAPI_Service>

      <av:X_ScalarWebAPI_ServiceType>accessControl</av:X_ScalarWebAPI_ServiceType>

      <av:X_ScalarWebAPI_ActionList_URL>http://192.168.122.1:8080/sony</av:X_ScalarWebAPI_ActionList_URL>

      <av:X_ScalarWebAPI_AccessType/>

    </av:X_ScalarWebAPI_Service>

    <av:X_ScalarWebAPI_Service>

      <av:X_ScalarWebAPI_ServiceType>camera</av:X_ScalarWebAPI_ServiceType>

      <av:X_ScalarWebAPI_ActionList_URL>http://192.168.122.1:8080/sony</av:X_ScalarWebAPI_ActionList_URL>

      <av:X_ScalarWebAPI_AccessType/>

    </av:X_ScalarWebAPI_Service>

  </av:X_ScalarWebAPI_ServiceList>

</av:X_ScalarWebAPI_DeviceInfo>
`

wenoptics avatar Oct 23 '17 13:10 wenoptics

@mungewell Sorry for late response. Yes I had already installed it. But still had no luck with scan_for_cameras.py. So Im not using this package anymore

ulkesh11 avatar Oct 23 '17 14:10 ulkesh11

Putting that 'definition.xml' through the parser outputs something that looks sensible (though I don't have my cameras with me to do a comparison).

{u'accessControl': u'http://192.168.122.1:8080', u'camera': u'http://192.168.122.1:8080', u'guide': u'http://192.168.122.1:8080'}

How did you get the 'xml', I assume a manual download/wget from the camera? In which case it might be the earlier "discover()" function which is failing. https://github.com/Bloodevil/sony_camera_api/blob/master/src/pysony.py#L30

I'd start by printing out the data sent to "_parse_ssdp_response()" and working back from there. https://github.com/Bloodevil/sony_camera_api/blob/master/src/pysony.py#L85

You can bypass the discovery process, you should be able to force the camera's IP by using

camera = SonyAPI(QX_ADDR='http://192.168.122.1:8080')

mungewell avatar Oct 23 '17 19:10 mungewell