0

I'm trying to configure the shutter speed, aperture, and iso for my Sony A7RII, but I can't figure out how to access these settings in the code and can't find where this is referenced in the documentation. This camera model is listed as one of the models that can be remotely controlled.

I’m using the MTP mode, and I’ve tried a USB->microUSB cable and a USB-C->microUSB, but the results are the same for both.

I'm currently getting this error: gphoto2.GPhoto2Error: [-2] Bad parameters

Here is the code for configuring the settings:

`def configure_camera(camera, shutter_speed, aperture, iso):
    config = camera.get_config()

    # Set shutter speed
    config.get_child_by_name('shutterspeed').set_value(shutter_speed)

    # Set aperture
    config.get_child_by_name('aperture').set_value(aperture)

    # Set ISO
    config.get_child_by_name('iso').set_value(iso)

    camera.set_config(config)`

I tried running gphoto2 --list-config, but it only returns this:

/main/actions/opcode /main/status/serialnumber /main/status/manufacturer /main/status/cameramodel /main/status/deviceversion /main/status/vendorextension /main/status/Battery Level /main/other/5001 /main/other/d402 /main/other/d406 /main/other/d407 /main/other/d303

Then I tried gphoto2 --list-all-config, and it returns this:

/main/actions/opcode Label: PTP Opcode Readonly: 0 Type: TEXT Current: 0x1001,0xparam1,0xparam2 END /main/status/serialnumber Label: Serial Number Readonly: 1 Type: TEXT Current: 00000000000000003282801003404569 END /main/status/manufacturer Label: Camera Manufacturer Readonly: 1 Type: TEXT Current: Sony Corporation END /main/status/cameramodel Label: Camera Model Readonly: 1 Type: TEXT Current: ILCE-7RM2 END /main/status/deviceversion Label: Device Version Readonly: 1 Type: TEXT Current: 4.0 END /main/status/vendorextension Label: Vendor Extension Readonly: 1 Type: TEXT Current: END /main/status/Battery Level Label: Battery Level Readonly: 1 Type: TEXT Current: 1% END /main/other/5001 Label: Battery Level Readonly: 1 Type: MENU Current: 1 Choice: 0 0 Choice: 1 1 Choice: 2 2 Choice: 3 3 Choice: 4 4 Choice: 5 5 Choice: 6 6 Choice: 7 7 Choice: 8 8 Choice: 9 9 Choice: 10 10 Choice: 11 11 Choice: 12 12 Choice: 13 13 Choice: 14 14 Choice: 15 15 Choice: 16 16 Choice: 17 17 Choice: 18 18 Choice: 19 19 Choice: 20 20 Choice: 21 21 Choice: 22 22 Choice: 23 23 Choice: 24 24 Choice: 25 25 Choice: 26 26 Choice: 27 27 Choice: 28 28 Choice: 29 29 Choice: 30 30 Choice: 31 31 Choice: 32 32 Choice: 33 33 Choice: 34 34 Choice: 35 35 Choice: 36 36 Choice: 37 37 Choice: 38 38 Choice: 39 39 Choice: 40 40 Choice: 41 41 Choice: 42 42 Choice: 43 43 Choice: 44 44 Choice: 45 45 Choice: 46 46 Choice: 47 47 Choice: 48 48 Choice: 49 49 Choice: 50 50 Choice: 51 51 Choice: 52 52 Choice: 53 53 Choice: 54 54 Choice: 55 55 Choice: 56 56 Choice: 57 57 Choice: 58 58 Choice: 59 59 Choice: 60 60 Choice: 61 100 END /main/other/d402 Label: PTP Property 0xd402 Readonly: 1 Type: TEXT Current: ILCE-7RM2 END /main/other/d406 Label: PTP Property 0xd406 Readonly: 0 Type: TEXT Current: END /main/other/d407 Label: PTP Property 0xd407 Readonly: 1 Type: TEXT Current: 1 END /main/other/d303 Label: PTP Property 0xd303 Readonly: 1 Type: TEXT Current: 1 END

  • The `gphoto2 --list-config` output shows your camera doesn't have `shutterspeed`, `aperture`, or `iso`, so it's no surprise you can't set them. – Jim Easterbrook Aug 28 '23 at 15:53

0 Answers0