Bloodevil / sony_camera_api

sony camera remote api
http://developer.sony.com/develop/cameras/
MIT License
244 stars 60 forks source link

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

Open ulkesh11 opened 7 years ago

ulkesh11 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 6 years ago

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

scalarwebapi_dd.xml.txt `

1 0 urn:schemas-upnp-org:device:Basic:1 ILCE-7R Sony Corporation http://www.sony.net/ SonyDigitalMediaServer SonyImagingDevice uuid:000000001000-1010-8000-12A5D0A66CB5 urn:schemas-sony-com:service:ScalarWebAPI:1 urn:schemas-sony-com:serviceId:ScalarWebAPI urn:schemas-sony-com:service:DigitalImaging:1 urn:schemas-sony-com:serviceId:DigitalImaging /DigitalImagingDesc.xml /upnp/control/DigitalImaging 1.0 guide http://192.168.122.1:8080/sony accessControl http://192.168.122.1:8080/sony camera http://192.168.122.1:8080/sony

`

ulkesh11 commented 6 years ago

@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 commented 6 years ago

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