sony_camera_api icon indicating copy to clipboard operation
sony_camera_api copied to clipboard

scan_for_cameras.py cannot find Sony A7C

Open qdwang opened this issue 3 years ago • 5 comments

The result of scan_for_cameras.py is

Available cameras: []

with the latest develop branch of the repo.

But http://192.168.122.1:64321/dd.xml can be opened in brower, so the camera must has been connected to the computer.

qdwang avatar Jul 14 '21 02:07 qdwang

Finding cameras is 2 phase; first it has to locate the IP and then it parses the XML. Previously we had to tweak the parsing to account for slight differences in the response.... but I think that the code has moved on since then. https://github.com/Bloodevil/sony_camera_api/commit/aefce98732313c53460375e415c90a73ca9d9848#diff-c13b209edfca4d5d90b0f4a442d06dca9fa15657a48d99d10524fce39c6d5b9e

Maybe you can dump/print out the data sent to "_parse_ssdp_response()" and look for differences. https://github.com/Bloodevil/sony_camera_api/blob/develop/src/pysony.py#L80

Also note, you can alter the script 'scan_for_cameras.py" to force the IP address to a particular value.

mungewell avatar Jul 14 '21 05:07 mungewell

commit d65482cb4c10060c6b93ac11a177a17cd1387a55 (HEAD -> develop)
Author: yeaji.shin <[email protected]>
Date:   Mon May 25 15:52:50 2020 -0700

On my QX-10 gives:

simon@thevoid:~/sony_camera_api-github$ python3 examples/scan_for_cameras.py 
b'HTTP/1.1 200 OK\r\nCACHE-CONTROL: max-age=1800\r\nEXT: \r\nLOCATION: http://10.0.0.1:64321/DmsRmtDesc.xml\r\nSERVER: UPnP/1.0 SonyImagingDevice/1.0\r\nST: urn:schemas-sony-com:service:ScalarWebAPI:1\r\nUSN: uuid:00000000-0005-0010-8000-98f1700fa96e::urn:schemas-sony-com:service:ScalarWebAPI:1\r\nX-AV-Physical-Unit-Info: pa=""; pl=;\r\nX-AV-Server-Info: av=5.0; hn=""; cn="Sony Corporation"; mn="SonyImagingDevice"; mv="1.0";\r\n\r\n'
Available cameras: ['http://10.0.0.1:10000']

Checking Camera: http://10.0.0.1:10000
{'id': 1, 'result': [['getMethodTypes', 'getAvailableApiList', 'setShootMode', 'getShootMode', 'getSupportedShootMode', 'getAvailableShootMode', 'setSelfTimer', 'getSelfTimer', 'getSupportedSelfTimer', 'getAvailableSelfTimer', 'setPostviewImageSize', 'getPostviewImageSize', 'getSupportedPostviewImageSize', 'getAvailablePostviewImageSize', 'startLiveview', 'stopLiveview', 'actTakePicture', 'startMovieRec', 'stopMovieRec', 'awaitTakePicture', 'actZoom', 'setExposureMode', 'getExposureMode', 'getSupportedExposureMode', 'getAvailableExposureMode', 'setBeepMode', 'getBeepMode', 'getSupportedBeepMode', 'getAvailableBeepMode', 'setCameraFunction', 'getCameraFunction', 'getSupportedCameraFunction', 'getAvailableCameraFunction', 'setStillSize', 'getStillSize', 'getSupportedStillSize', 'getAvailableStillSize', 'actFormatStorage', 'getStorageInformation', 'setTouchAFPosition', 'cancelTouchAFPosition', 'getTouchAFPosition', 'setExposureCompensation', 'getExposureCompensation', 'getSupportedExposureCompensation', 'getAvailableExposureCompensation', 'setWhiteBalance', 'getWhiteBalance', 'getSupportedWhiteBalance', 'getAvailableWhiteBalance', 'setIsoSpeedRate', 'getIsoSpeedRate', 'getSupportedIsoSpeedRate', 'getAvailableIsoSpeedRate', 'actHalfPressShutter', 'cancelHalfPressShutter', 'getApplicationInfo', 'getVersions', 'getEvent']]}

mungewell avatar Jul 14 '21 05:07 mungewell

Also, on my the A5000 the factory installed WiFi app was pretty crappy, make sure that you install the latest from the Sony App Store.

mungewell avatar Jul 14 '21 05:07 mungewell

It seems A7C does not support http api now. It only supports PTP/IP protocol.

qdwang avatar Jul 14 '21 08:07 qdwang

Any reference to that ptp/ip protocol is?

zonyl avatar Jul 17 '21 16:07 zonyl