A couple of updates after some more tinkering:
- Although the "have_prop" function says that PTP_DPC_SONY_ShutterSpeed2
does not exist, the direct setting of the shutterspeed does need to be
applied to PTP_DPC_SONY_ShutterSpeed2. That seems to fit with the theme
that this camera is not fully reporting on all of its properties.
- Even with the direct shutterspeed setting, it wouldn't accept
non-fractional shuttertimes (1 second, 4s, 8s, 25s, etc.). I managed to
solve this inside the shutterspeed put function, by multiplying the
numerator (x) by 10 with a denominator (y) of 10 instead of 1. Not sure if
this might also work for other Sony models. But since I had to make a
separate shutterspeed setting function for this particular camera model
anyway (due to the PTP_DPC_SONY_ShutterSpeed2 not being automatically
detected), this mod will not be applied to any other model either.
- The autofocus activation/deactivation worked after I manually created a
property description for it, in case the regular property description
search didn't find one. The auto focus now works when activated on its own.
However, in combination with a trigger capture (leaving the camera
in focusmode Automatic) the autofocus would trigger but the actual photo
capture wouldn't happen. Maybe there's an issue with how libgphoto2 decides
to stop focusing (or doesn't). Maybe that's not a problem when using the
regular capture-and-download method. I haven't tried that because I always
trigger capture and then wait for the file event(s).
- I'm having some issues sometimes not being able to change back from
Autofocus to Manual under some circumstances. It works fine in between
capturing the live views, just not after I set up the camera for a photo
capture. Have to investigate that further.
- Just like the autofocus, maybe more functionalities, such as the
focusmagnify fuctions, can be enabled by manually adding the property
descriptions. I tried a couple of different formats (Range, Enum, None,
different datatypes, and different values or ranges between -1 and 2), but
I always get Null as a value for the Focusmagnify actions (instead of a
value of 2) and couldn't get the functions to trigger on setting them.

Marcus, will you be able to use this information to update the libgphoto2?
Maybe you come up with some better way of handling the exceptions, just
like you did with auto-detecting the extra Enum list.
Or would it help if I would push my own adaptation, maybe as a separate
branch, if that's even possible? It would take me some extra work to
transfer these particular mods over from my own polluted version of the
code to the latest version of the public repo.
I still have this camera until Monday afternoon, to test out a new version.

Kind regards, Jeroen

On Fri, Apr 5, 2024 at 9:30 PM Jeroen Lichtenauer <
jeroenlichtena...@gmail.com> wrote:

> I quickly tried the direct method for ISO, f-number and shutterspeed and
> can confirm that I can now change their values on the Sony A7S III.
> So no stepping, just setting the values directly. I added the
> direct setting function calls using the device specific menus again.
> PTP_DPC_SONY_ShutterSpeed2 seems like not detected with this device,
> otherwise it would have probably automatically already used the direct
> method.
>
> Photo capture is working now, but the Autofocus trigger doesn't work yet.
> At least it is starting to get somewhat usable now.
>
> Kind regards, Jeroen
>
> On Fri, Apr 5, 2024 at 5:36 PM Jeroen Lichtenauer <
> jeroenlichtena...@gmail.com> wrote:
>
>> Hi Marcus,
>>
>> Thanks for the tips on handling the different data types. Just adding a
>> second line in the submenu table didn't work. It would still try to get the
>> datatype of the first line that it encounters.
>> So I added separate submenu tables for the ILCE-7SM3 and device specific
>> references in the menus:
>>
>> static struct submenu sony_7sm3_camera_settings[] = {
>> { N_("Priority Mode"), "prioritymode", PTP_DPC_SONY_PriorityMode,
>>  PTP_VENDOR_SONY, PTP_DTC_UINT8, _get_Sony_PriorityMode_u8,
>> _put_Sony_PriorityMode_u8 },
>> { 0,0,0,0,0,0,0 },
>> };
>>
>> static struct submenu sony_7sm3_capture_settings[] = {
>> { N_("Exposure Program"),               "expprogram",
>> PTP_DPC_ExposureProgramMode,            0,                  PTP_DTC_UINT32,
>> _get_ExposureProgram32,               _put_ExposureProgram32 },
>> { N_("Still Capture Mode"),             "capturemode",
>>  PTP_DPC_StillCaptureMode,               0,
>>  PTP_DTC_UINT32, _get_CaptureMode32,               _put_CaptureMode32 },
>> { 0,0,0,0,0,0,0 },
>> };
>>
>> static struct menu menus[] = {
>>     ...
>>     { N_("Camera Settings"),            "settings",         0x054c,
>> 0x0d18, sony_7sm3_camera_settings,      NULL,   NULL }, /* A7S-III */
>>     ...
>>     { N_("Capture Settings"),           "capturesettings",  0x054c,
>> 0x0d18, sony_7sm3_capture_settings,     NULL,   NULL }, /* A7S-III */
>>     ...
>> }
>>
>> Something else that doesn't work is changing the ISO, shutterspeed and
>> f-number settings. On the Sony A7-III changing those settings worked
>> incremental, step-by-step. It also worked slowly like that with the Imaging
>> Edge Desktop application.
>> On the contrary, with the Sony A7S-III, the ISO, shutterspeed and
>> f-number are changed instantaneously by Imaging Edge. So probably a
>> different settings-change method needs to be used, such as the direct
>> method.
>>
>> To try and search for the missing unreported properties and actions
>> (autofocus, capture, focusmagnify, etc.) I found that in the end
>> of _ptp_sony_getalldevicepropdesc, the size left is zero. So, clearly, it
>> didn't end on a decoding error. Just nothing left to decode. Could it be
>> that there's another way to get more data than with the
>> current PTP_DP_GETDATA query?
>>
>> Unfortunately, I have run out of time to work on this and will not have
>> access to this camera model anymore, so I won't be able to check any future
>> fixes.
>> Would be great if support for the A7S-III will be completed in the
>> future. As well as for the Sony A7-IV, which was also not fully functional,
>> the last time I checked.
>>
>> Kind regards, Jeroen
>>
>> On Fri, Apr 5, 2024 at 10:01 AM Marcus Meissner <mar...@jet.franken.de>
>> wrote:
>>
>>> Hi,
>>>
>>> In theory you should be able to add the 32bit variant as a secondary
>>> choice.
>>>
>>> The config code should skip the 16 bit variant if you have 32bit type,
>>> and then select the 32bit type.
>>>
>>> So copy the table and name it modes32 and just add the new line.
>>>
>>>
>>> There is "by usb id" table based driven code there (look for nikon ones),
>>> but I think just adding a different line with the different data type
>>> should
>>> work more transparently.
>>>
>>> > Unfortunately, still the operations/properties below are missing. I
>>> guess
>>> > there might be some more binary coding differences for operations as
>>> well.
>>> > Still some more work to do...
>>> >
>>> > Autofocus(0xd2c1): error 2002 on query.
>>> > Capture(0xd2c2): error 2002 on query.
>>> > Property 0xd2c3: error 2002 on query.
>>> > Property 0xd2c4: error 2002 on query.
>>>
>>> If the camera does not report them we can't really get to them.
>>>
>>> 0xd2c are also kind of write-only for instance.
>>>
>>> Ciao, Marcus
>>>
>>
_______________________________________________
Gphoto-devel mailing list
Gphoto-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gphoto-devel

Reply via email to