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 cannot find Sony A7C #76

Open
qdwang opened this issue Jul 14, 2021 · 5 comments
Open

scan_for_cameras.py cannot find Sony A7C #76

qdwang opened this issue Jul 14, 2021 · 5 comments

Comments

@qdwang
Copy link

qdwang commented Jul 14, 2021

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.

@mungewell
Copy link
Contributor

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.
aefce98#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
Copy link
Contributor

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

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.

@qdwang
Copy link
Author

qdwang commented Jul 14, 2021

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

@zonyl
Copy link

zonyl commented Jul 17, 2021

Any reference to that ptp/ip protocol is?

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