Re: [Sony Alpha7] no work
Jeroen Lichtenauer <[email protected]> Fri, 18 Oct 2024 19:17:20 +0200
| Newsgroups | gmane.comp.multimedia.gphoto.devel |
|---|---|
| Message-ID | <CAM_--AyeeMDd7GC5RKGqMBOrJwM0_yJZoE8-RC8q0=KtLm7rOw@mail.gmail.com> |
--===============0874501083116216984== Content-Type: multipart/alternative; boundary="0000000000000132e30624c37cdc" --0000000000000132e30624c37cdc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Now that I tested with the Sony A7 Mark IV (ILCE-7M4) I can confirm that the same changes also fixed the issues with this model. Markus' changes to the property list decoding worked to get a longer list of properties and functions. And after I also added the overrides for this camera model to use the direct-setting method (instead of the incremental) I can now also set most camera settings such as shutter speed, iso, f-number, etc. Unfortunately, the focus magnifier is not yet functioning, so spot focusing will have to be done on the camera itself. Also, changing a setting often doesn't work in one try. Sometimes I have to repeatedly set it until it changes. But maybe this depends on the camera state, as I'm changing several settings successively that might cause the camera to become temporarily unresponsive to another setting change. Not a huge problem, but it makes the whole capture process a bit slower. All we need now is a better way to automatically detect whether a Sony camera needs the direct setting method or the incremental one, so that it hopefully doesn't need to be hard-coded for every Sony model separately. Kind regards, Jeroen On Sun, Apr 7, 2024 at 2:15=E2=80=AFPM Jeroen Lichtenauer < [email protected]> wrote: > 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 i= f > 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 ow= n. > 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 decid= es > 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 alway= s > 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), bu= t > 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 versio= n. > > Kind regards, Jeroen > > On Fri, Apr 5, 2024 at 9:30=E2=80=AFPM Jeroen Lichtenauer < > [email protected]> 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=E2=80=AFPM Jeroen Lichtenauer < >> [email protected]> 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 specifi= c >>> references in the menus: >>> >>> static struct submenu sony_7sm3_camera_settings[] =3D { >>> { 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[] =3D { >>> { N_("Exposure Program"), "expprogram", >>> PTP_DPC_ExposureProgramMode, 0, PTP_DTC_UIN= T32, >>> _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[] =3D { >>> ... >>> { 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 Ima= ging >>> 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 b= e >>> 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 fu= ture >>> 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 functio= nal, >>> the last time I checked. >>> >>> Kind regards, Jeroen >>> >>> On Fri, Apr 5, 2024 at 10:01=E2=80=AFAM Marcus Meissner <[email protected]= nken.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 >>>> >>> --0000000000000132e30624c37cdc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Now that I tested with the Sony A7 Mark IV (ILCE-7M4) I ca= n confirm that the same changes also fixed the issues with this model.<div>= <br>Markus' changes to the property list decoding worked to get a longe= r list of properties and functions.=C2=A0</div><div>And after I also added = the overrides for this camera model to=C2=A0use the direct-setting method (= instead of the incremental) I can now also set most camera settings such as= shutter speed, iso, f-number, etc.<br>Unfortunately, the focus magnifier= =C2=A0is not yet functioning, so spot focusing will have to be done on the = camera itself.=C2=A0</div><div>Also, changing=C2=A0a setting often doesn= 9;t work in one try. Sometimes=C2=A0I have to repeatedly set it until it ch= anges. But maybe this depends on the camera state, as I'm changing seve= ral settings successively=C2=A0that might cause the=C2=A0camera to become t= emporarily unresponsive to another setting change. Not a huge problem, but = it makes the whole capture process a bit slower.</div><div><br><div>All we = need now is a better way to automatically detect whether a Sony camera need= s the direct setting method or the incremental one, so that it hopefully do= esn't need to be hard-coded for every Sony model separately.</div><div>= <br></div><div>Kind regards, Jeroen</div></div></div><br><div class=3D"gmai= l_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Apr 7, 2024 at 2:15= =E2=80=AFPM Jeroen Lichtenauer <<a href=3D"mailto:jeroenlichtenauer@gmai= l.com">[email protected]</a>> wrote:<br></div><blockquote clas= s=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid r= gb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div>A couple of updates= after some more tinkering:<br></div><div>- Although the "have_prop&qu= ot; function says that PTP_DPC_SONY_ShutterSpeed2 does not exist, the direc= t setting of the shutterspeed does need to be applied to PTP_DPC_SONY_Shutt= erSpeed2. That seems to fit=C2=A0with the theme that this camera is not ful= ly reporting on all of its properties.<br></div><div>- 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 shutterspe= ed 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 mod= els. But since I had to make a separate shutterspeed setting function=C2=A0= for this particular camera model anyway (due to the PTP_DPC_SONY_ShutterSpe= ed2 not being automatically detected), this mod will not be applied to any = other model either.</div><div>- The autofocus activation/deactivation worke= d after I manually=C2=A0created a property description for it, in case the = regular property description search=C2=A0didn't find=C2=A0one. The auto= focus now works when activated on its own. However, in combination with a = trigger capture (leaving the camera in=C2=A0focusmode=C2=A0Automatic) the= =C2=A0autofocus would trigger but the actual photo capture wouldn't hap= pen. Maybe there's an issue with how libgphoto2 decides to stop focusin= g (or doesn't). Maybe that's not a problem when using the regular c= apture-and-download method. I haven't tried that because I always trigg= er capture and then wait for the file event(s).</div><div>- I'm having = some issues sometimes not being able to change back from Autofocus to Manua= l under some circumstances. It works fine in between capturing the live vie= ws,=C2=A0just not after I set up the camera for a photo capture. Have to in= vestigate that further.</div><div>- Just like the autofocus, maybe more fun= ctionalities, such as the focusmagnify=C2=A0fuctions,=C2=A0can be enabled b= y manually adding the property descriptions. I tried a couple of different = formats (Range, Enum, None, different datatypes, and different values or ra= nges between -1 and 2), but I always get Null as a value for the=C2=A0Focus= magnify=C2=A0actions (instead of a value of 2) and couldn't get the fun= ctions to trigger on setting them.</div><div><br></div><div>Marcus, will yo= u 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.</div><div>Or would it help if I would p= ush my own adaptation, maybe as a separate branch, if that's even possi= ble? It would take me some extra work to transfer these particular mods ove= r from my own polluted version of the code to the latest version of the pub= lic repo.</div><div>I still have this camera until Monday afternoon, to tes= t out a new version.</div><div><br></div><div>Kind regards, Jeroen</div><br= ><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, A= pr 5, 2024 at 9:30=E2=80=AFPM Jeroen Lichtenauer <<a href=3D"mailto:jero= [email protected]" target=3D"_blank">[email protected]</a>&= gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0= px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div = dir=3D"ltr"><div dir=3D"ltr">I quickly tried the direct method for ISO, f-n= umber and shutterspeed and can confirm that I can now change their values o= n the Sony A7S III.=C2=A0<div>So no stepping, just setting the values direc= tly. I added the direct=C2=A0setting function calls using the device specif= ic menus again.=C2=A0</div><div>PTP_DPC_SONY_ShutterSpeed2 seems like not d= etected with this device, otherwise it would have probably automatically al= ready used the direct method.</div><div><br></div><div>Photo capture is wor= king now, but the Autofocus trigger doesn't work yet. At least it is st= arting to get somewhat=C2=A0usable now.</div><div><br></div><div>Kind regar= ds, Jeroen</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class= =3D"gmail_attr">On Fri, Apr 5, 2024 at 5:36=E2=80=AFPM Jeroen Lichtenauer &= lt;<a href=3D"mailto:[email protected]" target=3D"_blank">jeroenl= [email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quo= te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204= );padding-left:1ex"><div dir=3D"ltr"><div>Hi Marcus,</div><div><br></div><d= iv>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.</div><div>So I added se= parate submenu tables for the ILCE-7SM3 and device specific references in t= he menus:</div><div><br>static struct submenu sony_7sm3_camera_settings[] = =3D {<br> { N_("Priority Mode"), "prioritymode", PTP_= DPC_SONY_PriorityMode, =C2=A0 =C2=A0 =C2=A0PTP_VENDOR_SONY, PTP_DTC_UINT8,= _get_Sony_PriorityMode_u8, =C2=A0 =C2=A0 _put_Sony_PriorityMode_u8 },<br= > { 0,0,0,0,0,0,0 },<br>};<br><br>static struct submenu sony_7sm3_capture_s= ettings[] =3D {<br> { N_("Exposure Program"), =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "expprogram", =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PTP_DPC_ExposureProgramMode, =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A00, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0PTP_DTC_UINT32, _get_ExposureProgram32, =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 _put_ExposureProgram32 },<br> { N_("St= ill Capture Mode"), =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "ca= pturemode", =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PTP_DPC_St= illCaptureMode, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0, =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PTP_DTC_UINT32, _get= _CaptureMode32, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 _put_Captu= reMode32 },<br> { 0,0,0,0,0,0,0 },<br>};<br></div><div><br></div><div>stati= c struct menu menus[] =3D {<br>=C2=A0 =C2=A0 ...<br>=C2=A0 =C2=A0 { N_(&quo= t;Camera Settings"), =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"se= ttings", =C2=A0 =C2=A0 =C2=A0 =C2=A0 0x054c, 0x0d18, sony_7sm3_camera_= settings, =C2=A0 =C2=A0 =C2=A0NULL, =C2=A0 NULL }, /* A7S-III */<br></div><= div>=C2=A0 =C2=A0 ...</div><div>=C2=A0 =C2=A0 { N_("Capture Settings&q= uot;), =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "capturesettings", =C2= =A00x054c, 0x0d18, sony_7sm3_capture_settings, =C2=A0 =C2=A0 NULL, =C2=A0 N= ULL }, /* A7S-III */<br></div><div>=C2=A0 =C2=A0 ...</div><div>}</div><div>= <br></div><div>Something else that doesn't work is changing the ISO,=C2= =A0shutterspeed=C2=A0and f-number settings. On the Sony A7-III changing tho= se settings worked incremental, step-by-step. It also worked slowly like th= at with the Imaging Edge Desktop application.=C2=A0</div><div>On the contra= ry, with the Sony A7S-III, the ISO, shutterspeed=C2=A0and f-number are chan= ged instantaneously by Imaging Edge. So probably a different settings-chang= e method=C2=A0needs to be used,=C2=A0such as the direct method.</div><div><= br></div><div>To try and search=C2=A0for the missing unreported properties = and actions (autofocus, capture, focusmagnify, etc.) I found that in the en= d of=C2=A0_ptp_sony_getalldevicepropdesc, the=C2=A0size left is zero. So, c= learly, 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 cu= rrent=C2=A0PTP_DP_GETDATA query?</div><div><br></div><div>Unfortunately, I = have run out of time to work on this and will not have access to=C2=A0this = camera model anymore,=C2=A0so I won't be able to check any future fixes= .=C2=A0</div><div>Would be great if support for the=C2=A0A7S-III will be co= mpleted in the future. As well as for the Sony A7-IV, which was also not fu= lly functional, the last time I checked.=C2=A0</div><div><br></div><div>Kin= d regards, Jeroen</div><br><div class=3D"gmail_quote"><div dir=3D"ltr" clas= s=3D"gmail_attr">On Fri, Apr 5, 2024 at 10:01=E2=80=AFAM Marcus Meissner &l= t;<a href=3D"mailto:[email protected]" target=3D"_blank">[email protected]= nken.de</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"= margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-lef= t:1ex">Hi,<br> <br> In theory you should be able to add the 32bit variant as a secondary choice= .<br> <br> The config code should skip the 16 bit variant if you have 32bit type,<br> and then select the 32bit type.<br> <br> So copy the table and name it modes32 and just add the new line.<br> <br> <br> There is "by usb id" table based driven code there (look for niko= n ones),<br> but I think just adding a different line with the different data type shoul= d<br> work more transparently.<br> <br> > Unfortunately, still the operations/properties below are missing. I gu= ess<br> > there might be some more binary coding differences for operations as w= ell.<br> > Still some more work to do...<br> > <br> > Autofocus(0xd2c1): error 2002 on query.<br> > Capture(0xd2c2): error 2002 on query.<br> > Property 0xd2c3: error 2002 on query.<br> > Property 0xd2c4: error 2002 on query.<br> <br> If the camera does not report them we can't really get to them.<br> <br> 0xd2c are also kind of write-only for instance.<br> <br> Ciao, Marcus<br> </blockquote></div></div> </blockquote></div></div> </blockquote></div></div> </blockquote></div> --0000000000000132e30624c37cdc-- --===============0874501083116216984== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============0874501083116216984== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Gphoto-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gphoto-devel --===============0874501083116216984==--