Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scan_for_cameras.py not working for sony alpha 7r #35

Open
ulkesh11 opened this issue Jul 21, 2017 · 5 comments
Open

scan_for_cameras.py not working for sony alpha 7r #35

ulkesh11 opened this issue Jul 21, 2017 · 5 comments

Comments

@ulkesh11
Copy link

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!

@mungewell
Copy link
Contributor

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
Copy link
Contributor

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

@wenoptics
Copy link
Contributor

wenoptics commented Oct 23, 2017

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

@ulkesh11
Copy link
Author

@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

@mungewell
Copy link
Contributor

mungewell commented Oct 23, 2017

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')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants