indigo-astronomy / indigo

INDIGO is a system of standards and frameworks for multiplatform and distributed astronomy software development designed to scale with your needs.
http://www.indigo-astronomy.org
Other
139 stars 64 forks source link

ccd_ptp: implement SONY new API #506

Closed tail-feather closed 8 months ago

tail-feather commented 8 months ago

I found new API version 300.

This API allows direct manipulation of enumerated values, similar to Nikon and Canon cameras! Yay!

I tested with:

polakovic commented 8 months ago

Do you suppose it is backward compatible with older cameras? I still have 7RM2 somewhere, but I need to find some battery :)

polakovic commented 8 months ago

Oh yes, I see, new API for 7RM4 and later.

tail-feather commented 8 months ago

The original implementation says compatible with these models. I had the opportunity to verify those cameras to our new product, so I tested with that.

But it may be possible that older models are supported. I'll soon borrow one from a colleague who owns a SONY camera to try it out.

If you can test it, please edit here and give it a try.

https://github.com/indigo-astronomy/indigo/blob/9771cf69847a5ec4960067d2de8ee48361fbe7c9/indigo_drivers/ccd_ptp/indigo_ptp_sony.c#L45

jimtjames commented 8 months ago

I have tested changing the border to 0x0c33 for ILCE-7RM3 and it does not appear to work. I observed the following output from indigo_server after trying to connect the camera in Ain Imager:

20:33:02.841910 indigo_server: indigo_ccd_ptp[ptp_transaction:1204]: request SDIOConnect_Sony (9201) 00000007 [00000003, 00000000, 00000000]
20:33:02.842036 indigo_server: indigo_ccd_ptp[ptp_transaction:1206]: libusb_bulk_transfer(24) -> OK
20:33:02.842877 indigo_server: indigo_ccd_ptp[ptp_transaction:1246]: libusb_bulk_transfer() -> OK, 20
20:33:02.842891 indigo_server: indigo_ccd_ptp[ptp_transaction:1256]: data 9201 00000007 +8 bytes
20:33:02.843081 indigo_server: indigo_ccd_ptp[ptp_transaction:1283]: libusb_bulk_transfer() -> OK, 12
20:33:02.843093 indigo_server: indigo_ccd_ptp[ptp_transaction:1293]: response OK (2001) 00000007 []
20:33:02.843097 indigo_server: indigo_ccd_ptp[ptp_transaction:1204]: request GetAllDevicePropData_Sony (9209) 00000008 []
20:33:02.843207 indigo_server: indigo_ccd_ptp[ptp_transaction:1206]: libusb_bulk_transfer(12) -> OK
20:33:02.844117 indigo_server: indigo_ccd_ptp[ptp_transaction:1246]: libusb_bulk_transfer() -> OK, 1024
20:33:02.844129 indigo_server: indigo_ccd_ptp[ptp_transaction:1256]: data 9209 00000008 +1756 bytes
20:33:02.844217 indigo_server: indigo_ccd_ptp[ptp_transaction:1268]: libusb_bulk_transfer() -> OK, 744
20:33:02.844507 indigo_server: indigo_ccd_ptp[ptp_transaction:1283]: libusb_bulk_transfer() -> OK, 12
20:33:02.844520 indigo_server: indigo_ccd_ptp[ptp_transaction:1293]: response OK (2001) 00000008 []
20:33:02.844536 indigo_server: indigo_ccd_ptp[ptp_sony_decode_property:1224]: Different count: 20485 != 7 @ 0x5004
20:33:02.844558 indigo_server: indigo_ccd_ptp[ptp_update_property:1497]: Compression (5004), type = uint8 -> DSLR_COMPRESSION (16: [2, 3, 4, ..., 19, 20, 18]<7>)
20:33:02.844565 indigo_server: indigo_ccd_ptp[ptp_sony_decode_property:1032]: Bad type: 0x0
indigo_worker: indigo_ptp_sony.c:1033: ptp_sony_decode_property: Assertion `false' failed.

This list makes sense as its the same list that is supported by Sony's official CameraRemote SDK. As such, I suspect cameras older than the A7R IV won't work with the new API.

polakovic commented 6 months ago

It looks, that new API is used and doesn't work with A64000 cameras, but I don't have product ID yet :(

polakovic commented 6 months ago

ICLE-6400 should be 0x0caa. The oldest camera with new API is probably ILCE-7RM4.