gphoto / gphoto2

The gphoto2 commandline tool for accessing and controlling digital cameras.
GNU General Public License v2.0
720 stars 116 forks source link

Canon SX540 HS attempting to use zoom fails #501

Open getz53 opened 2 years ago

getz53 commented 2 years ago

Describe the bug Using the Kali command line, issuing the command gphoto2 --set-config Zoom=10 appears to fail. The camera does not attempt to zoom and hangs for about one minute before the command line cursor reappears. After this the camera does not appear to respond to further commands.

Name the camera Model Port

Canon PowerShot SX540 HS usb:002,004

libgphoto2 and gphoto2 version gphoto2 2.5.27 This version of gphoto2 is using the following software versions and options: gphoto2 2.5.27 gcc, popt(m), exif, cdk, aa, jpeg, readline libgphoto2 2.5.27 standard camlibs, gcc, ltdl, EXIF libgphoto2_port 0.12.0 iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, EXIF, USB, serial without locking

To Reproduce On the command line issue the following. Fails every time. I do a reboot and turn the camera off then on after each failure. gphoto2 --set-config Zoom=10

Attached below are (1) a more detailed bug description file and (2) a logfile from issuing the command env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --set-config Zoom=10

SX540HS_zoom_bug_details.txt

my-logfile.txt

msmeissn commented 2 years ago

can you check libgphoto2 2.5.28 or 2.5.29, as I changed the zoom option handling?

getz53 commented 2 years ago

I would be happy to do this, but since I am new to linux could you tell me how?

Do I do something like this?

sudo apt update sudo apt install libgphoto2-2.5.29

Thank you.

Bill Goetzinger

Life is good!

On Mon, Apr 11, 2022 at 10:16 AM Marcus Meissner @.***> wrote:

can you check libgphoto2 2.5.28 or 2.5.29, as I changed the zoom option handling?

— Reply to this email directly, view it on GitHub https://github.com/gphoto/gphoto2/issues/501#issuecomment-1095183255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHNF2RDJLZVXALJ4S7GWBLVEQ65ZANCNFSM5TBN7N6Q . You are receiving this because you authored the thread.Message ID: @.***>

getz53 commented 2 years ago

I have downloaded libgphoto2-2.5.29.tar.bz2 and extracted it to my user directory. (That is, libgphoto2-2.5.29 is now a directory in my user directory.)

Also, I have found the libgphoto2 installation instructions at github.com/gphoto/libgphoto2/blob/master/INSTALL. I have performed the following in a terminal: $ cd libgphoto2-2.5.29 $ ./configure --prefix=/usr/local

The latter command ended with the following: configure: error: libgphoto2 requires libltdl (a part of libtool)

Please make sure that the proper development package is installed (may be called libltdl-dev, libtool-ltdl-devel, libltdl, etc.) and if the autodetection fails, that the LTDLINCL and LIBLTDL variables are set properly on the configure command line.

I am currently investigating this.

getz53 commented 2 years ago

I fixed the libltdl error using: $ sudo apt install libtool

I then ran the following commands. They appear to have run successfully. $ ./configure --prefix=/usr/local $ make $ sudo make install

After all of this "gphoto2 --version" still shows libgphoto2 to be version 2.5.27, so I must still be missing something.

I am still working on this.

getz53 commented 2 years ago

Issue #412 at https://github.com/gphoto/libgphoto2/issues/412 describes a similar problem, and you answered it as follows:

"you need to pass --prefix=/usr and --libdir=/correctlibrarydirectory here (the correctlibrarydirectory depends on your distribution)"

However, I cannot tell which command is supposed to be submitted with the --prefix and --libdir options. I also do not know what the correct library directory would be for Kali linux.

Does your answer to #412 apply to my situation? If so, which command should get the --prefix and --libdir options and what library directory should be specified? Thank you.

getz53 commented 2 years ago

Additional info: My libgphoto2 files appear to be installed in /usr/local/lib

$ ls -l
total 596 drwxr-xr-x 3 root root 4096 Apr 13 10:34 libgphoto2 -rwxr-xr-x 1 root root 980 Apr 13 10:34 libgphoto2.la drwxr-xr-x 3 root root 4096 Apr 13 10:34 libgphoto2_port -rwxr-xr-x 1 root root 976 Apr 13 10:34 libgphoto2_port.la lrwxrwxrwx 1 root root 25 Apr 13 10:34 libgphoto2_port.so -> libgphoto2_port.so.12.0.0 lrwxrwxrwx 1 root root 25 Apr 13 10:34 libgphoto2_port.so.12 -> libgphoto2_port.so.12.0.0 -rwxr-xr-x 1 root root 127016 Apr 13 10:34 libgphoto2_port.so.12.0.0 lrwxrwxrwx 1 root root 19 Apr 13 10:34 libgphoto2.so -> libgphoto2.so.6.2.0 lrwxrwxrwx 1 root root 19 Apr 13 10:34 libgphoto2.so.6 -> libgphoto2.so.6.2.0 -rwxr-xr-x 1 root root 438680 Apr 13 10:34 libgphoto2.so.6.2.0

getz53 commented 2 years ago

I uninstalled gphoto2 and went through the process compiled the new libgphoto2 again. Now "gphoto2 --version" gives

gphoto2 2.5.27 gcc, popt(m), exif, cdk, aa, jpeg, readline libgphoto2 2.5.29 standard camlibs (SKIPPING docupen lumix), gcc, no ltdl, no EXIF libgphoto2_port 0.12.0 iolibs: disk ptpip serial, gcc, no ltdl, no EXIF, no USB, serial without locking

I will now try to re-create the problem for which this issue was written.

getz53 commented 2 years ago

My camera is on but is not detected by "gphoto2 --auto-detect".

No USB devices are shown by "gphoto2 --list-ports". Devices found: 7 Path Description

ptpip: PTP/IP Connection
ip: IP Connection
serial:/dev/ttyS0 Serial Port 0
serial:/dev/ttyS1 Serial Port 1
serial:/dev/ttyS2 Serial Port 2
serial:/dev/ttyS3 Serial Port 3
serial: Serial Port Device

My camera is shown by "lsusb". Bus 002 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver Bus 002 Device 007: ID 04a9:32be Canon, Inc. Canon Digital Camera <====== Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 004: ID 04f2:b1d6 Chicony Electronics Co., Ltd CNF9055 Toshiba Webcam Bus 001 Device 003: ID 0bda:0138 Realtek Semiconductor Corp. RTS5138 Card Reader Controller Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

getz53 commented 2 years ago

OK, purged gphoto2 again, installed libusb-1.0-0-dev, installed libusb-dev, ran configure, ran make, ran sudo make install, and installed gphoto2.

Now gphoto2 sees USB ports and my camera.

I am now going to try to recreate the original failure.

getz53 commented 2 years ago

OK, purged gphoto2 again, installed libusb-1.0-0-dev, installed libusb-dev, ran configure, ran make, ran sudo make install, and installed gphoto2.

Now gphoto2 sees USB ports and my camera.

I have recreated the original failure using the new libgphoto2. Attached is a short description of how the failure was created and the resulting logfile.

SX540HS_zoom_bug_details_Apr132022.txt

my-logfile_Apr132022.txt .

getz53 commented 2 years ago

Has any progress been made on this issue? Is there more information that I can provide? Thank you.

getz53 commented 2 years ago

I am still interested in a fix for this problem. Thank you.

msmeissn commented 2 years ago

i took a look, its hard to say ... the setting reports ok, but later hangs with the next operation..

can you try a bit waiting after doing it:

gphoto2 --set-config Zoom=10 --wait-event=5s

also can you try different values (like say between 0 and up to 200? )

msmeissn commented 2 years ago

FWIW I am not confident zooming works at all on the new Powershots.

cstaton-ftlg commented 1 year ago

I can't get zoom to work on Canon PowerShot G7x MkIII

This: gphoto2 --set-config Zoom=10 --wait-event=5s --trigger-capture --wait-event-and-download=2s

immediately prints this:

*** Error ***              
The property 'Zoom' / 0xd055 was not set (0x2019: PTP Device Busy).

*** Error ***              
Failed to set new configuration value 10 for configuration entry Zoom.

NOTE: The lens cover is closed, lens retracted (it only ever opens when --trigger-capture is sent).

Then 5 seconds later, lens opens, goes to default zoom position, quickly snaps a picture, then lens retracts and closes and this prints:

UNKNOWN PTP Property d116 changed
UNKNOWN PTP Property d105 changed
UNKNOWN PTP Property d138 changed
UNKNOWN PTP Property d102 changed
UNKNOWN PTP Property d101 changed
UNKNOWN PTP Property d103 changed
UNKNOWN PTP Property d106 changed
UNKNOWN PTP Property d108 changed
UNKNOWN PTP Property d107 changed
UNKNOWN PTP Property d109 changed
UNKNOWN PTP Property d11b changed
UNKNOWN PTP Property d104 changed
UNKNOWN PTP Property d10c changed
UNKNOWN PTP Property d10b changed
UNKNOWN PTP Property d10e changed
UNKNOWN PTP Property d10d changed
UNKNOWN PTP Property d1d9 changed
UNKNOWN PTP Property d1d5 changed
UNKNOWN PTP Property d1c1 changed
UNKNOWN PTP Property d10f changed
UNKNOWN PTP Property d114 changed
UNKNOWN PTP Property d1b7 changed
UNKNOWN PTP Property d110 changed
UNKNOWN PTP Property d157 changed
UNKNOWN PTP Property d158 changed
UNKNOWN PTP Property d159 changed
UNKNOWN PTP Property d15a changed
UNKNOWN PTP Property d15b changed
UNKNOWN PTP Property d15c changed
UNKNOWN PTP Property d15d changed
UNKNOWN PTP Property d15e changed
UNKNOWN PTP Property d163 changed
UNKNOWN PTP Property d164 changed
UNKNOWN PTP Property d165 changed
UNKNOWN PTP Property d1b1 changed
UNKNOWN PTP Property d1bc changed
UNKNOWN PTP Property d1b2 changed
UNKNOWN PTP Property d1b3 changed
UNKNOWN PTP Property d1b4 changed
UNKNOWN PTP Property d1b6 changed
UNKNOWN PTP Property d1ab changed
UNKNOWN PTP Property d1b0 changed
UNKNOWN PTP Property d10a changed
UNKNOWN PTP Property d1a8 changed
UNKNOWN PTP Property d198 changed
UNKNOWN PTP Property d1dd changed
UNKNOWN PTP Property d1a1 changed
UNKNOWN PTP Property d115 changed
UNKNOWN PTP Property d1a4 changed
UNKNOWN PTP Property d1b8 changed
UNKNOWN PTP Property d1ba changed
UNKNOWN PTP Property d1c9 changed
UNKNOWN PTP Property d17a changed
UNKNOWN PTP Property d1cd changed
UNKNOWN PTP Property d20d changed
UNKNOWN PTP Property d1c5 changed
UNKNOWN PTP Property d1d4 changed
UNKNOWN PTP Property d1c2 changed
UNKNOWN PTP Property d1bd changed
UNKNOWN PTP Property d194 changed
UNKNOWN PTP Property d195 changed
UNKNOWN PTP Property d196 changed
UNKNOWN PTP Property d197 changed
UNKNOWN PTP Property d13c changed
UNKNOWN PTP Property d13d changed
UNKNOWN PTP Property d179 changed
UNKNOWN PTP Property d17b changed
UNKNOWN PTP Property d177 changed
UNKNOWN PTP Property d176 changed
UNKNOWN PTP Property d175 changed
UNKNOWN PTP Property d137 changed
UNKNOWN PTP Property d178 changed
UNKNOWN PTP Property d121 changed
UNKNOWN PTP Property d120 changed
UNKNOWN PTP Property d122 changed
UNKNOWN PTP Property d133 changed
UNKNOWN PTP Property d131 changed
UNKNOWN PTP Property d132 changed
UNKNOWN PTP Property d130 changed
UNKNOWN PTP Property d11c changed
UNKNOWN PTP Property d113 changed
UNKNOWN PTP Property d1a7 changed
UNKNOWN PTP Property d112 changed
UNKNOWN PTP Property d111 changed
UNKNOWN PTP Property d1d8 changed
UNKNOWN PTP Property d1da changed
UNKNOWN PTP Property d17e changed
UNKNOWN PTP Property d17c changed
UNKNOWN PTP Property d11f changed
UNKNOWN PTP Property d11f changed
UNKNOWN PTP Property d11e changed
UNKNOWN PTP Property d1aa changed
UNKNOWN PTP Property d139 changed
UNKNOWN PTP Property d1c3 changed
UNKNOWN PTP Property d1bf changed
UNKNOWN PTP Property d11d changed
UNKNOWN PTP Property d1c7 changed
UNKNOWN PTP Property d1c4 changed
UNKNOWN PTP Property d1cb changed
UNKNOWN PTP Property d056 changed
UNKNOWN PTP Property d056 changed
UNKNOWN PTP Property d1c0 changed
UNKNOWN PTP Property d136 changed
UNKNOWN PTP Property d134 changed
UNKNOWN PTP Property d135 changed
UNKNOWN PTP Property d140 changed
UNKNOWN PTP Property d141 changed
UNKNOWN PTP Property d142 changed
UNKNOWN PTP Property d143 changed
UNKNOWN PTP Property d144 changed
UNKNOWN PTP Property d14a changed
UNKNOWN PTP Property d149 changed
UNKNOWN PTP Property d13e changed
UNKNOWN PTP Property d19a changed
UNKNOWN PTP Property d13b changed
UNKNOWN PTP Property d1a3 changed
UNKNOWN PTP Property d19f changed
UNKNOWN PTP Property d124 changed
UNKNOWN PTP Property d167 changed
UNKNOWN PTP Property d1c6 changed
UNKNOWN PTP Property d12d changed
UNKNOWN PTP Property d12c changed
UNKNOWN PTP Property d127 changed
UNKNOWN PTP Property d1a0 changed
UNKNOWN PTP Property d1a0 changed
UNKNOWN PTP Property d1a0 changed
UNKNOWN PTP Property d1a0 changed
UNKNOWN PTP Property d1a0 changed
UNKNOWN PTP Property d1a0 changed
UNKNOWN PTP Property d199 changed
UNKNOWN PTP Property d166 changed
UNKNOWN PTP Property 0000 changed
UNKNOWN PTP Property d208 changed
UNKNOWN PTP Property 0000 changed
UNKNOWN PTP Property 0000 changed
UNKNOWN PTP Property d114 changed
UNKNOWN PTP Property d02b changed
UNKNOWN PTP Property d20b changed
UNKNOWN PTP Property d128 changed
UNKNOWN PTP Property d055 changed
UNKNOWN PTP Property d17d changed
UNKNOWN PTP Property d125 changed
UNKNOWN PTP Property d209 changed
UNKNOWN CTGInfoCheckComplete 0x00020001
UNKNOWN unhandled EOS event PowerZoomInfoChanged (size 12)
UNKNOWN Button 21
UNKNOWN PTP Property d102 changed
UNKNOWN PTP Property d101 changed
UNKNOWN PTP Property d103 changed
UNKNOWN OLCInfo event 0x0010 content 04000000
UNKNOWN OLCInfo event 0x0020 content 000000000000
UNKNOWN OLCInfo exposure indicator 0,0,0.0 (00000000)
UNKNOWN OLCInfo event 0x0080 content 00000000
UNKNOWN Focus Info 000000000000
UNKNOWN Focus Mask 00000000000000
UNKNOWN OLCInfo event 0x0400 content 00000000000000
UNKNOWN OLCInfo event 0x0800 content 0000000000000000
UNKNOWN OLCInfo event 0x1000 content 00
UNKNOWN OLCInfo event mask=1fff
UNKNOWN PTP Property d115 changed
UNKNOWN PTP Property d1d0 changed
UNKNOWN PTP Property d1d1 changed
UNKNOWN PTP Property d1af changed
UNKNOWN PTP Property d116 changed
UNKNOWN PTP Property d105 changed
UNKNOWN PTP Property d138 changed
UNKNOWN PTP Property d102 changed
UNKNOWN PTP Property d101 changed
UNKNOWN PTP Property d103 changed
UNKNOWN PTP Property d106 changed
UNKNOWN PTP Property d108 changed
UNKNOWN PTP Property d107 changed
UNKNOWN PTP Property d109 changed
UNKNOWN PTP Property d11b changed
UNKNOWN PTP Property d104 changed
UNKNOWN PTP Property d10c changed
UNKNOWN PTP Property d10b changed
UNKNOWN PTP Property d10e changed
UNKNOWN PTP Property d10d changed
UNKNOWN PTP Property d1d9 changed
UNKNOWN PTP Property d1d5 changed
UNKNOWN PTP Property d1c1 changed
UNKNOWN PTP Property d10f changed
UNKNOWN PTP Property d114 changed
UNKNOWN PTP Property d1b7 changed
UNKNOWN PTP Property d110 changed
UNKNOWN PTP Property d157 changed
UNKNOWN PTP Property d158 changed
UNKNOWN PTP Property d159 changed
UNKNOWN PTP Property d15a changed
UNKNOWN PTP Property d15b changed
UNKNOWN PTP Property d15c changed
UNKNOWN PTP Property d15d changed
UNKNOWN PTP Property d15e changed
UNKNOWN PTP Property d163 changed
UNKNOWN PTP Property d164 changed
UNKNOWN PTP Property d165 changed
UNKNOWN PTP Property d1b1 changed
UNKNOWN PTP Property d1bc changed
UNKNOWN PTP Property d1b2 changed
UNKNOWN PTP Property d1b3 changed
UNKNOWN PTP Property d1b4 changed
UNKNOWN PTP Property d1b6 changed
UNKNOWN PTP Property d1ab changed
UNKNOWN PTP Property d1b0 changed
UNKNOWN PTP Property d10a changed
UNKNOWN PTP Property d1a8 changed
UNKNOWN PTP Property d198 changed
UNKNOWN PTP Property d1dd changed
UNKNOWN PTP Property d1a1 changed
UNKNOWN PTP Property d115 changed
UNKNOWN PTP Property d1a4 changed
UNKNOWN PTP Property d1b8 changed
UNKNOWN PTP Property d1ba changed
UNKNOWN PTP Property d1c9 changed
UNKNOWN PTP Property d17a changed
UNKNOWN PTP Property d1cd changed
UNKNOWN PTP Property d20d changed
UNKNOWN PTP Property d1c5 changed
UNKNOWN PTP Property d1d4 changed
UNKNOWN PTP Property d1c2 changed
UNKNOWN PTP Property d1bd changed
UNKNOWN PTP Property d194 changed
UNKNOWN PTP Property d195 changed
UNKNOWN PTP Property d196 changed
UNKNOWN PTP Property d197 changed
UNKNOWN PTP Property d13c changed
UNKNOWN PTP Property d13d changed
UNKNOWN PTP Property d179 changed
UNKNOWN PTP Property d17b changed
UNKNOWN PTP Property d177 changed
UNKNOWN PTP Property d176 changed
UNKNOWN PTP Property d175 changed
UNKNOWN PTP Property d137 changed
UNKNOWN PTP Property d178 changed
UNKNOWN PTP Property d121 changed
UNKNOWN PTP Property d120 changed
UNKNOWN PTP Property d122 changed
UNKNOWN PTP Property d133 changed
UNKNOWN PTP Property d131 changed
UNKNOWN PTP Property d132 changed
UNKNOWN PTP Property d130 changed
UNKNOWN PTP Property d11c changed
UNKNOWN PTP Property d113 changed
UNKNOWN PTP Property d1a7 changed
UNKNOWN PTP Property d112 changed
UNKNOWN PTP Property d111 changed
UNKNOWN PTP Property d1d8 changed
UNKNOWN PTP Property d1da changed
UNKNOWN PTP Property d17e changed
UNKNOWN PTP Property d17c changed
UNKNOWN PTP Property d11f changed
UNKNOWN PTP Property d11f changed
UNKNOWN PTP Property d11e changed
UNKNOWN PTP Property d1aa changed
UNKNOWN PTP Property d139 changed
UNKNOWN PTP Property d1c3 changed
UNKNOWN PTP Property d1bf changed
UNKNOWN PTP Property d11d changed
UNKNOWN PTP Property d1c7 changed
UNKNOWN PTP Property d1c4 changed
UNKNOWN PTP Property d1cb changed
UNKNOWN PTP Property d056 changed
UNKNOWN PTP Property d056 changed
UNKNOWN PTP Property d1c0 changed
UNKNOWN PTP Property d136 changed
UNKNOWN PTP Property d134 changed
UNKNOWN PTP Property d135 changed
UNKNOWN PTP Property d140 changed
UNKNOWN PTP Property d141 changed
UNKNOWN PTP Property d142 changed
UNKNOWN PTP Property d143 changed
UNKNOWN PTP Property d144 changed
UNKNOWN PTP Property d14a changed
UNKNOWN PTP Property d149 changed
UNKNOWN PTP Property d13e changed
UNKNOWN PTP Property d19a changed
UNKNOWN PTP Property d13b changed
UNKNOWN PTP Property d1a3 changed
UNKNOWN PTP Property d19f changed
UNKNOWN PTP Property d124 changed
UNKNOWN PTP Property d167 changed
UNKNOWN PTP Property d1c6 changed
UNKNOWN PTP Property d12d changed
UNKNOWN PTP Property d12c changed
UNKNOWN PTP Property d127 changed
UNKNOWN PTP Property d1a0 changed
UNKNOWN PTP Property d1a0 changed
UNKNOWN PTP Property d1a0 changed
UNKNOWN PTP Property d1a0 changed
UNKNOWN PTP Property d1a0 changed
UNKNOWN PTP Property d1a0 changed
UNKNOWN PTP Property d199 changed
UNKNOWN PTP Property d166 changed
UNKNOWN PTP Property 0000 changed
UNKNOWN PTP Property d208 changed
UNKNOWN PTP Property 0000 changed
UNKNOWN PTP Property 0000 changed
UNKNOWN PTP Property d114 changed
UNKNOWN PTP Property d02b changed
UNKNOWN PTP Property d20b changed
UNKNOWN PTP Property d128 changed
UNKNOWN PTP Property d055 changed
UNKNOWN PTP Property d17d changed
UNKNOWN PTP Property d125 changed
UNKNOWN PTP Property d209 changed
UNKNOWN CTGInfoCheckComplete 0x00020001
UNKNOWN unhandled EOS event PowerZoomInfoChanged (size 12)
UNKNOWN PTP Property d1b0 changed
Waiting for 2 seconds for events from camera. Press Ctrl-C to abort.
UNKNOWN OLCInfo event 0x0010 content 040269a9
UNKNOWN OLCInfo event mask=11
UNKNOWN PTP Property d1b7 changed
UNKNOWN PTP Property d1c3 changed
UNKNOWN PTP Property d1c0 changed
UNKNOWN Button 3
UNKNOWN Focus Info 000000000000
UNKNOWN OLCInfo event mask=101
UNKNOWN StorageInfoChanged 0x00020001
UNKNOWN StorageInfoChanged 0x00020001
Saving file as IMG_0060.JPG
UNKNOWN StorageInfoChanged 0x00020001
CAPTURECOMPLETE
UNKNOWN OLCInfo event 0x0010 content 040169a9
UNKNOWN OLCInfo event mask=10
UNKNOWN ObjectRemoved
UNKNOWN PTP Property d11b changed
UNKNOWN StorageInfoChanged 0x00020001
UNKNOWN OLCInfo event 0x0010 content 040169aa
UNKNOWN OLCInfo event mask=10

I have a hunch (actually a totally uneducated guess) that the zoom command will only be accepted if the lens is already deployed. But I can't figure out how to make it deploy and stay deployed, waiting for future --trigger-capture commands and zoom change commands.