User Tools

Site Tools


use_gphoto2_to_configure_dslr

Use gphoto2 to Configure DSLR

Jun 2017



We can control the settings on our DSLR, again what can be controlled will vary between models. To get a list of items that can (maybe) control, you can use this command.

gphoto2 --list-config

Here is the listing that I get from my Canon EOS 700D.

/main/actions/uilock
/main/actions/syncdatetime
/main/actions/autofocusdrive
/main/actions/manualfocusdrive
/main/actions/eoszoom
/main/actions/eoszoomposition
/main/actions/eosviewfinder
/main/actions/eosremoterelease
/main/settings/datetime
/main/settings/reviewtime
/main/settings/output
/main/settings/movierecordtarget
/main/settings/ownername
/main/settings/artist
/main/settings/copyright
/main/settings/customfuncex
/main/settings/autopoweroff
/main/settings/capturetarget
/main/settings/capture
/main/status/serialnumber
/main/status/manufacturer
/main/status/cameramodel
/main/status/deviceversion
/main/status/vendorextension
/main/status/model
/main/status/ptpversion
/main/status/batterylevel
/main/status/lensname
/main/status/eosserialnumber
/main/status/shuttercounter
/main/status/availableshots
/main/imgsettings/imageformat
/main/imgsettings/imageformatsd
/main/imgsettings/iso
/main/imgsettings/whitebalance
/main/imgsettings/colortemperature
/main/imgsettings/whitebalanceadjusta
/main/imgsettings/whitebalanceadjustb
/main/imgsettings/whitebalancexa
/main/imgsettings/whitebalancexb
/main/imgsettings/colorspace
/main/capturesettings/autoexposuremode
/main/capturesettings/drivemode
/main/capturesettings/picturestyle
/main/capturesettings/aperture
/main/capturesettings/shutterspeed
/main/capturesettings/bracketmode
/main/other/d402
/main/other/d407
/main/other/d406
/main/other/d303
/main/other/5001

So for example, in this list we can see a setting entitled /main/capturesettings/aperture which indicates we can control the aperture on this DSLR.

To see what the possible values for /main/capturesettings/aperture that gphoto2 supports, we can use the following syntax.

gphoto2 --get-config /main/capturesettings/aperture


The 700D DSLR I am using returns the following:

Label: Aperture
Type: RADIO
Current: 4.5
Choice: 0 4.5
Choice: 1 5.6
Choice: 2 6.7
Choice: 3 8
Choice: 4 9.5
Choice: 5 11
Choice: 6 13
Choice: 7 16
Choice: 8 19
Choice: 9 22

So we can see that the current aperture is 4.5 (probably due to the lens I am using) and we have a choice to select one of the others, lets try to set the aperture to F11.

We can set the aperture using either the absolute value (11) or the index next to the value (choice 5). Here is an example setting using the absolute value.

gphoto2 --set-config-value /main/capturesettings/aperture=11

If we check the aperture setting now, using the same command as before:

gphoto2 --get-config /main/capturesettings/aperture

Label: Aperture
Type: RADIO
Current: 11
Choice: 0 4.5
Choice: 1 5.6
Choice: 2 6.7
Choice: 3 8
Choice: 4 9.5
Choice: 5 11
Choice: 6 13
Choice: 7 16
Choice: 8 19
Choice: 9 22

We can see now that the Current: 11 means that we have set the aperture to F11.

use_gphoto2_to_configure_dslr.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1