Re: [Sony Alpha7] no work

Jeroen Lichtenauer <[email protected]> Thu, 4 Apr 2024 19:23:42 +0200
Newsgroups gmane.comp.multimedia.gphoto.devel
Message-ID <CAM_--AwUcZ8-kxL9+hFRH8M7VTdndvpr+1vqZWFX+L_4-cmGsg@mail.gmail.com>
--===============0292742703671056052==
Content-Type: multipart/alternative; boundary="0000000000000387d80615489cad"

--0000000000000387d80615489cad
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Marcus,

Here's the debug for your latest version:
https://drive.usercontent.google.com/uc?id=3D1MGvbSM_Oo2x6CpfFHn0cM8VAqgDvj=
DR0&export=3Ddownload
Your version seems to come to the same result as mine (same list of
properties).

I see that you have chosen to use the second (more complete) enum list for
the final property description. From that, I understand that the
ptp_unpack_Sony_DPD function should return a complete list of options,
including those that may currently not be available, right?

Additionally, there were also 3 properties for which I needed to change the
data type for the ILCE-7SM3 in ptp2/config.c:

{ N_("Exposure Program"),               "expprogram",
PTP_DPC_ExposureProgramMode,            0,                  PTP_DTC_UINT16,
_get_ExposureProgram,               _put_ExposureProgram }, =3D> to =3D>
{ N_("Exposure Program"),               "expprogram",
PTP_DPC_ExposureProgramMode,            0,                  PTP_DTC_UINT32,
_get_ExposureProgram,               _put_ExposureProgram },

static struct deviceproptableu16 exposure_program_modes[] =3D { =3D> to =3D=
>
static struct deviceproptableu32 exposure_program_modes[] =3D {

GENERIC16TABLE(ExposureProgram,exposure_program_modes) =3D> to =3D>
GENERIC32TABLE(ExposureProgram,exposure_program_modes)

=3D=3D=3D

{ N_("Still Capture Mode"),             "capturemode",
 PTP_DPC_StillCaptureMode,               0,
 PTP_DTC_UINT16, _get_CaptureMode,                   _put_CaptureMode },
=3D> to =3D>
{ N_("Still Capture Mode"),             "capturemode",
 PTP_DPC_StillCaptureMode,               0,
 PTP_DTC_UINT32, _get_CaptureMode,               _put_CaptureMode },

static struct deviceproptableu16 capture_mode[] =3D { =3D> to =3D>
static struct deviceproptableu32 capture_mode[] =3D {

GENERIC16TABLE(CaptureMode,capture_mode) =3D> to =3D>
GENERIC32TABLE(CaptureMode,capture_mode)

=3D=3D=3D

{ N_("Priority Mode"), "prioritymode", PTP_DPC_SONY_PriorityMode,
 PTP_VENDOR_SONY, PTP_DTC_INT8, _get_Sony_PriorityMode,
_put_Sony_PriorityMode }, =3D> to =3D>
{ N_("Priority Mode"), "prioritymode", PTP_DPC_SONY_PriorityMode,
 PTP_VENDOR_SONY, PTP_DTC_UINT8, _get_Sony_PriorityMode,
_put_Sony_PriorityMode },

static struct deviceproptablei8 sony_prioritymode[] =3D { =3D> to =3D>
static struct deviceproptableu8 sony_prioritymode[] =3D {

=3D=3D=3D

Obviously, some additional device-specific definitions are needed here,
because now it won't work anymore for the other Sony cameras. But I haven't
yet figured out how to target a specific Sony device in config.c.

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.
Still Image(0xd2c7): error 2002 on query.
Movie(0xd2c8): error 2002 on query.
Property 0xd2c9: error 2002 on query.
Near Far(0xd2d1): error 2002 on query.
Property 0xd2d2: error 2002 on query.
Property 0xd2d7: error 2002 on query.
Property 0xd2d8: error 2002 on query.
Property 0xd2d9: error 2002 on query.
Property 0xd2da: error 2002 on query.
Property 0xd2db: error 2002 on query.
AF Area Position(0xd2dc): error 2002 on query.
Property 0xd2dd: error 2002 on query.
Property 0xd2df: error 2002 on query.
Property 0xd2e0: error 2002 on query.
Property 0xd2e1: error 2002 on query.
Property 0xd2e2: error 2002 on query.
Property 0xd2e4: error 2002 on query.
Property 0xd2e5: error 2002 on query.
Property 0xd2e6: error 2002 on query.
Property 0xd2e7: error 2002 on query.
Property 0xd2e8: error 2002 on query.
Property 0xd2e9: error 2002 on query.
Property 0xd2ea: error 2002 on query.
Property 0xd2eb: error 2002 on query.
Property 0xd2f3: error 2002 on query.
Property 0xd302: error 2002 on query.
Property 0xd303: error 2002 on query.
Property 0xd305: error 2002 on query.
Property 0xd306: error 2002 on query.
Property 0xd304: error 2002 on query.
Property 0xd301: error 2002 on query.
Property 0xd300: error 2002 on query.
Property 0xd308: error 2002 on query.
Property 0xd2f2: error 2002 on query.
Property 0xd309: error 2002 on query.
Property 0xd30a: error 2002 on query.
Property 0xd30b: error 2002 on query.
Still Image(0xd2c7): error 2002 on query.
Property 0xd2cd: error 2002 on query.
Property 0xd2ce: error 2002 on query.
Property 0xd2cf: error 2002 on query.
Property 0xd2d0: error 2002 on query.

Kind regards, Jeroen

On Thu, Apr 4, 2024 at 5:40=E2=80=AFPM Marcus Meissner <[email protected].=
de>
wrote:

> Hi,
>
> I just committed code that tries to handle it more generically.
>
> commit 4ab78020b304ef3105d11701d70d8b785476fafa
> Author: Marcus Meissner <[email protected]>
> Date:   Thu Apr 4 17:35:06 2024 +0200
>
>     try a workaround for newer Sonys that have two enums.
>
>
> It reads the next 16bit value, if its < 0x200 (as it would be 0x5somethin=
g
> or 0xDsomething)
> it assumes it has a secondary enum list and reads over that.
>
> Can you try this?
>
> Ciao, Marcus
> On Wed, Apr 03, 2024 at 09:44:29PM +0200, Jeroen Lichtenauer wrote:
> > Hi Marcus,
> >
> > Thank you for your quick reply.
> > After doing some debugging, I found out that the Sony A7S III includes =
a
> > second ENUM list for every property. The second one is either as long a=
s
> > the first list, or longer. It seems like the first list contains the
> > enabled options, and the second list contains all the possible options
> > (some of which you might not be able to choose in the current state).
> >
> > in ptp2/ptp-pack.c
> > static inline int ptp_unpack_Sony_DPD (PTPParams *params, unsigned char=
*
> > data, PTPDevicePropDesc *dpd, unsigned int dpdlen, unsigned int *poffse=
t)
> >
> > After the current ENUM list extraction
> > for (i=3D0;i<N;i++) {
> >    ret =3D ptp_unpack_DPV (params, data, poffset, dpdlen,
> > &dpd->FORM.Enum.SupportedValue[i], dpd->DataType);
> >
> >      /* Slightly different handling here. The HP PhotoSmart 120
> >      * specifies an enumeration with N in wrong endian
> >      * 00 01 instead of 01 00, so we count the enum just until the
> >      * the end of the packet.
> >      */
> >      if (!ret) {
> >      if (!i)
> >      goto outofmemory;
> >      dpd->FORM.Enum.NumberOfValues =3D i;
> >      break;
> >      }
> > }
> >
> > I added some code that updates the offset to skip the second list:
> >
> > if(strcmp(params->deviceinfo.Model, "ILCE-7SM3")=3D=3D0)
> > {
> >      int enum_value_len;
> >      switch (dpd->DataType) {
> >           case PTP_DTC_INT8:
> >           enum_value_len =3D 1;
> >           break;
> >           case PTP_DTC_UINT8:
> >           enum_value_len =3D 1;
> >           break;
> >           case PTP_DTC_INT16:
> >           enum_value_len =3D 2;
> >           break;
> >           case PTP_DTC_UINT16:
> >           enum_value_len =3D 2;
> >           break;
> >           case PTP_DTC_INT32:
> >           enum_value_len =3D 4;
> >           break;
> >           case PTP_DTC_UINT32:
> >           enum_value_len =3D 4;
> >           break;
> >           case PTP_DTC_INT64:
> >           enum_value_len =3D 8;
> >           break;
> >           case PTP_DTC_UINT64:
> >           enum_value_len =3D 8;
> >           break;
> >           case PTP_DTC_UINT128:
> >           enum_value_len =3D 16;
> >           break;
> >           case PTP_DTC_INT128:
> >           enum_value_len =3D 16;
> >           break;
> >           case PTP_DTC_AINT8:
> >           enum_value_len =3D 1;
> >           break;
> >           case PTP_DTC_AUINT8:
> >           enum_value_len =3D 1;
> >           break;
> >           case PTP_DTC_AUINT16:
> >           enum_value_len =3D 2;
> >           break;
> >           case PTP_DTC_AINT16:
> >           enum_value_len =3D 2;
> >           break;
> >           case PTP_DTC_AUINT32:
> >           enum_value_len =3D 4;
> >           break;
> >           case PTP_DTC_AINT32:
> >           enum_value_len =3D 4;
> >           break;
> >           case PTP_DTC_AUINT64:
> >           enum_value_len =3D 8;
> >           break;
> >           case PTP_DTC_AINT64:
> >           enum_value_len =3D 8;
> >           break;
> >           case PTP_DTC_STR:
> >           goto outofmemory;
> >           break;
> >           default:
> >           goto outofmemory;
> >      }
> >      uint16_t N_all =3D dtoh16a(&data[*poffset]);
> >      *poffset+=3Dsizeof(uint16_t);
> >      *poffset +=3D enum_value_len*N_all;
> > }
> >
> > The debug log is here
> >
> https://drive.usercontent.google.com/uc?id=3D1MEanNTniSpzv8xd82fZ_D9n72hZ=
BrFwQ&export=3Ddownload
> > Although I now finally get lots of properties (hundreds), it still miss=
es
> > some essential actions, such as image capture.
> > Perhaps because these have different addresses for this camera?
> >
> > Kind regards, Jeroen
> >
> > On Wed, Apr 3, 2024 at 3:47=E2=80=AFPM Marcus Meissner <[email protected]=
ken.de>
> > wrote:
> >
> > > Hi,
> > >
> > > Thanks for this report.
> > >
> > > it seems the binary format of this variable has changed, which leds t=
o
> > > this error.
> > >
> > > I will need to adjust the decoder :(
> > >
> > > You can short term perhaps add a ignore to the decoder, perhaps it wi=
ll
> > > help,
> > > except you cant use any config reads
> > >
> > > Ciao, Marcus
> > > On Wed, Apr 03, 2024 at 02:13:31PM +0200, Jeroen Lichtenauer wrote:
> > >
>

--0000000000000387d80615489cad
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi Marcus,<div><br></div><div>Here&#39;s the debug for you=
r latest version:<br><a href=3D"https://drive.usercontent.google.com/uc?id=
=3D1MGvbSM_Oo2x6CpfFHn0cM8VAqgDvjDR0&amp;export=3Ddownload">https://drive.u=
sercontent.google.com/uc?id=3D1MGvbSM_Oo2x6CpfFHn0cM8VAqgDvjDR0&amp;export=
=3Ddownload</a><br></div><div>Your=C2=A0version seems to come to the same r=
esult as mine (same list of properties).</div><div><br></div><div>I see tha=
t you have chosen to use the second (more complete) enum list for the final=
 property description. From that, I understand that the ptp_unpack_Sony_DPD=
 function should return a complete list of options, including those that ma=
y currently not be available,=C2=A0right?</div><div><br></div><div>Addition=
ally, there were also 3 properties=C2=A0for which I needed to change the da=
ta type for the ILCE-7SM3 in ptp2/config.c:</div><div><br></div><div><div>{=
 N_(&quot;Exposure Program&quot;), =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 &quot;expprogram&quot;, =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_UINT16, _get_ExposureProgram, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 _put_ExposureProgram }, =3D&gt; to =3D&gt;</div><div>	{ N_(&quot;Ex=
posure Program&quot;), =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &qu=
ot;expprogram&quot;, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 PTP_D=
PC_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=
_ExposureProgram, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 _put_Exp=
osureProgram },<br></div><div><br></div><div>static struct deviceproptableu=
16 exposure_program_modes[] =3D { =3D&gt; to =3D&gt;<br></div><div>static s=
truct deviceproptableu32 exposure_program_modes[] =3D {=C2=A0<br></div><div=
><br></div><div>GENERIC16TABLE(ExposureProgram,exposure_program_modes) =3D&=
gt; to =3D&gt;<br></div><div>GENERIC32TABLE(ExposureProgram,exposure_progra=
m_modes)<br></div><div><br></div><div>=3D=3D=3D</div><div><br></div><div>{ =
N_(&quot;Still Capture Mode&quot;), =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 &quot;capturemode&quot;, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0PTP_DPC_StillCaptureMode, =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_DT=
C_UINT16, _get_CaptureMode, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 _put_CaptureMode },=C2=A0

=3D&gt; to =3D&gt;<br></div></div><div>	{ N_(&quot;Still Capture Mode&quot;=
), =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &quot;capturemode&quot;, =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0PTP_DPC_StillCaptureMode, =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_CaptureMode, =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 _put_CaptureMode },<br></div>=
<div><br></div><div>static struct deviceproptableu16 capture_mode[] =3D { =
=3D&gt; to =3D&gt;<br></div><div>static struct deviceproptableu32 capture_m=
ode[] =3D {<br></div><div><br></div><div>GENERIC16TABLE(CaptureMode,capture=
_mode) =3D&gt; to =3D&gt;<br></div><div>GENERIC32TABLE(CaptureMode,capture_=
mode)<br></div><div><br></div><div>=3D=3D=3D</div><div><br></div><div>{ N_(=
&quot;Priority Mode&quot;),		&quot;prioritymode&quot;,		PTP_DPC_SONY_Priori=
tyMode, =C2=A0	 =C2=A0 =C2=A0PTP_VENDOR_SONY,	PTP_DTC_INT8, 	_get_Sony_Prio=
rityMode, =C2=A0 =C2=A0 	_put_Sony_PriorityMode }, =3D&gt; to =3D&gt;</div>=
<div>	{ N_(&quot;Priority Mode&quot;),		&quot;prioritymode&quot;,		PTP_DPC_=
SONY_PriorityMode, =C2=A0	 =C2=A0 =C2=A0PTP_VENDOR_SONY,	PTP_DTC_UINT8, 	_g=
et_Sony_PriorityMode, =C2=A0 =C2=A0 	_put_Sony_PriorityMode },<br></div><di=
v><br></div><div>static struct deviceproptablei8 sony_prioritymode[] =3D { =
=3D&gt; to =3D&gt;<br></div><div>static struct deviceproptableu8 sony_prior=
itymode[] =3D {<br></div><div><br></div><div>=3D=3D=3D</div><div><br></div>=
<div>Obviously, some additional device-specific definitions are needed here=
, because now it won&#39;t work anymore for the other Sony cameras. But I h=
aven&#39;t yet figured out how to target a specific Sony device in config.c=
.</div><div><br></div><div>Unfortunately, still the operations/properties b=
elow are missing. I guess there might be some more binary coding difference=
s for operations as well. Still some more work to do...</div><div><br></div=
><div>Autofocus(0xd2c1): error 2002 on query.<br>Capture(0xd2c2): error 200=
2 on query.<br>Property 0xd2c3: error 2002 on query.<br>Property 0xd2c4: er=
ror 2002 on query.<br>Still Image(0xd2c7): error 2002 on query.<br>Movie(0x=
d2c8): error 2002 on query.<br>Property 0xd2c9: error 2002 on query.<br>Nea=
r Far(0xd2d1): error 2002 on query.<br>Property 0xd2d2: error 2002 on query=
.<br>Property 0xd2d7: error 2002 on query.<br>Property 0xd2d8: error 2002 o=
n query.<br>Property 0xd2d9: error 2002 on query.<br>Property 0xd2da: error=
 2002 on query.<br>Property 0xd2db: error 2002 on query.<br>AF Area Positio=
n(0xd2dc): error 2002 on query.<br>Property 0xd2dd: error 2002 on query.<br=
>Property 0xd2df: error 2002 on query.<br>Property 0xd2e0: error 2002 on qu=
ery.<br>Property 0xd2e1: error 2002 on query.<br>Property 0xd2e2: error 200=
2 on query.<br>Property 0xd2e4: error 2002 on query.<br>Property 0xd2e5: er=
ror 2002 on query.<br>Property 0xd2e6: error 2002 on query.<br>Property 0xd=
2e7: error 2002 on query.<br>Property 0xd2e8: error 2002 on query.<br>Prope=
rty 0xd2e9: error 2002 on query.<br>Property 0xd2ea: error 2002 on query.<b=
r>Property 0xd2eb: error 2002 on query.<br>Property 0xd2f3: error 2002 on q=
uery.<br>Property 0xd302: error 2002 on query.<br>Property 0xd303: error 20=
02 on query.<br>Property 0xd305: error 2002 on query.<br>Property 0xd306: e=
rror 2002 on query.<br>Property 0xd304: error 2002 on query.<br>Property 0x=
d301: error 2002 on query.<br>Property 0xd300: error 2002 on query.<br>Prop=
erty 0xd308: error 2002 on query.<br>Property 0xd2f2: error 2002 on query.<=
br>Property 0xd309: error 2002 on query.<br>Property 0xd30a: error 2002 on =
query.<br>Property 0xd30b: error 2002 on query.<br>Still Image(0xd2c7): err=
or 2002 on query.<br>Property 0xd2cd: error 2002 on query.<br>Property 0xd2=
ce: error 2002 on query.<br>Property 0xd2cf: error 2002 on query.<br>Proper=
ty 0xd2d0: error 2002 on query.<br></div><div><br></div><div>Kind regards, =
Jeroen</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"=
gmail_attr">On Thu, Apr 4, 2024 at 5:40=E2=80=AFPM Marcus Meissner &lt;<a h=
ref=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<b=
r></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex=
;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I just committed code that tries to handle it more generically.<br>
<br>
commit 4ab78020b304ef3105d11701d70d8b785476fafa<br>
Author: Marcus Meissner &lt;<a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a>&gt;<br>
Date:=C2=A0 =C2=A0Thu Apr 4 17:35:06 2024 +0200<br>
<br>
=C2=A0 =C2=A0 try a workaround for newer Sonys that have two enums.<br>
<br>
<br>
It reads the next 16bit value, if its &lt; 0x200 (as it would be 0x5somethi=
ng or 0xDsomething)<br>
it assumes it has a secondary enum list and reads over that.<br>
<br>
Can you try this?<br>
<br>
Ciao, Marcus<br>
On Wed, Apr 03, 2024 at 09:44:29PM +0200, Jeroen Lichtenauer wrote:<br>
&gt; Hi Marcus,<br>
&gt; <br>
&gt; Thank you for your quick reply.<br>
&gt; After doing some debugging, I found out that the Sony A7S III includes=
 a<br>
&gt; second ENUM list for every property. The second one is either as long =
as<br>
&gt; the first list, or longer. It seems like the first list contains the<b=
r>
&gt; enabled options, and the second list contains all the possible options=
<br>
&gt; (some of which you might not be able to choose in the current state).<=
br>
&gt; <br>
&gt; in ptp2/ptp-pack.c<br>
&gt; static inline int ptp_unpack_Sony_DPD (PTPParams *params, unsigned cha=
r*<br>
&gt; data, PTPDevicePropDesc *dpd, unsigned int dpdlen, unsigned int *poffs=
et)<br>
&gt; <br>
&gt; After the current ENUM list extraction<br>
&gt; for (i=3D0;i&lt;N;i++) {<br>
&gt;=C2=A0 =C2=A0 ret =3D ptp_unpack_DPV (params, data, poffset, dpdlen,<br=
>
&gt; &amp;dpd-&gt;FORM.Enum.SupportedValue[i], dpd-&gt;DataType);<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0 /* Slightly different handling here. The HP PhotoS=
mart 120<br>
&gt;=C2=A0 =C2=A0 =C2=A0 * specifies an enumeration with N in wrong endian<=
br>
&gt;=C2=A0 =C2=A0 =C2=A0 * 00 01 instead of 01 00, so we count the enum jus=
t until the<br>
&gt;=C2=A0 =C2=A0 =C2=A0 * the end of the packet.<br>
&gt;=C2=A0 =C2=A0 =C2=A0 */<br>
&gt;=C2=A0 =C2=A0 =C2=A0 if (!ret) {<br>
&gt;=C2=A0 =C2=A0 =C2=A0 if (!i)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 goto outofmemory;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 dpd-&gt;FORM.Enum.NumberOfValues =3D i;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 }<br>
&gt; }<br>
&gt; <br>
&gt; I added some code that updates the offset to skip the second list:<br>
&gt; <br>
&gt; if(strcmp(params-&gt;deviceinfo.Model, &quot;ILCE-7SM3&quot;)=3D=3D0)<=
br>
&gt; {<br>
&gt;=C2=A0 =C2=A0 =C2=A0 int enum_value_len;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 switch (dpd-&gt;DataType) {<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_INT8:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 1;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_UINT8:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 1;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_INT16:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 2;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_UINT16:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 2;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_INT32:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 4;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_UINT32:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 4;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_INT64:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 8;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_UINT64:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 8;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_UINT128:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 16;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_INT128:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 16;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_AINT8:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 1;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_AUINT8:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 1;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_AUINT16:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 2;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_AINT16:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 2;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_AUINT32:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 4;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_AINT32:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 4;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_AUINT64:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 8;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_AINT64:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0enum_value_len =3D 8;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0case PTP_DTC_STR:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto outofmemory;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0default:<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0goto outofmemory;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 }<br>
&gt;=C2=A0 =C2=A0 =C2=A0 uint16_t N_all =3D dtoh16a(&amp;data[*poffset]);<b=
r>
&gt;=C2=A0 =C2=A0 =C2=A0 *poffset+=3Dsizeof(uint16_t);<br>
&gt;=C2=A0 =C2=A0 =C2=A0 *poffset +=3D enum_value_len*N_all;<br>
&gt; }<br>
&gt; <br>
&gt; The debug log is here<br>
&gt; <a href=3D"https://drive.usercontent.google.com/uc?id=3D1MEanNTniSpzv8=
xd82fZ_D9n72hZBrFwQ&amp;export=3Ddownload" rel=3D"noreferrer" target=3D"_bl=
ank">https://drive.usercontent.google.com/uc?id=3D1MEanNTniSpzv8xd82fZ_D9n7=
2hZBrFwQ&amp;export=3Ddownload</a><br>
&gt; Although I now finally get lots of properties (hundreds), it still mis=
ses<br>
&gt; some essential actions, such as image capture.<br>
&gt; Perhaps because these have different addresses for this camera?<br>
&gt; <br>
&gt; Kind regards, Jeroen<br>
&gt; <br>
&gt; On Wed, Apr 3, 2024 at 3:47=E2=80=AFPM Marcus Meissner &lt;<a href=3D"=
mailto:[email protected]" target=3D"_blank">[email protected]</a>&g=
t;<br>
&gt; wrote:<br>
&gt; <br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; Thanks for this report.<br>
&gt; &gt;<br>
&gt; &gt; it seems the binary format of this variable has changed, which le=
ds to<br>
&gt; &gt; this error.<br>
&gt; &gt;<br>
&gt; &gt; I will need to adjust the decoder :(<br>
&gt; &gt;<br>
&gt; &gt; You can short term perhaps add a ignore to the decoder, perhaps i=
t will<br>
&gt; &gt; help,<br>
&gt; &gt; except you cant use any config reads<br>
&gt; &gt;<br>
&gt; &gt; Ciao, Marcus<br>
&gt; &gt; On Wed, Apr 03, 2024 at 02:13:31PM +0200, Jeroen Lichtenauer wrot=
e:<br>
&gt; &gt;<br>
</blockquote></div>

--0000000000000387d80615489cad--


--===============0292742703671056052==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============0292742703671056052==
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

--===============0292742703671056052==--