Re: Adding properties for the Nikon Z8

Nick Hilton <[email protected]> Sat, 12 Jul 2025 20:45:47 -0700
Newsgroups gmane.comp.multimedia.gphoto.devel
Message-ID <CAHaJagAFRv2ka_cRTEHKiVZYP_2jBAJj8MT2bhJJidfhkLTUQw@mail.gmail.com>
--===============5954527884113017197==
Content-Type: multipart/alternative; boundary="0000000000008a5bf00639c761cd"

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

After a bit of debugging, I managed to get shutterspeed2 working with my
Nikon Z8!

https://github.com/weegreenblobbie/libgphoto2/compare/81904a36a2a64e1f60051=
99ef9193db70e1fc444...8ccf7153f4e95e71c17cd83e19ddbb4e46353cff

It turned out to be a 32-bit property, unlike the 8bit properties like the
other nikon props.  I'd like to add some documentation steps somewhere too
for how I figured this out.  Mostly a process of producing and reading the
debug log carefully:

rm -f my-logfile.txt; env LANG=3DC bin/gphoto2 --debug
--debug-logfile=3Dmy-logfile.txt --list-all-config

I'll see about adding support for a few more nikon specific properties
and/or values for the Z8 to be on par with the Z7.

-Nick

gphoto2 --get-config shutterspeed2
Label: Shutter Speed 2

Readonly: 0
Type: RADIO
Current: 1/1000
Choice: 0 1/6400
Choice: 1 1/4000
Choice: 2 1/3200
Choice: 3 1/2500
Choice: 4 1/2000
Choice: 5 1/1600
Choice: 6 1/1250
Choice: 7 1/1000
Choice: 8 1/800
Choice: 9 1/640
Choice: 10 1/500
Choice: 11 1/400
Choice: 12 1/320
Choice: 13 1/250
Choice: 14 1/200
Choice: 15 1/160
Choice: 16 1/125
Choice: 17 1/100
Choice: 18 1/80
Choice: 19 1/60
Choice: 20 1/50
Choice: 21 1/40
Choice: 22 1/30
Choice: 23 1/25
Choice: 24 1/20
Choice: 25 1/15
Choice: 26 1/13
Choice: 27 1/10
Choice: 28 1/8
Choice: 29 1/6
Choice: 30 1/5
Choice: 31 1/4
Choice: 32 1/3
Choice: 33 1/2.5
Choice: 34 1/2
Choice: 35 1/1.6
Choice: 36 1/1.3
Choice: 37 1
Choice: 38 1.3
Choice: 39 1.6
Choice: 40 2
Choice: 41 2.5
Choice: 42 3
Choice: 43 4
Choice: 44 5
Choice: 45 6
Choice: 46 8
Choice: 47 10
Choice: 48 13
Choice: 49 15
Choice: 50 20
Choice: 51 25
Choice: 52 30
Choice: 53 60
Choice: 54 90
Choice: 55 120
Choice: 56 180
Choice: 57 240
Choice: 58 300
Choice: 59 480
Choice: 60 600
Choice: 61 720
Choice: 62 900
Choice: 63 Bulb
Choice: 64 Time
END

On Sun, Jul 6, 2025 at 3:25=E2=80=AFPM Nick Hilton <weegreenblobbie2@gmail.=
com>
wrote:

> Hello!
>
> I'm new to libgphoto2 development.  I'm interested in adding shutterspeed=
2
> for the Nikon Z8, I have a Z7 mark I, which does support shutterspeed2.
>
> Looking at the code here
> <https://github.com/gphoto/libgphoto2/blob/81904a36a2a64e1f6005199ef9193d=
b70e1fc444/camlibs/ptp2/config.c#L11886>
> for the Z7, looks like it's using nikon_z6_capture_settings, so is the Z8=
.
> I've tried adding a custom nikon_z8_capture_settings menu item here
> <https://github.com/gphoto/libgphoto2/compare/master...weegreenblobbie:li=
bgphoto2:dev/nikon-z8-shutterspeed2>.
> I've built the lib and the gphoto2 cli utility, verified it's linking wit=
h
> my local build:
>
> ldd gphoto2 | grep libgphoto
> libgphoto2.so.6 =3D>
> /home/nhilton/development/pycontrol/external/lib/libgphoto2.so.6
> (0x00007275d35f8000)
> libgphoto2_port.so.12 =3D>
> /home/nhilton/development/pycontrol/external/lib/libgphoto2_port.so.12
> (0x00007275d35e8000)
>
> However I don't see any indication my updates are having any impact.
>
> I had looked at previous commit changes sets that added various nikon
> cameras, and it looked similar to what I did, however it's not working.
> Not really sure how to proceed.
>
> Is there any documentation on how config.c is organized that I missed?  I
> own the following camera and can test the changes necessary: z6ii, z6iii,
> z7, z8.
>
> Thank you!
> Nick
>
>
>

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

<div dir=3D"ltr">After a bit of debugging, I managed to get shutterspeed2 w=
orking with my Nikon Z8!<div><br><div><div><a href=3D"https://github.com/we=
egreenblobbie/libgphoto2/compare/81904a36a2a64e1f6005199ef9193db70e1fc444..=
.8ccf7153f4e95e71c17cd83e19ddbb4e46353cff">https://github.com/weegreenblobb=
ie/libgphoto2/compare/81904a36a2a64e1f6005199ef9193db70e1fc444...8ccf7153f4=
e95e71c17cd83e19ddbb4e46353cff</a></div><div><br></div><div>It turned out t=
o be a 32-bit property,=C2=A0unlike=C2=A0the 8bit=C2=A0properties like the =
other nikon props.=C2=A0 I&#39;d like to add some documentation steps=C2=A0=
somewhere=C2=A0too for how I figured this out.=C2=A0 Mostly a process of pr=
oducing and reading the debug log carefully:<div><br></div><div>rm -f my-lo=
gfile.txt; env LANG=3DC bin/gphoto2 --debug --debug-logfile=3Dmy-logfile.tx=
t --list-all-config<br><div><div></div></div></div></div><div><br></div><di=
v>I&#39;ll see about adding support for a few more nikon specific propertie=
s and/or values for the Z8 to be on par with the=C2=A0Z7.</div><div><br></d=
iv><div>-Nick</div><div><br></div><div>gphoto2 --get-config shutterspeed2 <=
br>Label: Shutter Speed 2 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <=
br>Readonly: 0<br>Type: RADIO<br>Current: 1/1000<br>Choice: 0 1/6400<br>Cho=
ice: 1 1/4000<br>Choice: 2 1/3200<br>Choice: 3 1/2500<br>Choice: 4 1/2000<b=
r>Choice: 5 1/1600<br>Choice: 6 1/1250<br>Choice: 7 1/1000<br>Choice: 8 1/8=
00<br>Choice: 9 1/640<br>Choice: 10 1/500<br>Choice: 11 1/400<br>Choice: 12=
 1/320<br>Choice: 13 1/250<br>Choice: 14 1/200<br>Choice: 15 1/160<br>Choic=
e: 16 1/125<br>Choice: 17 1/100<br>Choice: 18 1/80<br>Choice: 19 1/60<br>Ch=
oice: 20 1/50<br>Choice: 21 1/40<br>Choice: 22 1/30<br>Choice: 23 1/25<br>C=
hoice: 24 1/20<br>Choice: 25 1/15<br>Choice: 26 1/13<br>Choice: 27 1/10<br>=
Choice: 28 1/8<br>Choice: 29 1/6<br>Choice: 30 1/5<br>Choice: 31 1/4<br>Cho=
ice: 32 1/3<br>Choice: 33 1/2.5<br>Choice: 34 1/2<br>Choice: 35 1/1.6<br>Ch=
oice: 36 1/1.3<br>Choice: 37 1<br>Choice: 38 1.3<br>Choice: 39 1.6<br>Choic=
e: 40 2<br>Choice: 41 2.5<br>Choice: 42 3<br>Choice: 43 4<br>Choice: 44 5<b=
r>Choice: 45 6<br>Choice: 46 8<br>Choice: 47 10<br>Choice: 48 13<br>Choice:=
 49 15<br>Choice: 50 20<br>Choice: 51 25<br>Choice: 52 30<br>Choice: 53 60<=
br>Choice: 54 90<br>Choice: 55 120<br>Choice: 56 180<br>Choice: 57 240<br>C=
hoice: 58 300<br>Choice: 59 480<br>Choice: 60 600<br>Choice: 61 720<br>Choi=
ce: 62 900<br>Choice: 63 Bulb<br>Choice: 64 Time<br>END</div></div></div></=
div><br><div class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" c=
lass=3D"gmail_attr">On Sun, Jul 6, 2025 at 3:25=E2=80=AFPM Nick Hilton &lt;=
<a href=3D"mailto:[email protected]">[email protected]</a=
>&gt; 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-left:1ex"><di=
v dir=3D"ltr">Hello!<div><br></div><div>I&#39;m new to libgphoto2 developme=
nt.=C2=A0 I&#39;m interested in adding shutterspeed2 for the Nikon Z8, I ha=
ve a Z7 mark I, which does support shutterspeed2.</div><div><br></div><div>=
Looking at the <a href=3D"https://github.com/gphoto/libgphoto2/blob/81904a3=
6a2a64e1f6005199ef9193db70e1fc444/camlibs/ptp2/config.c#L11886" target=3D"_=
blank">code here</a> for the Z7, looks like it&#39;s using=C2=A0nikon_z6_ca=
pture_settings, so is the Z8.=C2=A0 I&#39;ve tried adding a custom nikon_z8=
_capture_settings menu=C2=A0<a href=3D"https://github.com/gphoto/libgphoto2=
/compare/master...weegreenblobbie:libgphoto2:dev/nikon-z8-shutterspeed2" ta=
rget=3D"_blank">item here</a>.=C2=A0 I&#39;ve built the lib and the gphoto2=
 cli utility, verified it&#39;s linking with my local build:<br><br>ldd gph=
oto2 | grep libgphoto<br>	libgphoto2.so.6 =3D&gt; /home/nhilton/development=
/pycontrol/external/lib/libgphoto2.so.6 (0x00007275d35f8000)<br>	libgphoto2=
_port.so.12 =3D&gt; /home/nhilton/development/pycontrol/external/lib/libgph=
oto2_port.so.12 (0x00007275d35e8000)<br></div><div><br></div><div>However I=
 don&#39;t see any indication my updates are having any impact.</div><div><=
br></div><div>I had looked at previous commit changes sets that added vario=
us nikon cameras, and it looked similar to what I did, however it&#39;s not=
 working.=C2=A0 Not really sure how to proceed.</div><div><br></div><div>Is=
 there any documentation on how config.c is organized that I missed?=C2=A0 =
I own the following camera and can test the changes necessary: z6ii, z6iii,=
 z7, z8.</div><div><br></div><div>Thank you!</div><div>Nick</div><div><br><=
/div><div><br></div></div>
</blockquote></div>

--0000000000008a5bf00639c761cd--


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


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

--===============5954527884113017197==--